Last data update: 2014.03.03

R: Calculate the roughness of the sample against length scale
RoughnessByLengthScaleR Documentation

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)

## S4 method for signature '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

Author(s)

M.Beauvais

Examples

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

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(AFM)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/AFM/RoughnessByLengthScale-methods.Rd_%03d_medium.png", width=480, height=480)
> ### Name: RoughnessByLengthScale
> ### Title: Calculate the roughness of the sample against length scale
> ### Aliases: RoughnessByLengthScale RoughnessByLengthScale,AFMImage-method
> 
> ### ** Examples
> 
> 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
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>