Measurement history and output files¶
History pickle¶
Measurement scripts store their respective Measure subclass, such as
MSC or TEMCell, as a pickle. When that pickle is used as input to a
subsequent measurement, the new measurement extends the same object and
writes a new file. Preparatory measurements, reference data, EUT
measurements, and evaluations therefore remain together.
The typical chain is:
previous history -> new measurement -> new evaluation -> new history pickle
The input file is not treated as a plain data export. It also contains the
structures required to interpret the data. Applications should use
mpylab.env.Measure.load_pickle_compat to load current and supported older
mpylab pickles.
Autosave and resume¶
During a long measurement, mpylab writes an autosave pickle at configurable
intervals. In addition to data already acquired, it stores structured
information about the resume position. ascmd remains as a readable
description of the call; program logic prefers the structured resume
information.
On the next start, the associated script detects the autosave file and can continue at the stored loop index. Frequencies or positions already completed are not measured again. After successful completion and creation of the final pickle, the autosave is normally removed. It may deliberately be retained for an incomplete immunity measurement.
Post-measurement snapshot¶
Many scripts additionally support after_measurement_pickle_file. This
file is written after data acquisition but before or independently of the
final evaluation. It is particularly useful when:
an evaluation must be repeated without hardware access,
evaluation parameters have been corrected,
the measurement succeeded but a later step failed.
It does not replace the final history pickle. It records a deliberate intermediate state.
DAT and TSV files¶
rawdata_output_filename and processeddata_output_filename create
human-readable DAT files. Raw files show acquired quantities; processed files
show results derived from them. Units and uncertainties are retained according
to the mpylab data format.
TSV files are used for tabular side products such as preflight results or machine-readable report metadata. DAT and TSV are suitable for comparison, version control, and further processing. The history pickle remains the more complete source because not every object relationship and item of metadata fits into flat tables.
File names¶
Descriptions can become part of output file names. Scripts should use
mpylab.tools.filenames.format_output_filename for this purpose. Some
measurement scripts wrap this call in a local format_filename helper. The
function combines the configured file-name pattern with sanitized,
length-limited arguments. Applications should not use unchecked descriptions
as complete file names.