afmZeroPointSlope {afmToolkit} | R Documentation |
Zero Force Point and Slope
Description
This function finds the point of zero force (real contact point) and the slope of the contact part of the Force-Distance curve.
Usage
afmZeroPointSlope(afmdata, fstar = 0, segment = c("approach", "retract"))
Arguments
afmdata |
An |
fstar |
Value such that fstar * sd is to be considered as zero Force, where sd is the standard deviation of Force at the basline. It takes fstar = 0 as default value, meaning that zero force is actually zero. |
segment |
The segment on which everything is calculated. |
Value
An afmdata
class variable which will consist on the original input
afmdata
variable plus a new list named Slopes
with the following
fields: Z0Point
: Point of zero force. Slope
: Slope of the best fit line
in the contact part of the Force-Distance curve.
Examples
data <- afmReadJPK("force-save-JPK-2h.txt.gz", path = path.package("afmToolkit"))
data <- afmContactPoint(data, width = 20, mul1 = 1, mul2 = 20)
data <- afmDetachPoint(data, width = 40, mul1 = 3, mul2 = 40)
data <- afmBaselineCorrection(data)
data <- afmZeroPointSlope(data, segment = "approach")
## Not run:
plot(data, segment = "approach") + geom_vline(xintercept = data$Slopes$Z0Point, lty = 2)
## End(Not run)