Learn R Programming

AFM (version 1.0.0)

calculateOmnidirectionalVariogram: Calculate experimental omnidirectional semi-variogram

Description

calculateOmnidirectionalVariogram returns the semivariance calculated for all the directions calculate the experimental omnidirectional variogram of an AFMImage with the variogram function of the gstat package. The experimental semi-variogram is used to fit (find the best sill and range) the theoretical variogram models. With 512*512 images, it takes several minutes to calculate.

Usage

calculateOmnidirectionalVariogram(AFMImage, width)

Arguments

AFMImage
an AFMImage from Atomic Force Microscopy
width
(optional) a distance step for the calculation of the variograms (e.g.: width= integer of (scan Size divided by number of lines)= ceil(1000 / 512) for AFMImageOfAluminiumInterface

Value

  • the semivariance calculated in all the directions

Examples

Run this code
library(AFM)
library(ggplot2)

data(AFMImageOfRegularPeaks)
avario<-AFM::calculateOmnidirectionalVariogram(AFMImageOfRegularPeaks)
dist<-gamma<-NULL
p <- ggplot(avario, aes(x=dist, y=gamma))
p <- p + geom_point()
p <- p + geom_line()
p <- p + ylab("semivariance")
p <- p + xlab("distance (nm)")
p <- p + ggtitle("Experimental semivariogram")
p

Run the code above in your browser using DataLab