Skip to main content

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", Atomic Data and Nuclear Data Tables 170 (2026) 101807; https://doi.org/10.1016/j.adt.2026.101807

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.1.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.1-py3-none-any.whl (119.2 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: westcott-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ef93d25d0bfd745a1821e9f6fae7978299ae85078e26babf83e4672b3fd6a891
MD5 9b8494d3a516ff429b4b87c1925564a2
BLAKE2b-256 9c195a8503b05b7bf5a9f5f7330973781d60e1b148c7d4ad40814089239b3a95

See more details on using hashes here.

File details

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

File metadata

  • Download URL: westcott-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3d717282370bcd4436a6a734c3106fd051a05c43e97ee7e3699318697924828d
MD5 b28c64398f12090c77c8cd72799cb565
BLAKE2b-256 668039840a8d7591a267f36d990360fc7b3c6048766aee4a55963ab4dea62278

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page