close_quant {powdR}R Documentation

Close the phase concentration data within a powdRfps or powdRafps object

Description

close_quant closes the quantitative data within a powdRfps or powdRafps object (derived from fps() and afps(), respectively) by ensuring that the composition sums to 100 percent. See also ?close_quant.powdRfps and ?close_quant.powdRafps.

Usage

close_quant(x, ...)

Arguments

x

A powdRfps or powdRafps object..

...

other arguments

Value

a powdRfps or powdRafps object with components:

tth

a vector of the 2theta scale of the fitted data

fitted

a vector of the fitted XRPD pattern

measured

a vector of the original XRPD measurement (aligned and harmonised)

residuals

a vector of the residuals (fitted vs measured)

phases

a dataframe of the phases used to produce the fitted pattern and their concentrations

phases_grouped

the phases dataframe grouped by phase_name and concentrations summed

obj

named vector of the objective parameters summarising the quality of the fit

weighted_pure_patterns

a dataframe of reference patterns used to produce the fitted pattern. All patterns have been weighted according to the coefficients used in the fit

coefficients

a named vector of coefficients used to produce the fitted pattern

inputs

a list of input arguments used in the function call

Examples

## Not run: 
data(rockjock)
data(rockjock_mixtures)

rockjock_1 <- fps(lib = rockjock,
                  smpl = rockjock_mixtures$Mix1,
                  refs = c("ORDERED_MICROCLINE",
                           "LABRADORITE",
                           "KAOLINITE_DRY_BRANCH",
                           "MONTMORILLONITE_WYO",
                           "ILLITE_1M_RM30",
                           "CORUNDUM"),
                 std = "CORUNDUM",
                 align = 0.3,
                 std_conc = 20)

sum(rockjock_1$phases$phase_percent)

rockjock_1c <- close_quant(rockjock_1)

sum(rockjock_1c$phases$phase_percent)

rockjock_a1 <- afps(lib = rockjock,
                    smpl = rockjock_mixtures$Mix1,
                    std = "CORUNDUM",
                    align = 0.3,
                    lod = 1,
                    std_conc = 20)

sum(rockjock_a1$phases$phase_percent)

rockjock_a1c <- close_quant(rockjock_a1)

sum(rockjock_a1c$phases$phase_percent)


## End(Not run)

[Package powdR version 1.3.0 Index]