snpl.gpc module

I/O interface utilities for GPC data.

snpl.gpc.load_ExportOmniSECReveal(src_curves, src_measinfo='guess', srcs_peakres='guess')[source]

Loads text files exported by __ExportOmniSEC.py into a hicsv object.

OmniSEC (the newer software for the Reveal detector) has only a very limited functionality to export the chromatography data (which is pretty frustrating). The original author of this code (SN) developed a script __ExportOmniSEC.py to semi-automatically export the data in a handy text format.

For the sake of generality, the exported data are separated into several files. The main file containing the raw curve data, the file containing the metadata of the measurement (*_MeasInfo.txt), and the analysis results (*_PeakResults_*.txt).

This function loads these files and combine them into a single hicsv object.

Parameters:
  • src_curves (str) – Path to the curve data file. Mandatory.

  • src_measinfo (str) – Path to the MeasInfo file. If it is set to “guess”, the function infers the path from src_curves.

  • srcs_peaks (str or list) – Path(s) to the PeakResults file. If it is set to “guess”, the function infers the path(s) from src_curves. Otherwise, if it is a single string representing a path, it is treated as the only associated PeakResults file. If it is a list of strings, it is treated as the list of multiple PeakResults files associated to the given curve data.

Returns:

an hicsv.hicsv object.

Example

>>> from snpl import gpc
>>> d = gpc.load_ExportOmniSECReveal("2022-07-14-15-30-59-20220714_SN628A.txt")
>>> print(d.h.keys())
dict_keys(['MeasInfo', 'PeakResults 20220714-abs-2'])
snpl.gpc.load_LabSolutionsAscii(fp, sep='\t', target='[LC Chromatogram')[source]

Loads the exported ASCII file from Shimadzu LabSolutions software.

LabSolutions ASCII file has some header part at the beginning followed by multiple “blocks” containing time series data for different channels (RI, UV, pressure, etc). This function extracts one of the channel (specified by target argument) and returns it as a convenient hicsv object.

Parameters:
  • fp (str or file-like) – path to the file or file-like object.

  • sep (str) – delimiter used in the ASCII file. Usually a tab.

  • target (str) – the beginning of the block of interest.

Returns:

a hicsv.hicsv object.

snpl.gpc.load_OmniSECExported(fp)[source]

Loads the exported text file from the OmniSEC software (older one)

snpl.gpc.load_TosohAscii(fp)[source]

Loads a legacy Tosoh ascii file into a hicsv object.

snpl.gpc.mw2time(mw, polycoeffs)[source]
snpl.gpc.time2mw(t, polycoeffs)[source]