README.md

DOI

nanoscopeAFM

Imports and analyzes Atomic Force Microsocpy (AFM) images; currently four types are supported, images from Nanosurf (.nid), Bruker / Veeco Multimode Nanoscope III (.000), Park AFM images (.tiff), and Asylum Research AFM Igor images (.ibw).

This package provides three main advantages:

Installation

Using R, install the latest release from the GitHub repository:

# install.packages("devtools")
devtools::install_github("thomasgredig/nanoscopeAFM")

Data Classes

Several new data structures (S3 and S4) are introduced:

Usage

There is a complete description for nanoscopeAFM library functions; examples in the Article Vignettes are also available.

AFM data

Use this package to generate AFMdata S4 data objects, which can be used to quickly display AFM data and also process AFM data. Here are some examples:

Creating an AFMdata data object, then output a graph and output a summary of characteristics:

fileAFM = AFM.getSampleImages(type='ibw')[1]
d = AFM.import(fileAFM)
class(d)
plot(d)
print(d)
summary(d)

More information on graphing AFM images are found in the AFM Image Graph Type Vignette.

AFM info

Use the AFMinfo() function to obtain information about the AFM image. The information depends on the file format, but some items are common for all images, see names(h), such as widthPixel, scanRate.Hz, etc.; others can be obtained with AFMinfo.item().

afmInfo = AFMinfo(AFM.getSampleImages(type='ibw'))
AFMinfo.item(afmInfo, 'ScanSpeed')

The AFM image information can also be exported to a file.

write.csv(afmInfo$data, file='AFMinfo.csv', row.names = FALSE)

AFM math

Some properties about the image are included in the AFMdata object, but others - like the roughness - need to be computed. In order to obtain, the computed values, use the AFMmath object, which is generated from the AFMdata class.

filename = AFM.getSampleImages(type='ibw')
afmMath = AFM.math.params(AFM.import(filename))
summary(afmMath)
afmMath$Ra

Image Analysis

Several functions are available for image analysis, including:

Example to extract image roughness for a series of images:

file.list = AFM.getSampleImages()
Ra = c()
for(filename in file.list) {
  Ra = c(Ra, AFM.math.params(AFM.import(filename))$Ra)
}
data.frame(
  name = basename(file.list),
  Ra
)


thomasgredig/nanoscopeAFM documentation built on Jan. 4, 2023, 1:33 p.m.