PSD2DAgainstFrequency {AFM}R Documentation

Calculate the 2D Power Spectral Density

Description

PSD2DAgainstFrequency returns a data table of PSD 2D values against spatial frequencies

Usage

PSD2DAgainstFrequency(AFMImage, AFMImagePSDAnalysis)

## S4 method for signature 'AFMImage,AFMImagePSDAnalysis'
PSD2DAgainstFrequency(AFMImage, AFMImagePSDAnalysis)

Arguments

AFMImage

an AFMImage to be analysed

AFMImagePSDAnalysis

an AFMImagePSDAnalysis to store PSD analysis results

Value

PSD2DAgainstFrequency returns a data table of frequencies and PSD values

References

Sidick2009, Erkin Sidick "Power Spectral Density Specification and Analysis of Large Optical Surfaces", 2009, "Modeling Aspects in Optical Metrology II, Proc. of SPIE Vol. 7390 73900L-1"

Examples

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

# Calculate Power Spectrum Density in 2D against frequency
data("AFMImageOfNormallyDistributedHeights")
oneAFMImage<-AFMImageOfNormallyDistributedHeights
psd2d<-PSD2DAgainstFrequency(oneAFMImage)
p <- ggplot(data=psd2d)
p <- p + geom_point(aes(freq, PSD, color=type),subset = .(type %in% c("PSD-2D")))
p <- p + geom_line(aes(freq, PSD, color=type),subset = .(type %in% c("PSD-1D")),size=1.1)
p <- p + scale_x_log10()
p <- p + scale_y_log10()
p <- p + ylab("PSD (nm^4)")
p <- p + xlab("Frequency (nm^-1)")
p <- p + ggtitle(basename(oneAFMImage@fullfilename))
p

## End(Not run)

[Package AFM version 2.0 Index]