Skip to content

Repository files navigation

CI codecov DOI

Bragg Edge Modeling

This python package provides tools to model and help analyze neutron Bragg Edge imaging data.

Main functionality: given lattice structure of a material and optionally a texture model and an instrument beam model, calculate neutron Bragg Edge spectrum as a function of neutron wavelength.

Features

  • Calculation of basic Bragg Edge spectrum from crystal structure specification, assuming an isotropic powder sample, and accounting for various contributions to neutron scattering including, for example, diffraction and inelastic scattering (using incoherent approximation)
  • Modeling of texture:
    • March Dollase
  • Modeling of peak profile:
    • Jorgensen model
  • Flexible design to allow future extension to texture and peak profile models
  • Allow easy fitting to measured Bragg Edge data

Installation

braggedgemodeling requires Python 3.12+.

# from PyPI
pip install braggedgemodeling

# or from conda (our anaconda.org neutronimaging channel)
conda install neutronimaging::braggedgemodeling

The distribution is named braggedgemodeling (the short name bem is already taken on PyPI) and the import package is also braggedgemodeling. Code written against the old bem module can add a one-line alias as a drop-in stop-gap:

import braggedgemodeling as bem

For development, the project uses pixi:

git clone https://github.com/ornlneutronimaging/braggedgemodeling.git
cd braggedgemodeling
pixi run test   # build the environment and run the test suite

Documentation

Please refer to https://braggedge.readthedocs.io for documentation on installation, usage, and API.

Community guidelines

How to contribute

Please clone the repository, make changes and make a pull request.

How to report issues

Please use the github issues to report issues or bug reports.

Support

Please either use the github issues to ask for support, or contact the authors directly using email.

Known problems

  • Debye temperatures are listed in a table, which is missing data for some elements. However, users can provide their own table in a configuration file.

About

Model and analyze neutron Bragg-edge imaging spectra

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages