Description Usage Arguments Value References Examples
View source: R/afmBaselineCorrection.R
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.7 ContactPoint + 0.3 max(Z)
1 |
afmdata |
An |
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)). |
sinusoidal |
Logical. If TRUE, then a pure harmonic is added to the fit of the baseline in order to remove possible periodical noise. Defaults to FALSE. |
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.
Moreno Flores (2016). Baseline correction of AFM force curves in the force-time representation. Microscopy Research and Technique, 79, (11), pp. 1045-1049.
1 2 3 4 5 6 7 8 9 10 11 12 | AFMcurve <- afmReadJPK("force-save-JPK-2h.txt.gz", path = path.package("afmToolkit"))
ZPointApp <- 6.43e-6
ZPointRet <- 6.45e-6
AFMcurve <- afmBaselineCorrection(AFMcurve,ZPointApp = ZPointApp,ZPointRet = ZPointRet)
plot(AFMcurve)
# Without providing ZPointApp
AFMcurve <- afmReadJPK("force-save-JPK-3h.txt.gz", path = path.package("afmToolkit"))
AFMcurve <- afmContactPoint(AFMcurve,width = 10,mul1 = 1,mul2 = 20,
loessSmooth = FALSE)
AFMcurve <- afmBaselineCorrection(AFMcurve)
plot(AFMcurve)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.