Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Python implementaion of several NIST calculator

Project description

NIST calculators

My python implementaion of some NIST calculator.

Now implemented:

  • NIST XCOM --- photon cross-sections database
  • NIST_STAR --- stopping-power & range tables for electrons, protons, and helium ions

Installation

pip install nist-calculators

Usage

XCOM

See tutorial.

Example of usage:

import xcom

data = xcom.calculate_cross_section("He", [1e6, 2e6, 5e6]) # Energy in eV
# or
import numpy as np
energy = np.array([1e6, 2e6, 5e6])
Z = 2
data = xcom.calculate_cross_section(Z, energy)

ESTAR

See tutorial.

Example of usage:

from star import electron
hydrogen = electron.PredefinedMaterials.HYDROGEN
data = electron.calculate_stopping_power(hydrogen, energy=[1e2,2e2,3e2]) # Energy in MeV

PSTAR

See tutorial.

Example of usage:

from star import ProtonSTARCalculator, ProtonMaterials

material = ProtonMaterials.BERYLLIUM
calculator = ProtonSTARCalculator(material)
total = calculator.calculate_total_stopping_powers( [10, 20, 50]) # Energy in MeV

ASTAR

See tutorial.

Example of usage:

from star import AlphaSTARCalculator, AlphaMaterials

material = AlphaMaterials.BERYLLIUM
calculator = AlphaSTARCalculator(material)
total = calculator.calculate_total_stopping_powers( [10, 20, 50]) # Energy in MeV

Project details


Download files

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

Files for nist-calculators, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size nist_calculators-0.0.5-py3-none-any.whl (1.3 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size nist-calculators-0.0.5.tar.gz (1.3 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page