pyms.Simulator
Table of Contents
Provides functions for simulation of GCMS data.
Functions:
|
Adds noise to an IntensityMatrix object. |
|
Adds noise drawn from a normal distribution with constant scale to an ion chromatogram. |
|
Adds noise to an IntensityMatrix object. |
|
Adds noise to an ic. |
|
Returns a simulated ion chromatogram of a pure component. |
|
Calculates a point on a gaussian density function. |
|
Simulator of GCMS data. |
-
add_gaussc_noise(im, scale)[source] Adds noise to an IntensityMatrix object.
- Parameters
im (
BaseIntensityMatrix) – the intensity matrix objectscale (
float) – the scale of the normal distribution from which the noise is drawn
- Author
Sean O’Callaghan
-
add_gaussc_noise_ic(ic, scale)[source] Adds noise drawn from a normal distribution with constant scale to an ion chromatogram.
- Parameters
ic (
IonChromatogram) – The ion Chromatogram.scale (
float) – The scale of the normal distribution.
- Author
Sean O’Callaghan
-
add_gaussv_noise(im, scale, cutoff, prop)[source] Adds noise to an IntensityMatrix object.
- Parameters
im (
BaseIntensityMatrix) – the intensity matrix objectscale (
int) – the scale of the normal distribution from which the noise is drawncutoff (
int) – The level below which the intensity of the ic at that point has no effect on the scale of the noise distributionprop (
float) – For intensity values above the cutoff, the scale is multiplied by the ic value multiplied byprop.
- Author
Sean O’Callaghan
-
add_gaussv_noise_ic(ic, scale, cutoff, prop)[source] Adds noise to an ic. The noise value is drawn from a normal distribution, the scale of this distribution depends on the value of the ic at the point where the noise is being added
- Parameters
ic (
IonChromatogram) – The IonChromatogramscale (
int) – The scale of the normal distribution for ic values below the cutoff is modified for values above the cutoffcutoff (
int) – The level below which the intensity of the ic at that point has no effect on the scale of the noise distributionprop (
float) – For ic values above the cutoff, the scale is multiplied by the ic value multiplied byprop.
- Author
Sean O’Callaghan
-
chromatogram(n_scan, x_zero, sigma, peak_scale)[source] Returns a simulated ion chromatogram of a pure component.
The ion chromatogram contains a single gaussian peak.
-
gaussian(point, mean, sigma, scale)[source] Calculates a point on a gaussian density function.
f = s*exp(-((x-x0)^2)/(2*w^2))