Finnigan::ScanEventPreamble -- a decoder for ScanEventPreamble, the byte array component of ScanEvent
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');
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.
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.
Returns an array containing all byte values of ScanEventPreamble
Get the corona status (0:off or 1:on).
Get the detector flag (0:valid or 1:undefined).
Get the polarity value (0:negative, 1:positive, 2:undefined)
Get the scan mode (0:centroid, 1:profile, 2:undefined)
Get the MS power number (0:undefined, 1:MS1, 2:MS2, 3:MS3, 4:MS4, 5:MS5, 6:MS6, 7:MS7, 8:MS8)
Get the scan type (0:Full, 1:Zoom, 2:SIM, 3:SRM, 4:CRM, 5:undefined, 6:Q1, 7:Q3)
Get the dependent flag (0 for primary MS1 scans, 1 for dependent scan types)
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)
Get the wideband flag (0:off, 1:on, 2:undefined).
Get the scan type (0:ITMS, 1:TQMS, 2:SQMS, 3:TOFMS, 4:FTMS, 5:Sector, 6:undefined)
Makes a short text representation of the set of flags (known as "filter line" to the users of Thermo software)
Gene Selkov, <firstname.lastname@example.org>
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.