Mass Spectrometer

class ttlab.MassSpectrometer(filename=None, gridfs=None)[source]

Mass spectrometer class for importing mass spectrometer data. Currently supports files from Quadera software.

filename

The path to the mass spec data file.

Type:str, optional
gridfs

A pymongo Gridfs handle of the data file.

Type:pymongo database handle, optional
Attributes:
acquired_data
end_time

The time the experiment ended in unix time

gases

The measured gases

start_time

The time the experiment started in unix time

Methods

correct_for_drifting  
get_ion_current  
get_ion_current_at_time  
get_time  
get_time_relative  
plot  
plot_all  
plotly_all  
shift_start_time_back  
end_time

The time the experiment ended in unix time

gases

The measured gases

start_time

The time the experiment started in unix time

Example

Example with mass spectrometer data:

from ttlab import MassSpectrometer


# Create a mass spec object
filename = 'path/filename.asc'
MS = MassSpectrometer(filename)

# Check what gases are included in the data
print(MS.gases)

# Plot one of the gases, using matploltlib, returns the axes
ax = MS.plot_gas('Ar')

# Get the ion current and the relative time for the gas, returns np arrays with the data
ion_current_argon = MS.get_ion_current('Ar')
time_relative = MS.get_relative_time('Ar')