From 6b72b50c4043b6277ad0c94413efe5c82c788980 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Thu, 3 Oct 2019 09:51:24 +0100 Subject: [PATCH] docs/instrumenation: Document teardown behaviour for instrument API --- doc/instrumentation.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/instrumentation.rst b/doc/instrumentation.rst index 39dda4f..0edc63a 100644 --- a/doc/instrumentation.rst +++ b/doc/instrumentation.rst @@ -168,6 +168,17 @@ Instrument generated or saved, an empty list will be returned. The format of the contents of the raw files is entirely source-dependent. + .. note:: This method is not guaranteed to return valid filepaths after the + :meth:`teardown` method has been invoked as the raw files may have + been deleted. Please ensure that copies are created manually + prior to calling :meth:`teardown` if the files are to be retained. + +.. method:: Instrument.teardown() + + Performs any required clean up of the instrument. This usually includes + removing temporary and raw files (if ``keep_raw`` is set to ``False`` on relevant + instruments), stopping services etc. + .. attribute:: Instrument.sample_rate_hz Sample rate of the instrument in Hz. Assumed to be the same for all channels.