The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Finnigan::ScanEventPreamble -- a decoder for ScanEventPreamble, the byte array component of ScanEvent

SYNOPSIS

  use Finnigan;
  my $p = Finnigan::ScanEventPreamble->decode(\*INPUT, $version);
  say join(" ", $p->list);
  say join(" ", $p->list('decode');
  say p->analyzer;
  say p->analyzer('decode');

DESCRIPTION

ScanEventPreamble is a fixed-size (but version-dependent) structure. It is a byte array located at the head of each ScanEvent. It contains various boolean flags an enumerated types. For example, it's 41st byte contains the analyzer type in all versions:

  %ANALYZER = (
    0 => "ITMS",
    1 => "TQMS",
    2 => "SQMS",
    3 => "TOFMS",
    4 => "FTMS",
    5 => "Sector",
    6 => "undefined"
  );

The ScanEventPreamble decoder provides a number of accessors that interpret the enumerated and boolean values.

The meaning of some values in ScanEventPreamble remains unknown.

The structure seems to have grown historically: to the 41 bytes in v.57, 39 more were added in v.62, and 8 further bytes were added in v.63. That does not affect the decoder interface; those values it knows about have not changed, but the version number still has to be passed into it so it knows how many bytes to read.

METHODS

decode($stream, $version)

The constructor method

All of the following accessor methods will replace the byte value of the flag they access with a symbolic value representing that flag's meaning if given a truthy argument. The word 'decode' is a good one to use because it makes the code more readable, but any truthy value will work.

list(bool)

Returns an array containing all byte values of ScanEventPreamble

corona(bool)

Get the corona status (0:off or 1:on).

detector(bool)

Get the detector flag (0:valid or 1:undefined).

polarity(bool)

Get the polarity value (0:negative, 1:positive, 2:undefined)

scan_mode(bool)

Get the scan mode (0:centroid, 1:profile, 2:undefined)

ms_power(bool)

Get the MS power number (0:undefined, 1:MS1, 2:MS2, 3:MS3, 4:MS4, 5:MS5, 6:MS6, 7:MS7, 8:MS8)

scan_type(bool)

Get the scan type (0:Full, 1:Zoom, 2:SIM, 3:SRM, 4:CRM, 5:undefined, 6:Q1, 7:Q3)

dependent(bool)

Get the dependent flag (0 for primary MS1 scans, 1 for dependent scan types)

ionization(bool)

Get the scan type (0:EI, 1:CI, 2:FABI, 3:ESI, 4:APCI, 5:NSI, 6:TSI, 7:FDI, 8:MALDI, 9:GDI, 10:undefined)

wideband(bool)

Get the wideband flag (0:off, 1:on, 2:undefined).

analyzer(bool)

Get the scan type (0:ITMS, 1:TQMS, 2:SQMS, 3:TOFMS, 4:FTMS, 5:Sector, 6:undefined)

stringify

Makes a short text representation of the set of flags (known as "filter line" to the users of Thermo software)

SEE ALSO

Finnigan::ScanEvent

uf-trailer

AUTHOR

Gene Selkov, <selkovjr@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2010 by Gene Selkov

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.