Skip to main content

Scan Index and Data Packets

Scan index, data packets, profile, peaks

15. ScanIndexEntry

Array of scan index entries located at RunHeader.scan_index_addr. One entry per scan. Provides the offset, size, and summary statistics for each scan's data packet.

15.1 Version 66

OffsetSizeTypeFieldDescription
0x004UInt32offset_32Defunct 32-bit offset
0x044UInt32indexScan number (0-based)
0x082UInt16scan_eventScan event index
0x0A2UInt16scan_segmentScan segment index
0x0C4UInt32nextIndex of next scan (linked list)
0x104UInt32unknown_long
0x144UInt32data_sizeSize of scan data packet in bytes
0x188Float64start_timeRetention time (minutes)
0x208Float64total_currentTotal ion current
0x288Float64base_intensityBase peak intensity
0x308Float64base_mzBase peak M/z
0x388Float64low_mzLowest M/z in scan
0x408Float64high_mzHighest M/z in scan
0x488UInt64offsetFile offset to ScanDataPacket (relative to data stream start)
0x504UInt32unknown_long[1]
0x544UInt32unknown_long[2]

Total size: 92 bytes per entry

15.2 Version 64

Same as v66 but without the trailing unknown_long[1] and [2]:

Total size: 84 bytes per entry

15.3 Pre-v64

No 64-bit offset field; offset at position 0x00 is the actual 32-bit offset:

Total size: 76 bytes per entry

15.4 Scan Data Location

The actual file position of scan i's data:

absolute_offset = RunHeader.data_addr + ScanIndexEntry[i].offset

16. ScanDataPacket

Each scan's raw data packet, located at the offset indicated by its ScanIndexEntry. The packet contains the mass spectrum in profile form, centroid form, or both.

16.1 Structure

OrderSizeTypeFieldDescription
140PacketHeaderheaderSizes and M/z range (see §17)
2header.profile_size × 4bytesprofile_dataRaw profile data
3header.peak_list_size × 4bytescentroid_dataCentroid peak list
4header.descriptor_list_size × 4bytesdescriptor_dataAdditional descriptors
5header.unknown_stream_size × 4bytesunknown_dataUnknown stream
6header.triplet_stream_size × 4bytestriplet_dataTriplet data

All size fields in the PacketHeader are in 4-byte words (i.e., the actual byte size is 4× the stored value).


17. PacketHeader

The 40-byte header at the start of each ScanDataPacket.

OffsetSizeTypeFieldDescription
0x004UInt32unknown_long[1]
0x044UInt32profile_sizeProfile data size (in 4-byte words)
0x084UInt32peak_list_sizeCentroid data size (in 4-byte words)
0x0C4UInt32layoutProfile layout flag: 0 or 128
0x104UInt32descriptor_list_sizeDescriptor data size (in 4-byte words)
0x144UInt32unknown_stream_sizeUnknown data size (in 4-byte words)
0x184UInt32triplet_stream_sizeTriplet data size (in 4-byte words)
0x1C4UInt32unknown_long[2]
0x204Float32low_mzLowest M/z in this scan
0x244Float32high_mzHighest M/z in this scan

Total size: 40 bytes

17.1 Layout Flag

The layout field controls how ProfileChunk structures are decoded:

ValueMeaning
0No fudge factor in profile chunks (8-byte chunk preamble)
128 (0x80)Fudge factor present in profile chunks (12-byte chunk preamble)

18. Profile

The profile data region within a ScanDataPacket. Represents the raw signal intensity as a function of frequency bins (which map to M/z values via the conversion function in the associated ScanEvent).

18.1 Structure

OffsetSizeTypeFieldDescription
0x008Float64first_valueFirst bin's frequency (or M/z in pre-FTMS)
0x088Float64stepBin width (negative for frequency domain)
0x104UInt32peak_countNumber of ProfileChunks (non-zero signal regions)
0x144UInt32nbinsTotal number of bins across all chunks

Preamble size: 24 bytes

After the preamble, peak_count ProfileChunk structures follow sequentially.

18.2 Interpretation

  • If step < 0, data is in frequency domain and must be converted to M/z using the frequency-to-M/z conversion function (see §32).
  • If step > 0, data is directly in M/z domain (older instruments).
  • "Peaks" in the profile context refers to signal peaks (regions of non-zero signal), not mass spectral peaks.

19. ProfileChunk

A contiguous run of non-zero signal values within the profile.

19.1 Layout == 0 (No Fudge)

OffsetSizeTypeField
0x004UInt32first_bin
0x044UInt32nbins
0x08nbins × 4Float32[]signal

19.2 Layout > 0 (With Fudge)

OffsetSizeTypeField
0x004UInt32first_bin
0x044UInt32nbins
0x084Float32fudge
0x0Cnbins × 4Float32[]signal

19.3 M/z Calculation for a Bin

For bin index i within a chunk:

bin_index_global = chunk.first_bin + i
frequency = profile.first_value + bin_index_global * profile.step
mz = convert(frequency) # See §32

If a fudge factor is present, it modifies the frequency before conversion:

frequency_adjusted = frequency + chunk.fudge

20. Peaks

The centroid peak list within a ScanDataPacket. Contains pre-picked peaks with M/z and abundance values.

20.1 Structure

OffsetSizeTypeField
0x004UInt32count
0x04count × 8Peak[]peaks

20.2 Peak

OffsetSizeTypeField
0x004Float32mz
0x044Float32abundance

Size per peak: 8 bytes