energy_data
Neutron energy spectrum data.
BALLABIO_DD_NEUTRON = BallabioEnergySpectrum(energy_0=2449.5, omega_0=82.542, energy_shift_coeffs=BallabioCoefficients(a1=4.69515, a2=-0.040729, a3=0.47, a4=0.81844), width_correction_coeffs=BallabioCoefficients(a1=0.0017013, a2=0.16888, a3=0.49, a4=0.0007946))
module-attribute
Ballabio et al. fit data for relativistic fusion reaction neutron energy Gaussian spectra.
BALLABIO_DT_NEUTRON = BallabioEnergySpectrum(energy_0=14021.0, omega_0=177.259, energy_shift_coeffs=BallabioCoefficients(a1=5.30509, a2=0.0024736, a3=1.84, a4=1.3818), width_correction_coeffs=BallabioCoefficients(a1=0.00051068, a2=0.0076223, a3=1.78, a4=8.7691e-05))
module-attribute
Ballabio et al. fit data for relativistic fusion reaction neutron energy Gaussian spectra.
TWO_SQRT_2LN2 = 2.3548200450309493
module-attribute
Convert a string or number to a floating point number, if possible.
TTNeutronEnergyDataSpectrum
Fusion neutron energy data spectrum.
Source code in tokamak_neutron_source/energy_data.py
BallabioCoefficients
Ballabio et al. fit parameterisation coefficients for Ti < 40.0 keV
Source code in tokamak_neutron_source/energy_data.py
fit(temp_kev)
Calculate the value of the parameterisation at given temperature(s).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
temp_kev
|
float | ndarray[tuple[Any, ...], dtype[~_ScalarT]]
|
Ion temperatures at which to calculate the fit |
required |
Returns:
| Type | Description |
|---|---|
float | ndarray[tuple[Any, ...], dtype[~_ScalarT]]
|
Values of the fit |
Notes
Valid over 0.0 to 40.0 keV
Source code in tokamak_neutron_source/energy_data.py
BallabioEnergySpectrum
Ballabio et al. fit data for relativistic fusion reaction neutron energy Gaussian spectra.
Source code in tokamak_neutron_source/energy_data.py
energy_shift(temp_kev)
Calculate the energy shift \Delta E_{th} at a given ion temperature.
width_correction(temp_kev)
Calculate the width correction \delta_{\omega} at a given ion temperature.
Source code in tokamak_neutron_source/energy_data.py
mean_energy(temp_kev)
Calculate the mean neutron energy at a given ion temperature (primary first moment: mu).
Source code in tokamak_neutron_source/energy_data.py
std_deviation(temp_kev)
Calculate the standard deviation of the neutron energy spectrum at a given ion temperature (primary second moment: sigma)
Source code in tokamak_neutron_source/energy_data.py
EnergySpectrumError
TT_N_SPECTRUM(temp_kev)
Fusion neutron energy data spectrum.
get_tns_path(path='', subfolder='tokamak_neutron_source')
Get a tns path of a module subfolder. Defaults to root folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The desired path from which to create a full path |
''
|
subfolder
|
str
|
The subfolder (from the tokamak_neutron_source root) in which to create a path Defaults to the source code folder, but can be e.g. 'tests', or 'data' |
'tokamak_neutron_source'
|
Returns:
| Type | Description |
|---|---|
Path
|
The full path to the desired |
Source code in tokamak_neutron_source/tools.py
raw_uc(value, unit_from, unit_to)
Raw unit converter Converts a value from one unit to another
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
ValueLikeT
|
value to convert |
required |
unit_from
|
str | Unit
|
unit to convert from |
required |
unit_to
|
str | Unit
|
unit to convert to |
required |
Returns:
| Type | Description |
|---|---|
ValueLikeT
|
converted value |