Skip to main content

Scan data

Scan peak data is laid out one of three ways. RawFileReader::open inspects the file version and first scan to pick a decoder, stored as scan_format: ScanDataFormat.

VariantWhen it appliesInstruments
PacketHeaderProfile + centroid scans with a header packetOrbitrap, ion trap
FlatV63Variable-size flat peaks, version <= 63Older TSQ / SRM
FlatV66Fixed 12-byte peak triplets, version >= 64TSQ Quantiva, Altis SRM

read_scan_peaks(file, scan_num) returns:

pub struct ScanPeaks {
pub mz: Vec<f64>,
pub intensity: Vec<f32>,
}

For full layouts of each packet variant see Scan index and data.