AFM.hhcf: Height-Height Correlation Function

View source: R/AFM.hhcf.R

AFM.hhcfR Documentation

Height-Height Correlation Function

Description

Computes height-height correlation function for and AFM data object; note that any background should be removed first. Since the full computation would be lengthy, but a random subset generally converges to the full result. The 'numIterations' parameter. It should be increased for images with more pixel resolution. With higher resolution, the 'degRes' should also be increased. For each iteration a random pixel and a random angle with resolution 'degRes' is selected. Then, the height-height correlation g(r) for that point is computed, where r stretches from 1 to pixel resolution of the image (scaled by 'r.percentage'). Since the image is square, some locations / angles will not have data for large r.

Publication: http://iopscience.iop.org/article/10.1088/1742-6596/417/1/012069 Title: Height-Height Correlation Function to Determine Grain Size in Iron Phthalocyanine Thin Films Authors: Thomas Gredig, Evan A. Silverstein, Matthew P Byrne Journal: J of Phys: Conf. Ser. Vol 417, p. 012069 (2013).

Usage

AFM.hhcf(
  obj,
  no = 1,
  numIterations = 10000,
  addFit = TRUE,
  dataOnly = FALSE,
  degRes = 100,
  r.percentage = 80,
  xi.percentage = 70,
  verbose = FALSE
)

Arguments

obj

AFMdata object

no

channel number

numIterations

Number of iterations (must be > 1000), but 1e6 recommended

addFit

if TRUE a fit is added to the data

dataOnly

if TRUE returns data frame, otherwise returns a graph

degRes

resolution of angle, the higher the better, should be >100, 1000 is also good, but takes more time

r.percentage

a number from 10 to 100 representing the distance to compute, since the image is square, there are not as many points that are separated by the full length, 80 is a good value, if there is no fit, the value can be reduced to 70 or 60.

xi.percentage

a number from 10 to 100 representing where correlation length could be found from maximum (used for fitting)

verbose

output time if TRUE

Value

graph or data frame with g(r) and $num indicating number of computations used for r

Author(s)

Thomas Gredig

Examples

filename = AFM.getSampleImages(type='tiff')
a = AFM.import(filename)
a = AFM.flatten(a)
r = AFM.hhcf(a, numIterations = 5e5, dataOnly = TRUE)
head(r)                          # output HHCF data
AFM.hhcf(a, numIterations = 5e5)    # output graph


thomasgredig/nanoscopeAFM documentation built on Jan. 4, 2023, 1:33 p.m.