Attachable Measurements Class
- Updated2022-07-11
- 1 minute(s) read
Attachable Measurements Class
AttachableMeasurements is a class that logs multiple measurements, and associated details for each measurement, to the data log. AttachableMeasurements is used to create a measurement object which can contain waveforms, XY data, and file attachments.
Note You can add properties to AttachableMeasurements in the
constructor or by editing the property directly.
Tip AttachableMeasurements inherits from the
AuxiliaryFiles class, which enables creation of auxiliary
files respective to the measurement.
When using a with statement, the measurements are implicitly committed when execution leaves the with statement. Otherwise, the write_measurement() function must be called explicitly.
with run.AttachableMeasurements() as meas:
waveform = capture_waveform()
rms = perform_measurement()
distortion = perform_measurement()
meas.details_list = [
MeasurementDetails(
name="RMS",
spec_id="VRMS2",
value=rms,
unit="Vrms"
),
MeasurementDetails(
name="Distortion",
spec_id="DIST1",
value=distortion,
unit="%"
)
]
meas.attach_single_waveform(
root_name=f"LoadRegulation_Vin{voltage}",
waveform=waveform
)
| Parameter | Required? | Data Type | Description |
|---|---|---|---|
| details_list | No | Custom | List of objects that define details about each individual measurement, including the measurement name, Spec ID, value, and unit of measure. (List[MeasurementDetails]) |