Learn R Programming

cryst (version 0.1.0)

crystSG: Relative Crystallinity Calculation of X-Ray Diffraction Pattern of Starch by Frost Method

Description

Allow to calculate the relative crystallinity of starch by XRD. The basic concept of Frost approach involves obtaining a smoothed line that separates the amorphous and crystalline starch of an X-ray diffraction pattern. This smoothed line is achieved by applying a Savitzky-Golay smoothing method to the original pattern.

Usage

crystSG(pattern, N = 101, iter = 400, p = 2)

Arguments

pattern
matrix. The matrix of X-ray diffraction pattern. The first row corresponds to Bragg angle 2$\theta$; the second row corresponds to intensity.
N
numeric. N length of the smoothing window (number of variables). Defaults to 101.
iter
numeric. Iter number of iterations. Defaults to 400.
p
numeric. Filter order. Defaults to 2.

Value

An object of class crystSG, which is a list with the following components:

Details

Calculate the relative starch crystallinity of XRD pattern by Frost method.

References

Frost, K., et al. (2009). "Crystallinity and structure of starch using wide angle X-ray scattering." Carbohydrate Polymers 78(3): 543-548.

Examples

Run this code
data(XRD)
# Convert data frame to matrix, select A-type starch
pattern <- as.matrix(t(XRD[, c("Bragg_angle","A")]))
# List of crystallinity components
crs <- crystSG(pattern, N = 101, iter = 400, p = 2)
# Original matrix
original <- crs$original
# Background shape
background <- crs$background
# Curve of the crystalline starch
corrected <- crs$corrected
# Summary calculation of crystallinity
summary <- crs$summary

Run the code above in your browser using DataLab