H5SetMassCalib2Ex: Changes the global mass calibration in the data file.

View source: R/RcppExports.R

H5SetMassCalib2ExR Documentation

Changes the global mass calibration in the data file.

Description

H5SetMassCalib2Ex changes the global mass calibration in the data file. If nbrParams is 0, the calibration parameters will be determined from mass, tof and weight. If calibration parameters and calibration points are provided, the calibration is given by the parameters (no sanity check is performed whether the points yield the same parameters). Labels to identify compound names/formulas used for calibration have a maximum length of 255 characters.

Usage

H5SetMassCalib2Ex(Filename, mode, nbrParams, p, mass, tof, weight, label)

Arguments

Filename

Path/filename of the HDF5 file.

mode

Mass calibration function to use.

nbrParams

Number of mass calibration parameters.

p

Vector with mass calibration parameters.

mass

Vector with mass of the calibration points.

tof

Vector with TOF sample index of the calibration points.

weight

Vector with weight of the calibration points.

label

Vector with labels/names/sum formula of the calibration points.

Details

mode 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.


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