spc-parser
    Preparing search index...

    Interface ParseOptions

    Options accepted by parse.

    interface ParseOptions {
        encoding?: string;
        logger?: LightLogger;
        sortX?: boolean;
        strict?: boolean;
        timeZone?: string;
    }
    Index

    Properties

    encoding?: string

    Encoding used for header, log and UVProbe text that is not valid UTF-8 (e.g. 'gbk', 'shift_jis').

    'windows-1252'
    
    logger?: LightLogger

    Where anomalies are reported as they are found, in addition to warnings. Any cheminfo-types LightLogger fits, including console and a FifoLogger.

    undefined
    
    sortX?: boolean

    Return each spectrum sorted by increasing X. With false, the file order is kept.

    true
    
    strict?: boolean

    Throw a SpcParserError with code STRICT on anomalies that are otherwise only reported in warnings.

    false
    
    timeZone?: string

    Zone the instrument's clock was set to, as an IANA name ('Europe/Zurich'), a fixed offset ('+01:00') or 'UTC'.

    An SPC file records the wall clock the operator saw and never its offset, so without this option a decoded date names no instant: it is read as the reader's own local time, which differs between a lab machine and a UTC server. Naming the lab's zone makes every date an instant that is the same everywhere. The unix layout is already an instant and is never shifted.

    undefined