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:
Using R
, install the latest release from the GitHub repository:
# install.packages("devtools")
devtools::install_github("thomasgredig/nanoscopeAFM")
Several new data structures (S3 and S4) are introduced:
AFMdata
- S4 class that contains all AFM images from a fileAFMinfo
- S3 class that contains all parameters of the AFM images, such as vibration frequency, etc.AFMmath
- S3 class that contains computed parameters, such as roughness, etc. about a particular AFM imageThere is a complete description for nanoscopeAFM library functions; examples in the Article Vignettes are also available.
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.
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)
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
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
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.