Attachable Measurement Class

AttachableMeasurement is a class that logs a single measurement and associated details to the data log. AttachableMeasurement is used to create a measurement object that can contain waveforms, XY data, and file attachments.

Note You can add properties to AttachableMeasurement in the constructor or by editing the property directly.
Tip AttachableMeasurement inherits from the AuxiliaryFiles class, which enables creation of auxiliary files respective to the measurement.

When using a with statement, the measurement is implicitly committed when execution leaves the with statement. Otherwise, the write_measurement() function must be called explicitly.

with run.AttachableMeasurement() as meas:
    waveform = capture_waveform()
    value = perform_measurement()

    meas.details = MeasurementDetails(
        name="Vout_average",
        spec_id="VAD5",
        value=value,
        unit="V"
    )

    meas.attach_single_waveform(
        root_name=f"LoadRegulation_Vin{voltage}",
        waveform=waveform
    )
Table 6. Python Attachable Measurement Class Parameter
Parameter Required? Data Type Description
details No Custom Object that defines an individual measurement, including the measurement name, Spec ID, value, and unit of measure. (MeasurementDetails)