Skip to main content

Bragg Edge modeling

Project description

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 (anaconda.org neutronimaging channel)
conda install -c conda-forge -c 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://ornlneutronimaging.github.io/braggedgemodeling 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

braggedgemodeling-0.2.0rc1.tar.gz (28.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

braggedgemodeling-0.2.0rc1-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file braggedgemodeling-0.2.0rc1.tar.gz.

File metadata

  • Download URL: braggedgemodeling-0.2.0rc1.tar.gz
  • Upload date:
  • Size: 28.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for braggedgemodeling-0.2.0rc1.tar.gz
Algorithm Hash digest
SHA256 6fa44d53aa21d2c753acf6969f6e95d193eda19a64dbf758c117188ae716e94d
MD5 70bb58ede86908f17cf79c7d06f5dda9
BLAKE2b-256 b18e94cb735fd34570f4cb37f51ad70b9d2d02592269f98fcbf2e1c483a6669e

See more details on using hashes here.

Provenance

The following attestation bundles were made for braggedgemodeling-0.2.0rc1.tar.gz:

Publisher: publish.yml on ornlneutronimaging/braggedgemodeling

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file braggedgemodeling-0.2.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for braggedgemodeling-0.2.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 90308c2332f22dc34d74124c1ceeb99bb62939c9733e1f07b97d49a5b37c615c
MD5 8c53a4b3429bac62fb77562233b72ce9
BLAKE2b-256 21304fb97e1f75e7224e2ca9d56d56144bcbf0c4ddcb23a0fbd4b011dca21e1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for braggedgemodeling-0.2.0rc1-py3-none-any.whl:

Publisher: publish.yml on ornlneutronimaging/braggedgemodeling

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page