instrument: add get_raw() API
Derived metrics may be calculated form data in raw output that is not
present in the resulting MeasurementCSV. This adds a method to provide
uniform access to raw artifacts generated by an instrument.
diff --git a/doc/instrumentation.rst b/doc/instrumentation.rst
index 6f381b4..f23fc3e 100644
--- a/doc/instrumentation.rst
+++ b/doc/instrumentation.rst
@@ -65,8 +65,8 @@
:INSTANTANEOUS: The instrument supports taking a single sample via
``take_measurement()``.
:CONTINUOUS: The instrument supports collecting measurements over a
- period of time via ``start()``, ``stop()``, and
- ``get_data()`` methods.
+ period of time via ``start()``, ``stop()``, ``get_data()``,
+ and (optionally) ``get_raw`` methods.
.. note:: It's possible for one instrument to support more than a single
mode.
@@ -161,6 +161,13 @@
.. note:: This method is only implemented by :class:`Instrument`\ s that
support ``CONTINUOUS`` measurement.
+.. method:: Instrument.get_raw()
+
+ Returns a list of paths to files containing raw output from the underlying
+ source(s) that is used to produce the data CSV. If now raw output is
+ generated or saved, an empty list will be returned. The format of the
+ contents of the raw files is entirely source-dependent.
+
.. attribute:: Instrument.sample_rate_hz
Sample rate of the instrument in Hz. Assumed to be the same for all channels.