calamari.io.load#
- calamari.io.load(path, fmt=None)#
Parse a magnetometry file into a
Measurement.The dialect is detected from file content (never the extension: every Quantum Design export is
.dat). A file that no registered loader claims is an error – see the module docstring’s strictness table. Useis_supported_file()to probe without raising.- Parameters:
- Return type:
- Returns:
calamari.measurement.Measurement– Always carrying a real dialect indata_format– theformat_nameof whichever loader parsed it.- Raises:
UnsupportedFileError – If the file was read but no registered loader recognises its content (auto-detection only – an explicit
fmtskips sniffing).UnknownFormatError – If
fmtis given but names no registered loader. The file is not read in this case.FileParseError – If a recognised export has malformed required sections or CSV structure.
OSError – If the file cannot be read (missing, a directory, no permission).