powdRlib: Create an XRPD reference library

Description Usage Arguments Value Examples

View source: R/create_library.R

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

1
powdRlib(xrd_table, phases_table)

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.

Value

a list with components:

xrd

a data frame of 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

1
2
3
4
5
6
7
8
#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)

benmbutler/powdR documentation built on Sept. 16, 2020, 5:03 a.m.