afmdata: An afmdata object. It should be a valid afmdata object upon which the Contact Point, the baseline correction and the Zero Force Point and the Indentation must have been calculated first (using functions afmContactPoint(), afmBaselineCorrection(), afmZeroPointSlope(), and afmIndentation())
thickness: Thickness (in m) of the surface. The Force - Indentation fit will be done for values of the Indentation variable smaller than the thickness. If no value is given, it will be done for all values in the curve for which the Indentation is negative.
model: Contact mechanics model to be used. Currently only Hertz's pure elastic model is available.
geometry: Geometry of the tip. Currently only pyramidal (default) and paraboloid geometries are implemented.
silent: Logical value. If FALSE it prints the fit model summary (via summary.lm()). Default value is TRUE
params: A list containing different parameters of the model: e.g. nu (Poisson's ratio) or alpha (internal angle, in degrees, of the pyramidal tip) or R (tip radius, in the paraboloid geometry)
Returns
An afmdata class variable which will consist on the original input afmdata variable plus a new list named YoungModulus with the following fields:
YoungModulus The Young's modulus value (in Pa).
fitYM The Force vs Indentation^2 fit as an lm object.