sampleAFMImage {AFM}R Documentation

Get a sample of an AFM image.

Description

Random selection of heights to keep in an AFMImage. This function can be used to calculate quickly an approximated variogram of a large image.

Usage

sampleAFMImage(AFMImage, percentage)

Arguments

AFMImage

an AFMImage from Atomic Force Microscopy

percentage

percentage of heights to keep

Details

sampleAFMImage returns a sample of the AFMImage to boost calculation time of variogram

Value

a sample of an AFMImage

Author(s)

M.Beauvais

Examples

## Not run: 
library(AFM)
library(ggplot2)

data(AFMImageOfAluminiumInterface)
anAFMImageSample<-sampleAFMImage(AFMImageOfAluminiumInterface,15)
variogramAnalysis<-AFMImageVariogramAnalysis(sampleFitPercentage=3.43)
avario<-AFM::calculateOmnidirectionalVariogram(AFMImage= anAFMImageSample, 
                                               AFMImageVariogramAnalysis= variogramAnalysis)
dist<-gamma<-NULL
p1 <- ggplot(avario, aes(x=dist, y=gamma))
p1 <- p1 + geom_point()
p1 <- p1 + geom_line()
p1 <- p1 + ylab("semivariance")
p1 <- p1 + xlab("distance (nm)")
p1 <- p1 + ggtitle("Approximation of variogram thanks to sampling")
p1

## End(Not run)


[Package AFM version 2.0 Index]