powdRlib {powdR} | R Documentation |
Create an XRPD reference library
Description
A constructor function for creating a powdRlib
object from two tables of
data. The resulting powdRlib
object is required when
using fps
or afps
.
Usage
powdRlib(xrd_table, phases_table, check_names)
Arguments
xrd_table |
A data frame of the count intensities of the XRPD reference patterns, all scaled to same maximum intensity, with their 2theta axis as the first column. |
phases_table |
A data frame of the required data (phase ID, phase name, and reference intensity ratio) for each reference pattern. |
check_names |
A logical argument defining whether the column names in the data
supplied in |
Value
a powdRlib object with components:
xrd |
a data frame of the count intensities of the reference patterns |
tth |
a vector of the 2theta axis |
phases |
a 3 column data frame of the IDs, names and reference intensity ratios of the reference pattern |
Examples
#load an example xrd_table
data(minerals_xrd)
#load an example phases_table
data(minerals_phases)
#Create a reference library object
xrd_lib <- powdRlib(xrd_table = minerals_xrd,
phases_table = minerals_phases)