Performs a baseline correction to an AFM F-z curve
Performs a baseline correction to an AFM F-z curve
This function performs the baseline correction to an AFM F-z curve within an afmdata structure.
It substracts a best fit line to the cuve: for the approach and contact segments, it fits a line to the approach curve points where for which |z|>ZPointApp and for the retract segment, it fits a line to the retract curve where |z|> ZpointRet.
If no ZPointApp is given and the contact point has been already estimated (via afmContactPoint() function), then it is found as [REMOVE_ME]ZPointApp=0.7ContactPoint+0.3max(Z)[REMOVEME2]
ZPointApp: Point in the approach segment of the curve that defines the approach baseline
ZPointRet: Point in the retract segment of the curves that defines the retract baseline
fitpause: Behaviour for the baseline correction at the pause segment: if "approach" (default), the pause segment is correted using the best line fit done on the approach segment, if "retract" the best line fit of the retract segment is used, if "none", no baseline correction is done on the pause segment.
vsTime: Logical. If TRUE then the baseline correction is performed following the Force vs time approach described by S. Moreno-Flores (Moreno Flores (2016) ).
Returns
afmdata An afmdata structure identical to the one in the input, but with an additional ForceCorrected column in the data dataframe of the afmdata structure.
Description
This function performs the baseline correction to an AFM F-z curve within an afmdata structure.
It substracts a best fit line to the cuve: for the approach and contact segments, it fits a line to the approach curve points where for which |z|>ZPointApp and for the retract segment, it fits a line to the retract curve where |z|> ZpointRet.
If no ZPointApp is given and the contact point has been already estimated (via afmContactPoint() function), then it is found as
ZPointApp=0.7ContactPoint+0.3max(Z)
References
Moreno Flores (2016). Baseline correction of AFM force curves in the force-time representation. Microscopy Research and Technique, 79, (11), pp. 1045-1049.