File parser
cast.py
Module to cast the data after parsing.
parse_external.py
Module to parse input files containing externally calibrated sampled spectra.
- class ExternalParser[source]
Bases:
GenericParserParser for externally calibrated sampled spectra.
parse_generic.py
Module to parse input files containing spectra.
- exception DataMismatchError[source]
Bases:
RuntimeErrorError raised when the data in a file is invalid or the file extension does not match the file contents.
- class GenericParser[source]
Bases:
objectGeneric spectra parser.
- get_parser(extension)[source]
Choose the parser to use based on the extension.
- Parameters
extension (str) – File extension including the dot (e.g.: ‘.csv’).
- Returns
Parse method corresponding to the extension.
- Return type
method
- Raises
InvalidExtensionError – If the extension is not valid.
parse_internal_continuous.py
Module to parse input files containing internally calibrated continuous spectra.
- class InternalContinuousParser[source]
Bases:
GenericParserParser for internally calibrated continuous spectra.
parse_internal_sampled.py
Module to parse input files containing internally calibrated sampled spectra.
- class InternalSampledParser[source]
Bases:
GenericParserParser for internally calibrated sampled spectra.
utils.py
Module containing auxiliary functions of the parsers.