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

Metadata

Release files for westcott 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for westcott 1.0.1
File Size Uploaded Provenance
westcott-1.0.1.tar.gz 118.8 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for westcott 1.0.1
File Interpreter ABI Platform
westcott-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 238.0 MB

Release files / westcott-1.0.1.tar.gz

Download URL westcott-1.0.1.tar.gz
Size 118.8 MB
Tags Source
SHA-256 checksum
How to use checksums
ef93d25d0bfd745a1821e9f6fae7978299ae85078e26babf83e4672b3fd6a891
BLAKE2b-256 checksum
How to use checksums
9c195a8503b05b7bf5a9f5f7330973781d60e1b148c7d4ad40814089239b3a95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / westcott-1.0.1-py3-none-any.whl

Download URL westcott-1.0.1-py3-none-any.whl
Size 119.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
3d717282370bcd4436a6a734c3106fd051a05c43e97ee7e3699318697924828d
BLAKE2b-256 checksum
How to use checksums
668039840a8d7591a267f36d990360fc7b3c6048766aee4a55963ab4dea62278
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for westcott 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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