p5control.measure.measurement
Class to facilitate a measurement, e.g. using a script with a context manager. For a brief introduction, take a look at the sample project:
- exception p5control.measure.measurement.MeasurementError
Bases:
ExceptionException related to an Measurement
- class p5control.measure.measurement.Measurement(devices: Dict[str, Any], name: str | None = None)
Bases:
objectMeasure all the provided devices. Implements the python context manager. Make sure that only one measurement is running at a time, because otherwise the calls to
get_dataof the drivers will interfere with each other.- Parameters:
devices (Dict[str, Any]) – which devices the data should be recorded from
name (str, optional) – output name for the recorded data. If omitted, will be generated automatically
- start()
Start measurement by starting all the separate measuring threads of the devices.
Blocks until all have run their setup and then releases them at the same time.
- stop()
Stop all measurements threads. Blocks until all are finished.
- property path: str
Get the path to the folder where the results will be stored.
- property name: str
Name of the measurement.
- property running: bool
Whether the measurement is currently running.