Skip to main content

Calculations of Westcott g-factors.

Project description

Westcott g-factor

Python package for calculating Westcott g-factors, which adjust thermal-neutron capture cross sections for non-1/v behavior at low energies. These are important in Neutron Activation Analysis (NAA) and Prompt Gamma-ray Activation Analysis (PGAA) when measuring nuclei that have low-energy resonances in their cross sections. Code calculates g-factors for Maxwellian neutron energy distributions and individual neutron source spectra, when available. A reference article describing this project is available on the arXiv [1].

Building and installation

This project can be built and installed by running the pip command in a Unix terminal:

$ pip install westcott

Alternatively, because this project is also maintained on GitHub, it can be installed by cloning the repository and running the installation script at the terminal command line of the project directory as described in README on the landing page.

Testing

A suite of Python modules containing unit tests has been developed for this project. These unit tests are distributed with the project on GitHub. This project has been successfully built and tested against multiple virtual Python environments from Python-3.6 to Python-3.13. To run the suite and ensure they work with the local Python environment, run tox in the project directory where the tox.ini file is also located:

$ tox -r

This project has the following Python-package dependencies: numpy, scipy, pandas, and pytest. The session is automatically started after building against the required Python environment.

Running the software

Following installation, the westcott scripts can be ran from any location by importing the library and making an instance of the Westcott class:

$ python
>>> import westcott
>>> gw = westcott.Westcott()

Various Jupyter Notebooks are also distributed with the project on GitHub. These Jupyter Notebooks can be used to demonstrate workflows and methods for interacting with the functionality available to the library.

Docstrings

All westcott classes and methods have supporting docstrings. Please refer to the individual dosctrings for more information on any particular function including how to use it. The dosctrings for each method generally have the following structure:

  • A short explanation of the function.
  • A list and description of arguments that need to be passed to the function.
  • The return value of the function.
  • Exceptions that may be raised.
  • An example(s) invoking use of the function.

To retrieve a list of all available methods simply execute the following command in a Python interpreter:

>>> help(gw)

Or, to retrieve the docstring for a particular method, e.g., the callable gw_Maxwellian to calculate the g-factor assuming a Maxwellian spectrum:

>>> help(gw.gw_Maxwellian)

References

[1] D.A. Matters, A.M. Hurst, T. Kawano, "Westcott g Factors Extended to Arbitrary Neutron Energy Spectra", https://doi.org/10.48550/arXiv.2602.05995

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

westcott-1.0.0.tar.gz (118.8 MB view details)

Uploaded Source

Built Distribution

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

westcott-1.0.0-py3-none-any.whl (119.2 MB view details)

Uploaded Python 3

File details

Details for the file westcott-1.0.0.tar.gz.

File metadata

  • Download URL: westcott-1.0.0.tar.gz
  • Upload date:
  • Size: 118.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for westcott-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8bdc677305e33ed5a0ad2c7c3126e8307658b815befbd054632f989a9d67ab0d
MD5 fb8d1638cf0010a2d5ffe45c824ecd9c
BLAKE2b-256 ea098b341cad9e81d1399257280c8b7a7eac35c7b2428737423ffda334d1322f

See more details on using hashes here.

File details

Details for the file westcott-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: westcott-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 119.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for westcott-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30c4e475ed6d2954674503b6c65498cdc6afbac36603fcf0671d1af368f7a14b
MD5 37eef9cb567ac942ed22d38113797cd8
BLAKE2b-256 385bf34850c285e5ed06c04fdaed43688493ddfda057b17588575009d58daa6e

See more details on using hashes here.

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