Skip to main content

nuclear data reduction tools

Project description

CI-CD

Nuctools is a python package which was initially intended to assist with reduction of data taken at the RPI linear accelerator, and was significantly influenced by technical expertise and advice from Yaron Danon and other RPI research staff. It includes functions to dead-time correct [^1], group counts data, convert to cps, and convert neutron time-of-flight (TOF) to neutron energy.

Module agl_tools.py has the capability to read list-mode data produced at GELINA. This capability was developed to make data-reduction of GELINA data easier and relied on verification with the original Analysis of Geel List-mode (AGL) code.

The module trans_tools.py was originally designed to reduce data generated by the Comtec MCS6A Multi-stop TDC TOF clock, but will be generalized to accept other formats of raw TOF data. trans_tools.py is designed to reduce all the data necessary to calculate transmission and propagate the associated covariance.

Module sam_tools.py has been made to assist in reading and writing files that are used in the i/o for the code SAMMY. The package nuctools also contains functions to assist in plotting with different styles commonly used at RPI.

Module endf_tools.py provides functions to read and write ENDF/B-VI format pointwise cross section data.


To Install


nuctools can now be installed with pip! Simply type:

python -m pip install nuctools

If you'd rather install from the source found in GitHub:

Note: not recommended! Set version in setup.py, open a terminal and type:

cd ~/
git clone https://github.com/brownjm1968/nuctools.git
cd nuctools
python -m pip install .


To Document


Make sure you have numpydoc and sphinx installed, with pip installer:

python -m pip install numpydoc
python -m pip install sphinx

At the sphinx website http://www.sphinx-doc.org/en/master/usage/quickstart.html, there is a brief walkthrough for first time sphinx users. This is a good place find info on sphinx, however you shouldn't have to create the documentation, it should be good to go when the nuctools is downloaded. The sphinx-quickstart will write a "conf.py" for you, but you should have the properly designed conf.py already. To use the theme I've used for the docs, you need to run python -m pip install sphinx-rtd-theme.

In the terminal navigate to the top nuctools folder and type:

sphinx-apidoc --force -o docs/ nuctools/

where "docs/" is the output directory and "nuctools/" is where the documented modules live. Then navigate inside the terminal to the "docs/" folder where you just generated .rst files and type:

make html

Note:

  • To build the equations properly you must have LaTeX installed
  • Some packages are required for html, and can be installed with pip (e.g. python -m pip install sphinx)

To Test


Make sure you have pytest, with pip:

python -m pip install pytest

Then inside the top nuctools folder type:

pytest

Pytest should automatically go into the "tests/" folder and find python files that start with "test".

[^1]: Danon, Yaron. "Design and Construction of the RPI Enhanced Thermal Neutron Target and Thermal Cross Section Measurements of Rare Earth Isotopes.", Doctoral Thesis, RPI, (1993).

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

nuctools-1.6.0.tar.gz (84.0 kB view details)

Uploaded Source

Built Distribution

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

nuctools-1.6.0-py3-none-any.whl (85.2 kB view details)

Uploaded Python 3

File details

Details for the file nuctools-1.6.0.tar.gz.

File metadata

  • Download URL: nuctools-1.6.0.tar.gz
  • Upload date:
  • Size: 84.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for nuctools-1.6.0.tar.gz
Algorithm Hash digest
SHA256 a1dc8f5ba9a5518c29d076fd2f16ae2386985209ae879c78c98c927bdf15f5e4
MD5 6bb9518a894134074f6c2f7e8271d5a7
BLAKE2b-256 5bf117751a1b52153b7f0c91f7dae0f708dcd30d0a7962b63034e9f18996c483

See more details on using hashes here.

File details

Details for the file nuctools-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: nuctools-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 85.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for nuctools-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d9c00933427ed3a7fb593caef6ac1ed5ffad4670d5e2ab70f481c0a223cebad
MD5 72f75d56d76270be5d7d7f47ccc274af
BLAKE2b-256 e988073c6d0fd53695301cab4d702590dbf379901e491e9a599c87efb9a4f61e

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