MSEval module
- class MSEval.Background(isotope, laser_on, laser_off, width=0.8, offset=0.15)
Bases:
objectClass for calculating and visualising background.
- Parameters:
isotope (MSData.Isotope) – Isotope from which background is calculated
laser_on (list) – List of sets, where each set has 2 values (start of the laser and end of the laser.) indicating when the laser was fireing.
laser_off (list) – List of sets, where each set has 2 values (end of the laser and start of the laser.) indicating when the laser wasn’t fireing.
offset (float (Optional)) – Parameter for outlier removal. 1-offset = upper treshold for percentile filtering. Accepts values between 0 and 1. Default is 0.15.
width (float (Optional)) – Parameter for outlier removal. Width od returned values, where 1-offset-width = lower treshold for percentile filtering. Accepts values between 0 and 1. Default is 0.8.
- class MSEval.DataReader(filename, filetype=None, instrument=None)
Bases:
objectReads data into pandas Dataframe from a file.
- Parameters:
filename (str) – Path to file to read.
filetype (str) – Type of the file to read. If not specified, csv is used. Possible options are csv, xlsx and asc.
instrument (str) – Type of the instrument used for measurement. If not specified, raw data is expected. Possible options are Agilent, and Element.
- read(filename, filetype, instrument)
Reads data into pandas Dataframe from a file.
- Parameters:
filename (str) – Path to file to read.
filetype (str) – Type of the file to read. If not specified, csv is used. Possible options are csv, xlsx and asc.
instrument (str) – Type of the instrument used for measurement. If not specified, raw data is expected. Possible options are Agilent, MC Nu-Sapphire, and Element.
- Returns:
data – data as a dataframe, which can be passed to MSData.
- Return type:
dataframe
- class MSEval.Iolite(path)
Bases:
objectClass holding Iolite data.
- Parameters:
path (str) – Path to Iolite .csv file.
- names_from_iolite()
Return peak names from iolite.
- on_and_off_times()
- read_iolite(path)
Read Iolite file.
- Parameters:
path (str) – Path to Iolite .csv file.
- class MSEval.Param(path, logger=None)
Bases:
objectClass holding meta data and parameters of analysis.
- Parameters:
path (str) – Path to param .xlsx file.
- read_is_coef()
Read sheet with internal standard coefficients from Param file.
- Returns:
internal_std – DataFrame with internal standard coefficients.
- Return type:
DataFrame
- read_names()
Read sheet with peak names from Param file.
- Returns:
names – List of peak names.
- Return type:
list
- read_ts_coef()
Read sheet with total sum correction coefficients from Param file.
- Returns:
internal_std – DataFrame with total sum correction coefficients .
- Return type:
dict
- class MSEval.Selector(ms_data, s=60, sdmul=10, iolite=None, logger=None)
Bases:
objectClass for peak and background identification.
- Parameters:
ms_data (MSData) – Mass spectrometry data class, for which the selector will be used.
s (float (Optional)) – Start of first peak in seconds for synchronisation with Iolite data if using method Iolite or for calculation of backround standard deviation if using method treshold. Default is 60s.
sdmul (int (Optional)) – Multiplier for backround standard deviation in method treshold. Default is 10.
iolite (MSEval.Iolite (Optional)) – Iolite class, only necessary if method is Iolite. Default is None.
logger (logger class (optional)) – If logger is pssed all methods of Selector will log in the activity.
- create_on_off(starts, ends)
From starts and ends of ablation create laser_on and laser_off with skipped values.
- create_selector_iolite()
Select starts and ends of ablation using iolite file.
- create_selector_treshold()
Select starts and ends of ablation based on selected element or sum of all using treshold calculated from background.
- set_skip(bcg_s=None, bcg_e=None, sig_s=None, sig_e=None)
Set time skipped on start and end of background and ablation in seconds.