rainbow.from_asm

from_asm(document, name='asm')[source]

Reconstructs a DataDirectory from an ASM liquid- or gas-chromatography document.

The inverse of to_asm(): each measurement’s data cube becomes a DataFile (retention time back from seconds to minutes, the measure back to the data array) and the shared envelope becomes directory metadata. Every chromatogram cube with inlined values is reconstructed, under the detector its device type names (see _detector_of()), and every measurement’s peaks are read into DataDirectory.peaks, whether or not its trace could be rebuilt. A mass chromatogram is not reconstructed. Use sequence_from_asm() to recover a per-injection sequence.

Parameters:
  • document (dict) – An ASM document (e.g. from json.load).

  • name (str, optional) – Name for the reconstructed DataDirectory.

Returns:

DataDirectory.