pygecko.gc_tools.peak package

Submodules

pygecko.gc_tools.peak.fid_peak module

class pygecko.gc_tools.peak.fid_peak.FID_Peak(rt: float, height: float, width: float, boarders: ndarray, area: float, flag: str | None)

Bases: Peak

FID_Peak class for storing information about peaks in FID chromatograms.

rt

Retention time of the peak.

Type:

float

ri

Retention index of the peak.

Type:

None|float

area

Area of the peak. Defaults to None.

Type:

None|float

flags

List of flags of the peak.

Type:

list[Any|str]

analyte

Analyte of the peak.

Type:

None|Analyte

height

Height of the peak.

Type:

float

boarders

Boarders of the peak.

Type:

np.ndarray

width

Width of the peak.

Type:

float

boarders

Boarders of the peak.

Type:

np.ndarray

analyte: None | Analyte
area: None | float
boarders: None | np.ndarray
flags: list[None | str]
height: None | float
ri: None | float
rt: float
width: None | float

pygecko.gc_tools.peak.ms_peak module

class pygecko.gc_tools.peak.ms_peak.MS_Peak(rt: float, height: float, width: float, boarders: ndarray, mass_spectrum: ndarray, flag: str | None = None, area=None)

Bases: Peak

MS_Peak class for storing information about peaks in MS chromatograms.

rt

Retention time of the peak.

Type:

float

ri

Retention index of the peak.

Type:

Union[None, float]

area

Area of the peak. Defaults to None.

Type:

Union[None, float]

height

Height of the peak.

Type:

float

width

Width of the peak.

Type:

float

boarders

Boarders of the peak.

Type:

np.ndarray

flags

List of flags of the peak.

Type:

list[Any|str]

analyte

Analyte of the peak.

Type:

Union[None, Analyte]

mass_spectrum

Mass spectrum of the peak.

Type:

np.ndarray

mass_spectrum: ndarray
save_mass_spectrum(path: str) None

Saves the mass spectrum of the peak to a CSV file. :param path: Path to the file where the mass spectrum will be saved. :type path: str

view_mass_spectrum(path: str | None = None, **kwargs) None

Plots the mass spectrum of the peak. :param **kwargs: Keyword arguments for the visualization.

pygecko.gc_tools.peak.peak module

class pygecko.gc_tools.peak.peak.Peak(rt: float, height: float, width: float, borders: ndarray, area=None)

Bases: object

Base class for all Peaks.

rt

Retention time of the peak.

Type:

float

ri

Retention index of the peak.

Type:

None|float

area

Area of the peak. Defaults to None.

Type:

None|float

height

Height of the peak.

Type:

None|float

width

Width of the peak.

Type:

None|float

boarders

Boarders of the peak.

Type:

None|np.ndarray

flags

List of flags of the peak.

Type:

list[Any|str]

analyte

Analyte of the peak.

Type:

None|Analyte

analyte: None | Analyte
area: None | float
boarders: None | ndarray
flags: list[None | str]
height: None | float
ri: None | float
rt: float
width: None | float

pygecko.gc_tools.peak.peak_detection_fid module

class pygecko.gc_tools.peak.peak_detection_fid.Peak_Detection_FID

Bases: object

A class wrapping functions to detect peaks in FID chromatograms.

static baseline_correction(chromatogram: ndarray, analysis_settings: Analysis_Settings) ndarray

Returns a baseline corrected chromatogram.

Parameters:
  • chromatogram (np.ndarray) – Chromatogram to correct.

  • analysis_settings (Analysis_Settings) – Data_Method object containing settings for the baseline correction.

Returns:

Baseline corrected chromatogram.

Return type:

np.ndarray

static pick_peaks(chromatogram: ndarray, analysis_settings: Analysis_Settings) dict[slice(<class 'float'>, <class 'pygecko.gc_tools.peak.fid_peak.FID_Peak'>, None)]

Returns a dictionary of FID peaks.

Parameters:
  • chromatogram (np.ndarray) – Chromatogram to detect peaks in.

  • analysis_settings (Analysis_Settings) – Data_Method object containing settings for the peak detection.

Returns:

FID_Peak]: Dictionary of FID peaks.

Return type:

dict[float

pygecko.gc_tools.peak.peak_detection_ms module

class pygecko.gc_tools.peak.peak_detection_ms.Peak_Detection_MS

Bases: object

A class wrapping functions to detect peaks in MS chromatograms.

static pick_peaks(chromatogram: ndarray, scans: DataFrame, analysis_settings: Analysis_Settings) dict[slice(<class 'float'>, <class 'pygecko.gc_tools.peak.ms_peak.MS_Peak'>, None)]

Returns a dictionary of MS peaks.

Parameters:
  • chromatogram (np.ndarray) – Chromatogram to detect peaks in.

  • scans (pd.DataFrame) – Mass traces of the chromatogram.

  • analysis_settings (Analysis_Settings) – Data_Method object containing settings for the peak detection.

Returns:

MS_Peak]: Dictionary of MS peaks.

Return type:

dict[float

Module contents