Learn R Programming

AFM (version 1.2.0)

RoughnessByLengthScale: Calculate the roughness of the sample against length scale

Description

The calculation of the roughness against lengthscale is performed throught a FFT 2D calculation, PSD 2D calculation and a meshgrid of frequencies. RoughnessByLengthScale returns a data.table of roughnesses against length scales

Usage

RoughnessByLengthScale(AFMImage, AFMImagePSDAnalysis)

## S3 method for class 'AFMImage':
RoughnessByLengthScale(AFMImage, AFMImagePSDAnalysis)

Arguments

AFMImage
an AFMImage from Atomic Force Microscopy
AFMImagePSDAnalysis
n AFMImagePSDAnalysis to store the setup and results of PSD analysis

Value

  • a data table of lenght scale (r) and roughness values (roughness)
    • roughness: roughnesses
  • r: length scales
  • filename: fullfilename slot of the AFMImage

Examples

Run this code
library(AFM)
library(ggplot2)

data("AFMImageOfNormallyDistributedHeights")
oneAFMImage<-AFMImageOfNormallyDistributedHeights
AFMImagePSDAnalysis<-AFMImagePSDAnalysis()
data<-RoughnessByLengthScale(oneAFMImage, AFMImagePSDAnalysis)
r<-roughness<-filename<-NULL
p1 <- ggplot(data, aes(x=r, y=roughness, colour= basename(filename)))
p1 <- p1 + geom_point()
p1 <- p1 + geom_line()
p1 <- p1 + ylab("roughness (nm)")
p1 <- p1 + xlab("lengthscale (nm)")
p1

Run the code above in your browser using DataLab