Neutron absorption correction calculations for multiple samples with arbitrary shapes
by Jose A. Rodriguez Rivera
by Jose A. Rodriguez Rivera
This algorithm is an enhanced version of the Wüensch and Prewitt algorithm, designed to handle one or multiple samples of arbitrary shapes.
You can find detailed documentation here.
If you use this algorithm in your work, please cite the following paper: "Neutron absorption correction and mean path length calculations for multiple samples with arbitrary shapes: Application to highly absorbing samples on the Multi-Axis Crystal Spectrometer at NIST", by Rodriguez-Rivera, J.A. and Stock, C., J. Appl. Cryst. 58 (2025)
The absorption correction program comes with predefined sample shapes, including cuboids, cylinders, half-cylinders, spheres, and more.
The linear attenuation coefficients for X-rays can be calculated here, and for neutrons here.
The program repositories and documentation are available for both MATLAB and Python at the following links:
Below are some examples of the algorithm implemented in Python on Google Colab, though it may run slowly.
Enjoy!
Copyright © 2025, Jose A. Rodriguez Rivera