Skip to content

Commit 00b511c

Browse files
authored
Update README.md
1 parent 95140aa commit 00b511c

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ If you use this software for scientific research, please reference the above pap
1212

1313
You can either install directly from PyPi using
1414

15-
```
15+
```shell
1616
pip install CosRayModifiedISO
1717
```
1818

1919
Or clone CosRayModifiedISO from https://github.com/ssc-maire/CosRayModifiedISO, and then from the cloned directory, run
2020

21-
```
21+
```shell
2222
sudo python setup.py install
2323
```
2424

2525
# Usage
2626

2727
to import this module, use
2828

29-
```
29+
```python
3030
from CosRayModifiedISO import CosRayModifiedISO
3131
```
3232

@@ -61,12 +61,12 @@ Unit description:
6161

6262
to get a single differential flux value for a particle value of solar modulation, and for a particular particle with a given atomic number and kinetic energy
6363
(or range of kinetic energies), the appropriate method for `CosRayModifiedISO` is
64-
```
64+
```python
6565
CosRayModifiedISO.getEnergyFluxesFromEnergies(solarModulationWparameter, atomicNumber, energyListInMeV)
6666
```
6767

6868
For example, the script
69-
```
69+
```python
7070
from CosRayModifiedISO import CosRayModifiedISO
7171

7272
solarModulationWparameter = 19.25 # the solar modulation at a specific point in the solar cycle
@@ -76,7 +76,7 @@ energyListInMeV = 945.2 # kinetic energy of particle in MeV
7676
print(CosRayModifiedISO.getEnergyFluxesFromEnergies(solarModulationWparameter, atomicNumber, energyListInMeV))
7777
```
7878
gives
79-
```
79+
```python
8080
[0.00012419]
8181
```
8282
as output.
@@ -85,7 +85,7 @@ The argument `energyListInMeV` can be supplied as either a single float or as a
8585
or a range of differential fluxes corresponding to each supplied kinetic energy.
8686

8787
If you instead want to acquire differential rigidity fluxes rather than differential energy fluxes, you can use
88-
```
88+
```python
8989
CosRayModifiedISO.getRigidityFluxesFromRigidities(solarModulationWparameter, atomicNumber, rigidityListInGV)
9090
```
9191
which has exactly the same syntax and usage as the `getEnergyFluxesFromEnergies` method, but where rigidities in GV must be supplied instead
@@ -98,12 +98,12 @@ differential fluxes automatically based on neutron monitor data and a default se
9898
that are relevant specifically for radiation dose rate calculations in Earth's atmosphere.
9999

100100
The method
101-
```
101+
```python
102102
CosRayModifiedISO.getSpectrumUsingTimestamp(timestamp, atomicNumber)
103103
```
104104
method can be used to output the differential fluxes for a given date and time, for example,
105105

106-
```
106+
```python
107107
from CosRayModifiedISO import CosRayModifiedISO
108108
import datetime as dt
109109

@@ -119,7 +119,7 @@ datetimeToUse = dt.datetime(
119119
print(CosRayModifiedISO.getSpectrumUsingTimestamp(datetimeToUse,atomicNumber=1))
120120
```
121121
returns the output
122-
```
122+
```python
123123
Energy (MeV/n) d_Flux / d_E (cm-2 s-1 sr-1 (MeV/n)-1) Rigidity (GV/n) d_Flux / d_R (cm-2 s-1 sr-1 (GV/n)-1)
124124
0 11.294627 2.290835e-07 0.146022 3.522790e-05
125125
1 14.219093 3.785376e-07 0.163966 6.516322e-05
@@ -135,26 +135,26 @@ the model, using the method described in [Matthiä et al., (2013)](https://doi.o
135135
and 2021/01/31 00:00 can be used.
136136

137137
Count rates from the OULU neutron monitor (or representative values) can be supplied directly into the model using the
138-
```
138+
```python
139139
CosRayModifiedISO.getSpectrumUsingOULUcountRate(OULUcountRatePerSecond, atomicNumber)
140140
```
141141
method, where `OULUcountRatePerSecond` is a single float representing the count rate per second of the OULU neutron monitor at a given instance of time.
142142
The solar modulation parameter can also be supplied directly using
143-
```
143+
```python
144144
CosRayModifiedISO.getSpectrumUsingSolarModulation(solarModulationWparameter, atomicNumber)
145145
```
146146
This function can be identically supplied with the monthly averaged sunspot number instead of the solar modulation parameter, which the solar modulation parameter
147147
is essentially a proxy for. Alternatively the identical function
148148

149-
```
149+
```python
150150
CosRayModifiedISO.getSpectrumUsingSSN(sunspotNumber, atomicNumber)
151151
```
152152
can be used instead for code understandability.
153153

154154
Each of these three methods output Pandas DataFrames in the same format as outputted by `getSpectrumUsingTimestamp`. The value of the solar modulation parameter
155155
as a function of OULU neutron monitor monitor count rate can also be outputted by running
156156

157-
```
157+
```python
158158
CosRayModifiedISO.getWparameterFromOULUcountRate(OULUcountRateInSeconds)
159159
```
160160

@@ -163,13 +163,13 @@ CosRayModifiedISO.getWparameterFromOULUcountRate(OULUcountRateInSeconds)
163163
In addition to the above spectrum calculation methods, there are also several methods for performing conversion between different quantities for input and output.
164164

165165
The methods
166-
```
166+
```python
167167
CosRayModifiedISO.convertParticleRigidityToEnergy(particleRigidityInGV,
168168
particleMassAU,
169169
particleChargeAU)
170170
```
171171
and
172-
```
172+
```python
173173
CosRayModifiedISO.convertParticleRigidityToEnergy(particleRigidityInGV,
174174
particleMassAU,
175175
particleChargeAU)
@@ -179,14 +179,14 @@ as [Pandas Series objects](https://pandas.pydata.org/docs/reference/api/pandas.S
179179
and in atomic units.
180180

181181
The methods
182-
```
182+
```python
183183
CosRayModifiedISO.convertParticleRigiditySpecToEnergySpec(particleRigidityInGV,
184184
fluxInRigidityGVform,
185185
particleMassAU,
186186
particleChargeAU)
187187
```
188188
and
189-
```
189+
```python
190190
CosRayModifiedISO.convertParticleEnergySpecToRigiditySpec(particleKineticEnergyInMeV,
191191
fluxInEnergyMeVform,
192192
particleMassAU,
@@ -196,7 +196,7 @@ can be used to convert differential rigidity flux to differential energy flux an
196196
respective differential flux values must be inputted as [Pandas Series objects](https://pandas.pydata.org/docs/reference/api/pandas.Series.html).
197197

198198
The particle mass for all of these methods can be acquired directly from atomic number using
199-
```
199+
```python
200200
CosRayModifiedISO.getAtomicMass(atomicNumber)
201201
```
202202

0 commit comments

Comments
 (0)