rainbow.read
- read(path, prec=0, hrms=False, requested_files=None, telemetry=False, centroid=False, format=None)[source]
Reads a chromatogram data directory. Main method of the package.
Increasing the precision may drastically increase memory usage for larger files. Specifying a higher precision mainly affects the parsing of MS data, because intensities are summed within the given precision for each ylabel.
Max precision available for Agilent MS data is 1.
Max precision recommended for Waters MS data is 3.
Agilent HRMS parsing may be slow. Set the flag to enable it.
For Agilent .dx archives, instrument telemetry traces (e.g. pressure, temperature) are skipped unless the telemetry flag is set.
The vendor is normally detected from the path: a .D/.dx path is read as Agilent and a .raw path as Waters. A directory whose name lacks that suffix is identified from its contents instead. Pass
format(‘agilent’ or ‘waters’) to override detection entirely.- Parameters:
path (str) – Path of the directory.
prec (int, optional) – Number of decimals to round ylabels.
hrms (bool, optional) – Flag for Agilent HRMS (MSProfile.bin) parsing.
requested_files (list, optional) – List of filenames to parse.
telemetry (bool, optional) – Flag for Agilent .dx telemetry traces.
centroid (bool, optional) – Flag for Agilent MassHunter centroid (MSPeak.bin) parsing.
format (str, optional) – Force the vendor parser (‘agilent’ or ‘waters’), bypassing extension/content detection.
- Returns:
DataDirectory representing the directory.