ezchrom: For EZChrom chromatograms

Extractors for data files generated by Agilent’s EZChrom software.

yadg.extractors.ezchrom.asc module

Handles files created using the ASCII export function in the EZChrom software. This file format includes one timestep with multiple traces for each ASCII file. It contains a header section, and a sequence of Y datapoints (signal) for each detector. The X-axis (elution_time) is assumed to be uniform between traces, and its units have to be deduced from the header.

Usage

Available since yadg-4.0.

pydantic model dgbowl_schemas.yadg.dataschema_6_0.filetype.EZChrom_asc
Config:
  • extra: str = forbid

Validators:
field filetype: Literal['ezchrom.asc'] [Required]
field encoding: str | None = 'windows-1252'
Validated by:
validator set_encoding  »  encoding

Schema

xarray.DataTree:
  {{ detector_index }}:
    coords:
      uts:            !!float               # Unix timestamp
      elution_time:   !!float               # Elution time
    data_vars:
      signal:         (uts, elution_time)   # Signal data

Metadata

The following metadata is extracted:

  • sampleid: Sample name.

  • username: User name used to generate the file.

  • method: Name of the chromatographic method.

  • version: Version of the CH file (only “179” is currently supported.)

Uncertainties

The uncertainties in signal are derived from the string representation of the float.

For elution_time, an uncertainty of one X-axis multiplier is used.

Code author: Peter Kraus

yadg.extractors.ezchrom.asc.extract(*, fn: str, encoding: str, timezone: str, **kwargs: dict) DataTree

yadg.extractors.ezchrom.dat module

Handles binary files created by EZChrom software.

Usage

Available since yadg-5.1.

pydantic model dgbowl_schemas.yadg.dataschema_6_0.filetype.EZChrom_dat
Config:
  • extra: str = forbid

Validators:

field filetype: Literal['ezchrom.dat'] [Required]

Schema

xarray.DataTree:
  {{ detector_trace }}:
    coords:
      uts:            !!float               # Unix timestamp
      elution_time:   !!float               # Elution time
    data_vars:
      signal:         (uts, elution_time)   # Signal data

Metadata

No metadata is currently extracted. If you need some particular metadata, please open an issue.

Notes on file structure

Data in these files is stored as an OLE file, which is first processed using the olefile library.

The timestamp is stored as an OLE timestamp in the Chrom Header stream.

The metadata for each trace are stored within the Detector Trace Handler stream, and contain the X- and Y-axis multiplier, Y-axis units, and some other metadata.

The data for each trace are stored within the Detector Data “directory” within the OLE file, with one stream per trace.

Uncertainties

The uncertainties in signal as well as elution_time are set to the axis multiplier.

Code author: Peter Kraus

yadg.extractors.ezchrom.dat.extract(*, fn: str, timezone: str, **kwargs: dict) DataTree