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_dataOne descriptor word per centroid (see §16.2)
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).

16.2 Descriptor Stream​

FT scans store one UInt32 per centroid after the centroid list, in peak order and with no count word, so descriptor_list_size equals the peak count. Ion-trap scans store none (descriptor_list_size is 0).

BitsContent
0-19Zero-based position of the peak in the centroid list
20Set on some peaks; not established
21Set on the centroid of a lock mass found in this scan
22-23Set on some peaks; not established
24 and upA number that reads as an assigned charge state; 0 on most peaks

The evidence is from five public files (CORPUS.md, "Centroid descriptor words"): 86,061 FT scans with 27.6 million centroids.

  • Bits 0-19. The value equals the peak's position on every scan. Where a profile is stored (6,975 of the scans) it has one ProfileChunk per centroid, in the same order, so the position is also the index of the peak's chunk: the centroid's M/z lies inside that chunk's M/z range, or within a bin of its first or last point.
  • Bit 21. In the four files whose trailer has Number of LM Found:, the number of centroids with this bit equals that count on every scan: one on the 19,730 scans that report one found, none on the 66,168 that report none. The flagged centroid's stored M/z is the float32 nearest one of the trailer's Lock Mass #N (m/z): values. A scan that reports none found has no flagged centroid even where it has a centroid within 5 ppm of the lock mass. Two further cases were seen only on files that are not public: a scan that reports a lock mass found outside its stored M/z range has no centroid to flag, and a scan that reports two found has two flagged centroids, each within 0.4 ppm of its value and not on it.
  • Bits 24 and up. A centroid carrying 1, 2 or 3 has another centroid 1.00335 / z away far more often than one at the spacing of another z (for 1: 53% to 83% of them against 0.1% to 5.1%, by file). Larger numbers occur, up to 59 in these files; at their closer spacings the comparison no longer discriminates.
  • Bits 20, 22 and 23 are set on 0.01% to 15% of centroids, by file and bit. Nothing else stored in the file was found to say what they mark.

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)
0x144UInt32nbinsNumber of bins on the profile's axis; every chunk ends at or below it

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 is an additive m/z correction applied after conversion (it is in m/z units, typically on the order of 1e-4 to 1e-3):

mz = convert(frequency) + chunk.fudge

Applying it in the frequency domain instead shifts Orbitrap profile bins by roughly 1e-3 m/z relative to the centroid peak list.

Python profile() returns the converted m/z with the fudge added. profile_chunks() returns the parts: first_value, step and nbins, each chunk's first_bin, point count and fudge, and the coefficients.


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