resample.twotheta: Resample an XRD Pattern

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Resample an XRD pattern along a user-defined twotheta resolution via local spline interpolation.

Usage

1
2
resample.twotheta(twotheta, x, tt.min = min(twotheta), 
tt.max = max(twotheta), new.res = 0.02)

Arguments

twotheta

a vector of twotheta value

x

a vector of diffraction intensities corresponding with twotheta values

tt.min

new minimum twotheta value, defaults to current minimum

tt.max

new maximum twotheta value, defaults to current maximum

new.res

new twotheta resolution, defaults to 0.02

Details

Sometimes XRD patterns are collected at different resolutions, or at a resolution that is too great for full pattern matching. This function can be used to resample patterns to a consistent twotheta resolution, or to decimate massive patterns.

Value

A dataframe with the following columns

twotheta

new sequence of twotheta values

x

resampled diffraction intensities

Author(s)

Dylan E Beaudette

References

http://casoilresource.lawr.ucdavis.edu/

See Also

rruff.sample

Examples

1
2
3
4
5
6
7
8
9
data(rruff.sample)

# resample single pattern
nontronite.resamp <- with(rruff.sample, 
resample.twotheta(twotheta, nontronite, new.res=0.02) )

# plot original vs. resampled pattern
plot(nontronite ~ twotheta, data=rruff.sample, type='l', col='grey')
lines(nontronite.resamp, col='blue')


Search within the aqp package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.