calamari.catalog.logbook_line#
- calamari.catalog.logbook_line(measurement, *, root=None)#
One tab-separated logbook entry for a loaded measurement.
The line a lab logbook wants for “what is this file?”: name, date, sample, mass, measurement type, AC frequencies, scan kind, and the temperature and field windows – each as a held value (
H = 0.1 T) or a span (2 < T < 40 K) as the data dictates. “Held” is judged with the same tolerances asclassify_scan()(0.5 K, 10 Oe), so a setpoint recorded with real instrument jitter readsT = 9 K, not a millikelvin sweep, and the two cells can never contradict thescan_kindcell between them.Every value comes from
summary()rather than the raw accessors, which buys three things at once: spans exclude housekeeping rows (a trailing locate scan cannot stretch an isotherm’s apparent temperature range); a quantity the file lacks is a blank cell rather than a crash (a DC file simply has no AC frequency); and a file an accessor would raise on – an unrecognised unit, an ambiguous moment – still gets a line, with the unanswerable cells blank. A logbook must describe the problem files too; they are the ones you go looking for.The AC cell lists the distinct frequencies (
'97; 997 Hz'), never an average: the mean of a two-frequency interleave describes neither measurement.- Parameters:
measurement (
calamari.measurement.Measurement) – A loaded measurement (or any subclass, e.g. anAggregatedMeasurement).root (
Path|str|None) – If given and the file lies under it, the name cell is the path relative toroot(so subfolder structure survives into the logbook); otherwise just the filename.
- Return type:
- Returns:
str– Tab-separated cells, in the column order above. Empty cells stay as empty fields, so the column structure is stable across a mixed directory and the output pastes into a spreadsheet.