xray-analysis
v0.4.0
Published
X-ray analysis package for treatment of an x-ray rocking curve (XRC) and an x-ray diffraction (XRD) measurement
Downloads
119
Maintainers
Readme
xray-analysis
X-ray analysis package for treatment of an x-ray rocking curve (XRC) and an x-ray diffraction (XRD) measurement
Installation
$ npm i xray-analysis
Usage
export { fromXRD } from 'xray-analysis';
const content = readFileSync(join(__dirname, 'XRD.csv'), 'latin1');
const analysis = fromXRay(content);
const measurement = analysis.measurements[0];
const peaks = measurement.meta?.peaks.map(({ x, y, shape }) => ({
x, // x-position
y, // intensity
width: shape.fwhm, // Full width at half maximum
}));