Documentation ¶
Overview ¶
Package unthermo is a library that can read Thermo RAW files. It only deals with version 57 and above (fairly recent machines).
Index ¶
- type AuditTag
- type AutoSamplerInfo
- type AutoSamplerPreamble
- type CDataPacket
- type CDataPackets
- type CIndexEntries
- type CIndexEntry
- type CentroidedPeak
- type File
- type FileHeader
- type FractionCollector
- type InfoPreamble
- type InjectionData
- type PacketHeader
- type PascalString
- type PeakDescriptor
- type PeakList
- type Profile
- type ProfileChunk
- type RawFileInfo
- type Reaction
- type RunHeader
- type SampleInfo
- type ScanDataPacket
- type ScanDataPackets
- type ScanEvent
- type ScanEvents
- type ScanIndex
- type ScanIndexEntry
- type SequencerRow
- type TrailerLength
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoSamplerInfo ¶
type AutoSamplerInfo struct { Preamble AutoSamplerPreamble Text PascalString }
AutoSamplerInfo comes from the sampling device
type AutoSamplerPreamble ¶
type CDataPacket ¶
CDataPackets are the data from Chromatography machines
type CDataPackets ¶
type CDataPackets []CDataPacket
type CIndexEntries ¶
type CIndexEntries []CIndexEntry
type CIndexEntry ¶
type CIndexEntry struct { Offset32 uint32 Index uint32 Event uint16 Unknown1 uint16 Unknown2 uint32 Unknown3 uint32 Unknown4 uint32 Unknown5 float64 Time float64 Unknown6 float64 Unknown7 float64 Value float64 Offset uint64 }
func (CIndexEntry) Size ¶
func (data CIndexEntry) Size(v Version) uint64
type File ¶
type File struct {
// contains filtered or unexported fields
}
File is an in-memory representation of the Thermo RAW file
func Open ¶
Open opens the supplied filename and reads the indices from the RAW file in memory. Multiple files may be read concurrently.
func (*File) AllScans ¶
AllScans is a convenience function that runs over all spectra in the raw file
On every encountered MS Scan, the function fun is called
func (*File) Chromatography ¶
func (rf *File) Chromatography(instr int) (cdata CDataPackets)
Experimental: read out chromatography data from a connected instrument
type FileHeader ¶
type FileHeader struct { Magic uint16 //2 bytes Signature signature //18 bytes Unknown1 uint32 //4 bytes Unknown2 uint32 //4 bytes Unknown3 uint32 //4 bytes Unknown4 uint32 //4 bytes Version Version //4 bytes AuditStart AuditTag //112 bytes AuditEnd AuditTag //112 bytes Unknown5 uint32 //4 bytes Unknown6 [60]byte //60 bytes Tag headertag //1028 bytes }
The Thermo fileheaders most valuable piece of info is the file version. It determines the reading strategy for some data structures that changed over time
type FractionCollector ¶
type InfoPreamble ¶
type InfoPreamble struct { Methodfilepresent uint32 Year uint16 Month uint16 Weekday uint16 Day uint16 Hour uint16 Minute uint16 Second uint16 Millisecond uint16 Unknown1 uint32 DataAddr32 uint32 NControllers uint32 NControllers2 uint32 Unknown2 uint32 Unknown3 uint32 RunHeaderAddr32 []uint32 Unknown4 []uint32 Unknown5 []uint32 Padding1 [764]byte //760 bytes, 756 bytes in v57 DataAddr uint64 Unknown6 uint64 RunHeaderAddr []uint64 Unknown7 []uint64 Padding2 [1032]byte //1024 bytes, 1008 bytes in v64 }
type InjectionData ¶
type PacketHeader ¶
type PacketHeader struct { Unknown1 uint32 ProfileSize uint32 PeaklistSize uint32 Layout uint32 DescriptorListSize uint32 UnknownStreamSize uint32 TripletStreamSize uint32 Unknown2 uint32 Lowmz float32 Highmz float32 }
A Header containing info about how many peaks/profile points were registered
type PascalString ¶
func (PascalString) String ¶
func (t PascalString) String() string
type PeakDescriptor ¶
A struct containing more info about the peaks
type PeakList ¶
type PeakList struct { Count uint32 Peaks []CentroidedPeak }
The data structure holding the peaks
type Profile ¶
type Profile struct { FirstValue float64 Step float64 PeakCount uint32 Nbins uint32 Chunks []ProfileChunk }
The structure containing the profile-mode points
type ProfileChunk ¶
Profile points are collected in chunks with adjacent signal points
type RawFileInfo ¶
type RawFileInfo struct { Preamble InfoPreamble Heading1 PascalString Heading2 PascalString Heading3 PascalString Heading4 PascalString Heading5 PascalString Unknown1 PascalString }
RawFileInfo contains the addresses of the different RunHeaders, (header of the data that each connected instrument produced) also the acquisition date
type RunHeader ¶
type RunHeader struct { SampleInfo SampleInfo Filename1 filename Filename2 filename Filename3 filename Filename4 filename Filename5 filename Filename6 filename Unknown1 float64 Unknown2 float64 Filename7 filename Filename8 filename Filename9 filename Filename10 filename Filename11 filename Filename12 filename Filename13 filename ScantrailerAddr32 uint32 ScanparamsAddr32 uint32 Unknown3 uint32 Unknown4 uint32 Nsegs uint32 Unknown5 uint32 Unknown6 uint32 OwnAddr32 uint32 Unknown7 uint32 Unknown8 uint32 ScanindexAddr uint64 DataAddr uint64 InstlogAddr uint64 ErrorlogAddr uint64 Unknown9 uint64 ScantrailerAddr uint64 ScanparamsAddr uint64 Unknown10 uint32 Unknown11 uint32 OwnAddr uint64 Unknown12 uint32 Unknown13 uint32 Unknown14 uint32 Unknown15 uint32 Unknown16 uint32 Unknown17 uint32 Unknown18 uint32 Unknown19 uint32 Unknown20 uint32 Unknown21 uint32 Unknown22 uint32 Unknown23 uint32 Unknown24 uint32 Unknown25 uint32 Unknown26 uint32 Unknown27 uint32 Unknown28 uint32 Unknown29 uint32 Unknown30 uint32 Unknown31 uint32 Unknown32 uint32 Unknown33 uint32 Unknown34 uint32 Unknown35 uint32 Unknown36 [8]byte Unknown37 uint32 Device PascalString Model PascalString SN PascalString SWVer PascalString Tag1 PascalString Tag2 PascalString Tag3 PascalString Tag4 PascalString }
RunHeaders contain all data addresses for data that a certain machine connected to the Mass Spectrometer (including the MS itself) has acquired. Also SN data is available
type SampleInfo ¶
type SampleInfo struct { Unknown1 uint32 Unknown2 uint32 FirstScanNumber uint32 LastScanNumber uint32 InstlogLength uint32 Unknown3 uint32 Unknown4 uint32 ScanindexAddr uint32 //unused in 64-bit versions DataAddr uint32 InstlogAddr uint32 ErrorlogAddr uint32 Unknown5 uint32 MaxSignal float64 Lowmz float64 Highmz float64 Starttime float64 Endtime float64 Unknown6 [56]byte Tag1 [44]uint16 Tag2 [20]uint16 Tag3 [160]uint16 }
SampleInfo contains some other info
type ScanDataPacket ¶
type ScanDataPacket struct { Header PacketHeader Profile Profile PeakList PeakList DescriptorList []PeakDescriptor Unknown []float32 Triplets []float32 }
An MS scan packet, containing Centroid Peak or Profile intensities
type ScanDataPackets ¶
type ScanDataPackets []ScanDataPacket
type ScanEvent ¶
type ScanEvent struct { Preamble [132]uint8 //128 bytes from v63 on, 120 in v62, 80 in v57, 41 below that //Preamble[6] == ms-level //Preamble[40] == analyzer Nprecursors uint32 Reaction []Reaction Unknown1 [13]uint32 MZrange [3]FractionCollector Nparam uint32 Unknown2 [4]float64 A float64 B float64 C float64 }
ScanEvents are encoded headers of the MS scans, their Preamble contain the MS level, type of ionization etc. Events themselves contain range, and conversion parameters from Hz to m/z
type ScanEvents ¶
type ScanEvents []ScanEvent
type ScanIndex ¶
type ScanIndex []ScanIndexEntry
type ScanIndexEntry ¶
type ScanIndexEntry struct { Offset32 uint32 Index uint32 Scanevent uint16 Scansegment uint16 Next uint32 Unknown1 uint32 DataPacketSize uint32 Time float64 Totalcurrent float64 Baseintensity float64 Basemz float64 Lowmz float64 Highmz float64 Offset uint64 Unknown2 uint32 Unknown3 uint32 }
func (ScanIndexEntry) Size ¶
func (data ScanIndexEntry) Size(v Version) uint64
type SequencerRow ¶
type SequencerRow struct { Injection InjectionData Unknown1 PascalString Unknown2 PascalString ID PascalString Comment PascalString Userlabel1 PascalString Userlabel2 PascalString Userlabel3 PascalString Userlabel4 PascalString Userlabel5 PascalString Instmethod PascalString Procmethod PascalString Filename PascalString Path PascalString Vial PascalString Unknown3 PascalString Unknown4 PascalString Unknown5 uint32 Unknown6 PascalString Unknown7 PascalString Unknown8 PascalString Unknown9 PascalString Unknown10 PascalString Unknown11 PascalString Unknown12 PascalString Unknown13 PascalString Unknown14 PascalString Unknown15 PascalString Unknown16 PascalString Unknown17 PascalString Unknown18 PascalString Unknown19 PascalString Unknown20 PascalString }
SequencerRow contains more information about what the autosampler did