Skip to main content

read_calibration_from_metadata

Function read_calibration_from_metadata 

Source
pub(crate) fn read_calibration_from_metadata(
    reader: &SerializedFileReader<File>,
    path: &Path,
) -> CalibrationSpec
Expand description

Reads calibration metadata written by the archiver from a Parquet file.

Looks for the first key-value metadata entry named calibration and parses its value as a JSON CalibrationSpec.

§Arguments

  • reader - Open reader for the file.
  • path - File path, used only in the log message.

§Returns

The parsed calibration, or CalibrationSpec::default (unnamed identity) if the entry is missing, has no value, or is not valid JSON. Invalid JSON is logged.