MassCalibrate: Performs a mass calibration.

View source: R/RcppExports.R

MassCalibrateR Documentation

Performs a mass calibration.

Description

MassCalibrate performs a mass calibration for a list of mass/sample index/weight values and for a given calibration mode.

Usage

MassCalibrate(massCalibMode, mass, tof, weight = NULL)

Arguments

massCalibMode

Mass calibration function to use. See below.

mass

Vector of mass/charge values.

tof

Vector of sample indices (of same length as mass).

weight

Vector of weights (if NULL (default) all weights are set equal).

Details

massCalibMode Mass calibration function
0 i = p_1 \sqrt(m) + p_2
1 i = p_1/\sqrt(m) + p_2
2 i = p_1 m^{p_3} + p_2
3 i = p_1 \sqrt(m) + p_2 + p_3 (m - p_4)^2
4 i = p_1 \sqrt(m) + p_2 + p_3 m^2 + p_4 m + p_5
5 m = p_1 i^2 + p_2 i + p_3

Note: Modes 3 and 4 are flawed. Don't use them. In mode 3 the fit does not converge well, because of a bug (parameters not correctly initialized). Mode 4 is two sequential fits, first mode 0, then a quadratic fit to the residuals, which is an inferior implementation of mode 3. Mode 1 is for FTMS data.

Value

Vector of calibration parameters.


pasturm/TofDaqR documentation built on March 29, 2024, 12:10 a.m.