A Python library for neutron Bragg edge analysis used in neutron imaging research at Oak Ridge National Laboratory.
Bragg edges occur at specific wavelengths in neutron transmission spectra due to crystallographic diffraction. This library calculates:
- Bragg edge positions for various materials
- d-spacings from crystal structure
- Lattice parameters from experimental data
- Wavelength/TOF conversions
pip install neutronbraggedgefrom neutronbraggedge.braggedge import BraggEdge
# Get Bragg edges for Iron
handler = BraggEdge(material='Fe', number_of_bragg_edges=4)
print(handler.bragg_edges['Fe'])
# [4.0537, 2.8664, 2.3404, 2.0269]
print(handler.metadata['crystal_structure']['Fe'])
# 'BCC'Full documentation is available at braggedge.readthedocs.io.
We use Pixi for environment management:
git clone https://github.com/ornlneutronimaging/BraggEdge.git
cd BraggEdge
pixi install
pixi run testSee CONTRIBUTING.md for development guidelines.
BSD-3-Clause. See LICENSE for details.