atmosphericradiationdoseandflux
A calculation toolkit for determining radiation dose rates in the atmosphere due to an incoming spectrum of particles from space.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.9%) to scientific vocabulary
Repository
A calculation toolkit for determining radiation dose rates in the atmosphere due to an incoming spectrum of particles from space.
Basic Info
- Host: GitHub
- Owner: ssc-maire
- License: other
- Language: Python
- Default Branch: main
- Homepage: https://pypi.org/project/atmosphericRadiationDoseAndFlux/
- Size: 284 KB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 14
Metadata Files
README.md
atmosphericRadiationDoseAndFlux
A calculation toolkit for determining radiation dose rates in the atmosphere due to an incoming spectrum of particles from space.
Installation
After cloning this directory to your computer, install this package from the cloned directory using the command
sudo pip3 install .
or alternatively,
sudo python3 setup.py install
Usage
Calculating dose rates from an input spectrum as a function
Radiation dose rates that aircraft experience are dependent on the incoming radiation spectrum from space for each incoming particle type, altitude above ground level and the 'vertical cut-off rigidity' (which is a function of latitude and longitude).
You can directly calculate radiation dose rates from an incoming rigidity spectrum using the calculate_from_rigidity_spec function.
calculate_from_rigidity_spec takes in an input rigidity specrum as a Python function, as well as an altitude or a list of altitudes,
and outputs the dose rates aircraft will experience at that altitude. You can optionally also include a vertical cut-off rigidity (the
default vertical cut-off rigidity is set to 0.0 GV).
The usage of calculate_from_rigidity_spec is:
calculate_from_rigidity_spec(rigiditySpectrum:Function,
altitudesInkm:float|list,
particleName="proton",
inputRigidityBins=None,
verticalCutOffRigidity=0.0)
where the input parameters are:
| parameter | description |
| --------- | ----------- |
| rigiditySpectrum | callable function: must be specified in units of particles/cm2/sr/GV/s, and as a function of rigidity in GV. rigiditySpectrum can be specified as any callable single argument function, representing an incoming particle spectrum with any distribution. You may wish to use Python's lambda function to do this.
| altitudesInkm | float or list: if specified as a list, calculations will be performed in a loop over each of the specified altitudes and returned in the output Pandas DataFrame.
| particleName | str: must be either "proton" or "alpha". Currently using the setting "alpha" actually calculates dose rates associated with all particles species with atomic numbers 2 and greater rather than just for alpha particles. Default = "proton".
| inputRigidityBins | list: an optional input parameter, do not use unless experienced with using this library. Setting this parameter to a value overrides this module's internal application of the rigiditySpectrum parameter to an internal default set of energy bins for the purpose of calculating dose rates and fluxes. |
| verticalCutOffRigidity | float: units of gigavolts (GV). Default = 0.0.
For example, after importing the module using
from atmosphericRadiationDoseAndFlux import doseAndFluxCalculator as DAFcalc
and defining an input rigidity spectrum as a function;
```
testA = 2.77578789
testmu = 2.82874076
testRigiditySpectrum = lambda x:testA(x*(-testmu))
running
DAFcalc.calculatefromrigidity_spec(testRigiditySpectrum,
particleName="proton",altitudesInkm=18.5928, verticalCutOffRigidity=0.0)
will return
altitude (km) edose adose dosee tn1 tn2 \
0 18.5928 62.219856 41.774429 34.169926 12.323553 7.639987
tn3 SEU SEL
0 5.108492 7.639987e-13 7.639987e-08
``
as a [Pandas DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html). HeretestRigiditySpectrumis a power law distribution in rigidity, with a spectral index oftestmuand a value at x = 1 oftestA`.
The outputted dose rate (or flux) labels represent the following dose rate/flux types:
|label | dose rate/flux type| |------|--------------------| |adose| ambient dose equivalent in µSv/hr | |edose| effective dose in µSv/hr | |dosee| dose equivalent in µSv/hr | |tn1| >1 MeV neutron flux, in n/cm2/s | |tn2| >10 MeV neutron flux, in n/cm2/s | |tn3| >60 MeV neutron flux, in n/cm2/s | |SEU| single event upset rate for an SRAM device in upsets/second/bit | |SEL| single event latch-up rate for an SRAM device in latch-ups/second/device |
Dose rates can also be generated from an energy spectrum using calculate_from_energy_spec, which has the same syntax as calculate_from_rigidity_spec,
but where the incoming spectrum (now in units of particles/cm2/sr/MeV/s) must be specified in terms of energy in MeV instead of rigidity and the optional inputRigidityBins parameter is instead inputEnergyBins in MeV.
Calculating dose rates from an input spectrum as an array
While it is recommended that the user uses functions as the method of inputting spectra, you can also use the calculate_from_rigidity_spec_array and calculate_from_energy_spec_array functions to calculate dose rates directly from an array of spectral flux values and energy bins.
The general syntax for inputs to these are:
calculate_from_rigidity_spec_array(
inputRigidityBins:list,
inputFluxesGV:list,
altitudesInkm:list,
particleName="proton",
verticalCutOffRigidity = 0.0)
where inputRigidityBins is the full list of rigidity bin edge locations in GV that the input fluxes specified by inputFluxesGV are specified for. As inputRigidityBins represent the bin edge locations for inputFluxesGV, the length of inputRigidityBins must therefore be exactly 1 greater than the length of inputFluxesGV.
calculate_from_energy_spec_array has a nearly identical syntax to calculate_from_rigidity_spec_array, where the only difference is that the first argument of calculate_from_energy_spec_array must be specified in MeV instead of GV, and the second argument is the energy spectrum in particles/cm2/sr/MeV/s instead of the rigidity spectrum in particles/cm2/sr/GV/s.
Owner
- Name: Surrey Space Centre
- Login: ssc-maire
- Kind: organization
- Email: maire+@surrey.ac.uk
- Website: www.maire.uk
- Repositories: 1
- Profile: https://github.com/ssc-maire
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below. The project homepage can be found at https://github.com/ssc-maire/DoseAndFluxCalculator ." authors: - alias: "Space Environment and Protection Group, University of Surrey" title: "DoseAndFluxCalculator" type: software version: 1.0.9 doi: 10.5281/zenodo.10992476 date-released: 2024-04-18 url: "https://github.com/ssc-maire/DoseAndFluxCalculator" repository-code: "https://github.com/ssc-maire/DoseAndFluxCalculator" repository-artifact: "https://pypi.org/project/atmosphericRadiationDoseAndFlux/" contact: - family-names: "Lei" given-names: "Fan" orcid: "https://orcid.org/0000-0002-4365-988X" affiliation: "University of Surrey" email: "f.lei@surrey.ac.uk"
GitHub Events
Total
- Release event: 1
- Push event: 1
- Pull request event: 2
- Fork event: 1
- Create event: 1
Last Year
- Release event: 1
- Push event: 1
- Pull request event: 2
- Fork event: 1
- Create event: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 7 days
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 7 days
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- ChrisSWDavis (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 164 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 10
- Total maintainers: 1
pypi.org: atmosphericradiationdoseandflux
Python library for calculating doses and fluxes at a particular altitude given an input spectrum
- Homepage: https://github.com/ssc-maire/DoseAndFluxCalculator
- Documentation: https://atmosphericradiationdoseandflux.readthedocs.io/
- License: CC BY-NC-SA 4.0
-
Latest release: 1.0.12
published about 1 year ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v3 composite
- pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
- ParticleRigidityCalculationTools >=1.5
- importlib_resources >=5.10.0
- numpy >=1.21.6
- pandas >=1.3.5
- setuptools >=45.2.0
- actions/checkout v3 composite
- actions/setup-python v3 composite