Learn R Programming

AFM (version 1.0.0)

calculateDirectionalVariograms: Calculate experimental directional semi-variograms

Description

calculate four experimental directional variograms of an AFMImage with the variogram function of the gstat package. The directional semi-variogram can be used to check the isotropy of the sample. Note: The sample will be isotropic if the slopes of the four variograms are similar.

Usage

calculateDirectionalVariograms(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

  • Four directional variograms

Details

calculateDirectionalVariograms returns the directional variograms

Examples

Run this code
library(AFM)
library(ggplot2)

data(AFMImageOfRegularPeaks)
varios<-AFM::calculateDirectionalVariograms(AFMImageOfRegularPeaks, 1)
dist<-gamma<-NULL
p <- ggplot(varios, aes(x=dist, y=gamma,
                        color= as.factor(dir.hor),
                        shape=as.factor(dir.hor)))
p <- p + expand_limits(y = 0)
p <- p + geom_point()
p <- p + geom_line()
p <- p + ylab("semivariance (nm^2)")
p <- p + xlab("distance (nm)")
p <- p + ggtitle("Directional")
p

Run the code above in your browser using DataLab