API Reference

This page documents the public API of NeSST. The main entry point is:

import NeSST as nst

Core Module

NeSST.core.A1s_2_rhoR(A_1S: float | ndarray[tuple[Any, ...], dtype[_ScalarT]], frac_D: float = 0.5, frac_T: float = 0.5) float | ndarray[tuple[Any, ...], dtype[_ScalarT]][source]

Calculates the DT areal density in kg/m^2 given a scattering amplitude

Parameters:
  • A_1S (float) – the scattering amplitude for single scattering

  • frac_D (float) – fraction of D in fuel

  • frac_T (float) – fraction of T in fuel

Returns:

the DT areal density in kg/m^2

Return type:

float

NeSST.core.DDprimspecmoments(Tion: float) Tuple[float, float, float][source]

Calculates the mean energy and the variance of the neutron energy emitted during DD fusion accounting for temperature of the incident ions. Based on Ballabio fits, see Table III of L. Ballabio et al 1998 Nucl. Fusion 38 1723

Parameters:

Tion (float) – the temperature of the ions in eV

Raises:

ValueError – if the Tion is below 0 then a ValueError is raised

Returns:

the mean neutron energy, std deviation and variance in eV

Return type:

Tuple[float, float, float]

NeSST.core.DT_asym_scatter_spec(I_E: ndarray[tuple[Any, ...], dtype[_ScalarT]], rhoL_func: callable, frac_D: float = 0.5, frac_T: float = 0.5) Tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], Tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]]]][source]

Calculates the single scattered neutron spectrum for DT given a primary neutron spectrum of I_E from anisotropic areal density

This requires the scattering matrices to have been pre-calculated

The primary neutron spectrum, I_E, is assumed to be on the same energy grid as the incoming energy grid used to calculate the scattering matrices

The areal density function rhoL_func needs to be a callable function with a single argument (cosine[theta])

Parameters:
  • I_E (numpy.array) – the neutron spectrum at Ein energies

  • rhoL_func (callable) – must be a single argument function f(x),

  • [-1 (where x e)

  • f (1] and)

  • frac_D (float) – fraction of D in fuel

  • frac_T (float) – fraction of T in fuel

Returns:

the total scattered spectrum and a tuple of the components (nD,nT,Dn2n,Tn2n)

Return type:

Tuple of numpy.arrays

NeSST.core.DT_scatter_spec_w_ionkin(I_E: ndarray[tuple[Any, ...], dtype[_ScalarT]], vbar: float, dv: float, rhoL_func: callable, frac_D: float = 0.5, frac_T: float = 0.5) Tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], Tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]]]][source]

Calculates the single scattered neutron spectrum for DT given a primary neutron spectrum of I_E from anisotropic areal density and including ion velocities kinematics

This requires the scattering matrices with ion kinematics to have been pre-calculated

The primary neutron spectrum, I_E, is assumed to be on the same energy grid as the incoming energy grid used to calculate the scattering matrices

The areal density function rhoL_func needs to be a callable function with a single argument (cosine[theta])

Parameters:
  • I_E (numpy.array) – the neutron spectrum at Ein energies

  • vbar (float) – mean velocity of the scattering ions

  • dv (float) – standard deviation velocity of the scattering ions

  • rhoL_func (callable) – must be a single argument function f(x),

  • [-1 (where x e)

  • f (1] and)

  • frac_D (float) – fraction of D in fuel

  • frac_T (float) – fraction of T in fuel

Returns:

the total scattered spectrum and a tuple of the components (nD,nT,Dn2n,Tn2n)

Return type:

Tuple of numpy.arrays

NeSST.core.DT_sym_scatter_spec(I_E: ndarray[tuple[Any, ...], dtype[_ScalarT]], frac_D: float = 0.5, frac_T: float = 0.5) Tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], Tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]]]][source]

Calculates the single scattered neutron spectrum for DT given a primary neutron spectrum of I_E from isotropic areal density

This requires the scattering matrices to have been pre-calculated

The primary neutron spectrum, I_E, is assumed to be on the same energy grid as the incoming energy grid used to calculate the scattering matrices

Parameters:

I_E (numpy.array) – the neutron spectrum at Ein energies

Returns:

the total scattered spectrum and a tuple of the components (nD,nT,Dn2n,Tn2n)

Return type:

Tuple of numpy.arrays

NeSST.core.DT_transmission(rhoL: float, E_in: ndarray[tuple[Any, ...], dtype[_ScalarT]], rhoL_func: callable, frac_D: float = 0.5, frac_T: float = 0.5) ndarray[tuple[Any, ...], dtype[_ScalarT]][source]

Calculates the straight line transmission of primary fusion sources through the DT areal density

The areal density function rhoL_func needs to be a callable function with a single argument (cosine[theta])

Parameters:
  • rhoL (float) – the (4-pi averaged) areal density of the DT

  • E_in (numpy.array) – the energy array of the primary neutron spectrum

  • rhoL_func (callable) – must be a single argument function f(x),

  • [-1 (where x e)

  • f (1] and)

  • frac_D (float) – fraction of D in fuel

  • frac_T (float) – fraction of T in fuel

Returns:

the total transmission coefficient as calculated

exp[ - A_1S rhoL_func(1) (f_D sigma_{D,tot}(Ein) + f_T sigma_{T,tot}(Ein)) ]

Return type:

numpy.array

NeSST.core.DTprimspecmoments(Tion: float) Tuple[float, float, float][source]

Calculates the mean energy and the variance of the neutron energy emitted during DT fusion accounting for temperature of the incident ions. Based on Ballabio fits, see Table III of L. Ballabio et al 1998 Nucl. Fusion 38 1723

Parameters:

Tion (float) – the temperature of the ions in eV

Raises:

ValueError – if the Tion is below 0 then a ValueError is raised

Returns:

the mean neutron energy, std deviation and variance in eV

Return type:

Tuple[float, float, float]

NeSST.core.QBallabio(Ein: ndarray[tuple[Any, ...], dtype[_ScalarT]], mean: float, variance: float) ndarray[tuple[Any, ...], dtype[_ScalarT]][source]

Calculates the primary spectrum with a Ballabio shape i.e. modified Gaussian See equations 44 - 46 of Ballabio et al.

Parameters:
  • Ein (numpy.array) – array of energy values on which to compute spectrum

  • mean (float) – mean of spectrum

  • variance (float) – variance of spectraum

Returns:

array with modified Gaussian spectrum on array Ein

Return type:

numpy.array

NeSST.core.QBrysk(Ein: ndarray[tuple[Any, ...], dtype[_ScalarT]], mean: float, variance: float) ndarray[tuple[Any, ...], dtype[_ScalarT]][source]

Calculates the primary spectrum with a Brysk shape i.e. Gaussian :param Ein: array of energy values on which to compute spectrum :type Ein: numpy.array :param mean: mean of spectrum :type mean: float :param variance: variance of spectraum :type variance: float

Returns:

array with Gaussian spectrum on array Ein

Return type:

numpy.array

NeSST.core.QDress_DD(Ein: ndarray[tuple[Any, ...], dtype[_ScalarT]], Tion: float, n_samples: int = 1000000) ndarray[tuple[Any, ...], dtype[_ScalarT]][source]

Calculates the DD primary neutron spectrum using the DRESS Monte Carlo code.

Parameters:
  • Ein (numpy.array) – array of energy bin centres on which to compute the spectrum (eV)

  • Tion (float) – temperature of the ions in eV

  • n_samples (int) – number of Monte Carlo samples (default 1e6)

Returns:

normalised DD spectrum (1/eV) evaluated at the bin centres of Ein

Return type:

numpy.array

NeSST.core.QDress_DT(Ein: ndarray[tuple[Any, ...], dtype[_ScalarT]], T_D: float, T_T: float | None = None, n_samples: int = 1000000) ndarray[tuple[Any, ...], dtype[_ScalarT]][source]

Calculates the DT primary neutron spectrum using the DRESS Monte Carlo code.

Parameters:
  • Ein (numpy.array) – array of energy bin centres on which to compute the spectrum (eV)

  • T_D (float) – temperature of deuterons in eV

  • T_T (float, optional) – temperature of tritons in eV. If None, uses T_D for both.

  • n_samples (int) – number of Monte Carlo samples (default 1e6)

Returns:

normalised DT spectrum (1/eV) evaluated at the bin centres of Ein

Return type:

numpy.array

NeSST.core.calc_DT_ionkin_primspec_rhoL_integral(I_E: ndarray[tuple[Any, ...], dtype[_ScalarT]], rhoL_func=None, nT: bool = False, nD: bool = False)[source]
NeSST.core.calc_DT_sigmabar(Ein: ndarray[tuple[Any, ...], dtype[_ScalarT]], I_E: ndarray[tuple[Any, ...], dtype[_ScalarT]], frac_D: float = 0.5, frac_T: float = 0.5) float[source]

Calculates the spectral-averaged cross section for DT

Parameters:
  • Ein (numpy.array) – the array on incoming neutron energies

  • I_E (numpy.array) – the neutron spectrum at Ein energies, assumed normalised

  • frac_D (float) – fraction of D in fuel

  • frac_T (float) – fraction of T in fuel

Returns:

the spectrally averaged total DT cross section

Return type:

float

NeSST.core.dNdE_TT(E: ndarray[tuple[Any, ...], dtype[_ScalarT]], Tion: float, model: str = 'Brune') ndarray[tuple[Any, ...], dtype[_ScalarT]][source]

Calculates the TT primary spectrum with Doppler broadening effect as calculated in Appelbe et al. HEDP 2016

Parameters:
  • E (numpy.array) – array of energy values on which to compute spectrum (eV)

  • Tion (float) – the temperature of the ions in eV

  • model (str) – which TT spectral model to use, options are in sm.TT_model.available_spectrum_models

Returns:

array with normalised TT spectral shape at energies E

Return type:

numpy.array

NeSST.core.init_DT_ionkin_scatter(varr: ndarray[tuple[Any, ...], dtype[_ScalarT]], nT: bool = False, nD: bool = False)[source]

Initialise the scattering matrices including the effect of ion velocities in the kinematics

N.B. the static ion scattering matrices must already be calculated e.g. by calling init_DT_scatter

Parameters:
  • Ein (numpy.array) – the array on incoming neutron energies

  • Eout (numpy.array) – the array on outgoing neutron energies

NeSST.core.init_DT_scatter(Eout: ndarray[tuple[Any, ...], dtype[_ScalarT]], Ein: ndarray[tuple[Any, ...], dtype[_ScalarT]])[source]

Initialise the scattering matrices for D and T materials

Parameters:
  • Ein (numpy.array) – the array on incoming neutron energies

  • Eout (numpy.array) – the array on outgoing neutron energies

NeSST.core.init_mat_scatter(Eout: ndarray[tuple[Any, ...], dtype[_ScalarT]], Ein: ndarray[tuple[Any, ...], dtype[_ScalarT]], mat_label: str)[source]

General material version of init_DT_scatter as specified by material label

N.B. the mat_lable must match those in available_materials_dict

Parameters:
  • Ein (numpy.array) – the array on incoming neutron energies

  • Eout (numpy.array) – the array on outgoing neutron energies

  • mat_label (str) – material label

NeSST.core.initialise_material_data(label)[source]
NeSST.core.mat_scatter_spec(mat: Type[material_data], I_E: ndarray[tuple[Any, ...], dtype[_ScalarT]], rhoL_func: callable) ndarray[tuple[Any, ...], dtype[_ScalarT]][source]

Calculates a material’s single scattered neutron spectrum given a primary neutron spectrum of I_E from anisotropic areal density

This requires the scattering matrices to have been pre-calculated

The primary neutron spectrum, I_E, is assumed to be on the same energy grid as the incoming energy grid used to calculate the scattering matrices

The areal density function rhoL_func needs to be a callable function with a single argument (cosine[theta])

Parameters:
  • I_E (numpy.array) – the neutron spectrum at Ein energies

  • rhoL_func (callable) – must be a single argument function f(x),

  • [-1 (where x e)

  • f (1] and)

Returns:

the total scattered spectrum

Return type:

numpy.array

NeSST.core.mat_transmission(mat: Type[material_data], rhoL: float, E_in: ndarray[tuple[Any, ...], dtype[_ScalarT]], rhoL_func: callable) ndarray[tuple[Any, ...], dtype[_ScalarT]][source]

Calculates the straight line transmission of primary fusion sources through a material’s areal density

The areal density function rhoL_func needs to be a callable function with a single argument (cosine[theta])

Parameters:
  • mat (material_data) – Material data class for attenuating medium

  • rhoL (float) – the (4-pi averaged) areal density of the DT

  • E_in (numpy.array) – the energy array of the primary neutron spectrum

  • rhoL_func (callable) – must be a single argument function f(x),

  • [-1 (where x e)

  • f (1] and)

Returns:

the total transmission coefficient as calculated

exp[ - A_1S rhoL_func(1) (f_D sigma_{D,tot}(Ein) + f_T sigma_{T,tot}(Ein)) ]

Return type:

numpy.array

NeSST.core.neutron_velocity_addition(Ek, u)[source]
NeSST.core.rhoR_2_A1s(rhoR: float | ndarray[tuple[Any, ...], dtype[_ScalarT]], frac_D: float = 0.5, frac_T: float = 0.5) float | ndarray[tuple[Any, ...], dtype[_ScalarT]][source]

Calculates the scattering amplitude given a DT areal density in kg/m^2

Parameters:
  • rhoR (float) – the DT areal density in kg/m^2

  • frac_D (float) – fraction of D in fuel

  • frac_T (float) – fraction of T in fuel

Returns:

the scattering amplitude for single scattering

Return type:

float

NeSST.core.yield_from_dt_yield_ratio(reaction: str, dt_yield: float, Tion: float, frac_D: float = 0.5, frac_T: float = 0.5) float[source]
Reactivity ratio to predict yield from the DT yield assuming same volume and burn time

rate_ij = (f_{i}*f_{j}*sigmav_{i,j}(T))/(1+delta_{i,j}) # dN/dVdt yield_ij = (rate_ij/rate_dt)*yield_dt

Uses default models for reactivities Note that the TT reaction produces two neutrons.

Parameters:
  • reaction (string) – what reaction ‘dd’ or ‘tt’

  • dt_yield (float) – the yield of DT neutrons, used to scale DD and TT yields

  • Tion (float) – the temperature of the ions in eV

  • frac_D (float) – fraction of D in fuel

  • frac_T (float) – fraction of T in fuel

Raises:

ValueError – if the Tion is below 0 then a ValueError is raised

Returns:

Yield of requested reaction

Return type:

float

NeSST.core.yields_normalised(Tion: float, frac_D: float = 0.5, frac_T: float = 0.5) Tuple[float, float, float][source]

Assuming same volume and burn time, find fractional yields of DT, DD and TT respectively

Uses default models for reactivities Note that the TT reaction produces two neutrons.

Parameters:
  • Tion (float) – the temperature of the ions in eV

  • frac_D (float) – fraction of D in fuel

  • frac_T (float) – fraction of T in fuel

Raises:

ValueError – if the Tion is below 0 then a ValueError is raised

Returns:

DT, DD and TT yields, normalised sum of unity

Return type:

Tuple[float, float, float]

Fitting Module

class NeSST.fitting.DT_fit_function(E_DTspec, E_sspec, vion_arr=None)[source]

Bases: object

A class which constructs various simple models for the full spectrum in DT for fitting data

User must provide energy grids (and velocity grids if including ion kinematics)

One can create a model function from the following list of approximations:

– Symmetric areal density – Asymmetric Mode 1 areal density

The primary spectra are assumed isotropic and with moments defined by a single temperature

This class doesn’t represent the full set of spectrum models which can be produced by NeSST! Just a common few…

init_modeone_model(P1_arr)[source]

Creates a callable model function for a mode 1 asymmetric areal density distribution

init_symmetric_model()[source]

Creates a callable model function for a symmetric areal density distribution

set_primary_Tion(Tion)[source]

Time-of-Flight Module

class NeSST.time_of_flight.BirksBetheBlochNLOModel(akB, Enorm)[source]

Bases: ProtonScintillationModel

akB in eV

Combining: kB in m/eV a in eV^2/m Bethe-Bloch formula for stopping power:

dE/dx = a/E

Birks relation for light response:

dL/dx propto (dEdx)/(1+kB (dE/dx))

L_integral(E)[source]
class NeSST.time_of_flight.BirksBetheNLOModel(akB, excitation_energy, mp, Enorm, Emin, Emax, NE_interp)[source]

Bases: ProtonScintillationModel

akB in eV

Combining: kB in m/eV a in eV^2/m

I = excitation_energy in eV

Bethe formula for stopping power:

dE/dx = a/E * ln(4 me E / mp I)

Birks relation for light response:

dL/dx propto (dEdx)/(1+kB (dE/dx))

L(E)[source]
L_integral(E)[source]
dLdE(Ep)[source]
kB_dEdx(Ep)[source]
class NeSST.time_of_flight.CraunSmithBetheModel(C, akB, excitation_energy, mp, Enorm, Emin, Emax, NE_interp)[source]

Bases: BirksBetheNLOModel

Craun, R. L., and D. L. Smith. “Analysis of response data for several organic scintillators.” Nuclear Instruments and Methods 80.2 (1970): 239-244.

We use:

dLdE propto 1 / (1 + kB * dE/dx + C (kb * dE/dx)**2)

where dE/dx is given by the Bethe formula.

Note that this is a slight redefinition of C compared with the original paper, which is more convenient for our purposes (dimensionless).

dLdE(Ep)[source]
class NeSST.time_of_flight.LOS_material(density: float, length: float, components: List[NeSST.time_of_flight.LOS_material_component])[source]

Bases: object

components: List[LOS_material_component]
density: float
length: float
mavg: float
ntot: float
class NeSST.time_of_flight.LOS_material_component(number_fraction: float, A: float, ENDF_file: str)[source]

Bases: object

A: float
ENDF_file: str
number_fraction: float
class NeSST.time_of_flight.PowerLawScintillationModel(p, Enorm)[source]

Bases: ProtonScintillationModel

L_integral(E)[source]
class NeSST.time_of_flight.ProtonScintillationModel(Enorm)[source]

Bases: ABC

Using equation (3) from

Qi Tang, Zifeng Song, Pinyang Liu, Bo Yu, Jiamin Yang, Calibration of the sensitivity of the bibenzyl-based scintillation detector to 1–5 MeV neutrons, Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment, Volume 1068, 2024, 169779, ISSN 0168-9002, https://doi.org/10.1016/j.nima.2024.169779.

abstractmethod L_integral(E)[source]
class NeSST.time_of_flight.VerbinskiNLOModel(Enorm)[source]

Bases: ProtonScintillationModel

Data from Verbinski, VVl, et al. “Calibration of an organic scintillator for neutron spectrometry.” Nuclear Instruments and Methods 65.1 (1968): 8-25.

L_integral(E)[source]
NeSST.time_of_flight.combine_detector_sensitivities(model_list)[source]
NeSST.time_of_flight.decaying_gaussian_kernel(FWHM, tau, shift_sigma=2.0)[source]

Single exponential tail multiplied by Gaussian.

NeSST.time_of_flight.delta_kernel()[source]
NeSST.time_of_flight.double_decay_gaussian_kernel(FWHM, taus, frac, shift_sigma=2.0)[source]

Weighted sum of two decaying-Gaussian components.

NeSST.time_of_flight.gated_decaying_gaussian_kernel(sig, tau, shift_t, sig_turnon)[source]

Exponentially decaying Gaussian with logistic gate.

NeSST.time_of_flight.get_BirksBetheBloch_NLO(akB, Enorm=14028394.353912354)
NeSST.time_of_flight.get_BirksBethe_NLO(akB, excitation_energy, mp=1.67262192595e-27, Enorm=14028394.353912354, Emin=1000.0, Emax=20000000.0, NE_interp=1000)
NeSST.time_of_flight.get_CraunSmithBethe_NLO(C, akB, excitation_energy, mp=1.67262192595e-27, Enorm=14028394.353912354, Emin=1000.0, Emax=20000000.0, NE_interp=1000)
NeSST.time_of_flight.get_LOS_attenuation(LOS_materials: List[LOS_material])[source]
NeSST.time_of_flight.get_Verbinski_NLO(Enorm=14028394.353912354)
NeSST.time_of_flight.get_power_law_NLO(p, Enorm=14028394.353912354)
NeSST.time_of_flight.get_unity_sensitivity()[source]
NeSST.time_of_flight.inversegaussian_nIRF(scint_thickness, ni_scin=8.79e+28, CH_ratio=0.4444444444444444, E_lower=50000.0, E_upper=25000000.0, NE_interp=1000)[source]
NeSST.time_of_flight.make_transit_time_IRF(thickness, kernel_fn, base_matrix_fn=None)[source]

Parameters

thicknessfloat

Sets the detector thickness

kernel_fncallable(t) -> 1-D array

Builds the convolution kernel on the same time grid.

base_matrix_fncallable(thickness) -> callable(t_detected, En) -> 2-D array [optional]

Anything that returns an (N×N) response matrix before filtering. If omitted, we fall back to the canonical top-hat.

class NeSST.time_of_flight.nToF(distance, sensitivity, instrument_response_function, normtime_start=5.0, normtime_end=20.0, normtime_N=2048, detector_normtime=None)[source]

Bases: object

compute_instrument_response()[source]
get_dNdt(En, dNdE)[source]
get_signal(En, dNdE)[source]
get_signal_no_IRF(En, dNdE)[source]
get_time_resolved_dNdt(En, d2NdEdt)[source]

Interpolate d²N/dE dt_emit onto the detector energy grid and apply the energy-to-normtime Jacobian.

Parameters

Enarray_like, shape (N_E,)

Energy bin centres (eV). Must be sorted ascending.

d2NdEdtarray_like, shape (N_E, N_temit)

Double-differential spectrum d²N/dE dt_emit [1/eV/s].

Returns

dNdt2dndarray, shape (N_td, N_temit)

d²N/dt_norm dt_emit on the detector normtime grid [1/s/s].

get_time_resolved_signal(En, d2NdEdt, temit)[source]

Full time-resolved forward model: interpolation → sensitivity → IRF → emission-time shift.

Parameters

Enarray_like, shape (N_E,)

Energy bin centres (eV). Must be sorted ascending.

d2NdEdtarray_like, shape (N_E, N_temit)

d²N/dE dt_emit [1/eV/s].

temitarray_like, shape (N_temit,)

Emission time bin centres (s). Must be > 0 and sorted ascending.

Returns

detector_time : ndarray, shape (N_td,) detector_normtime : ndarray, shape (N_td,) signal : ndarray, shape (N_td,)

get_time_resolved_signal_no_IRF(En, d2NdEdt, temit)[source]

Time-resolved forward model without IRF application.

Parameters

Enarray_like, shape (N_E,)

Energy bin centres (eV). Must be sorted ascending.

d2NdEdtarray_like, shape (N_E, N_temit)

d²N/dE dt_emit [1/eV/s].

temitarray_like, shape (N_temit,)

Emission time bin centres (s). Must be > 0 and sorted ascending.

Returns

detector_time : ndarray, shape (N_td,) detector_normtime : ndarray, shape (N_td,) signal : ndarray, shape (N_td,)

NeSST.time_of_flight.t_gaussian_kernel(FWHM, peak_pos)[source]

t·Gaussian (often used for leading-edge shaping).

NeSST.time_of_flight.top_hat(scint_thickness)[source]

Return a function R_base(t_detected, En) that creates the normalised top-hat transit matrix for this scintillator thickness.

Constants

class NeSST.constants.LazyMaterialDict[source]

Bases: dict

A dict that lazily loads default material data on first access.

Utilities

NeSST.utils.interpolate_1d(x_points, values, method='linear', bounds_error=True, fill_value=nan, axis=None)[source]
NeSST.utils.interpolate_2d(x_points, y_points, values, method='linear', bounds_error=True, fill_value=nan)[source]
NeSST.utils.safe_array(x)[source]

Converts floats or lists to appropriate sized arrays

Spectral Model

class NeSST.spectral_model.TT_spectrum_model(NE=500)[source]

Bases: object

reac(Ti, model)[source]
spec(E, Ti, model)[source]
class NeSST.spectral_model.material_data(label, json)[source]

Bases: object

calc_dNdEs(I_E, rhoL_func)[source]
calc_n2n_dNdE(I_E, rhoL_func)[source]
calc_station_elastic_dNdE(I_E, rhoL_func)[source]
calc_station_inelastic_dNdE(I_E, rhoL_func)[source]
full_scattering_matrix_create(vvec)[source]
init_energy_grids(Eout, Ein)[source]
init_n2n_ddxs(Nm=100)[source]
init_station_elastic_scatter()[source]
init_station_inelastic_scatter()[source]
init_station_scatter_matrices(Nm=100)[source]
matrix_interpolate_gaussian(E, vbar, dv)[source]
matrix_primspec_int(I_E)[source]
rhoR_2_A1s(rhoR)[source]
scattering_matrix_apply_rhoLfunc(rhoL_func)[source]
NeSST.spectral_model.reac_DD(Ti, model='BoschHale')[source]
NeSST.spectral_model.reac_DT(Ti, model='BoschHale')[source]
NeSST.spectral_model.reac_TT(Ti, model='Hale')[source]
NeSST.spectral_model.unity(x)[source]

Collisions

NeSST.collisions.E(m, beta)[source]
NeSST.collisions.Ekin_2_beta(Ek, m)[source]
NeSST.collisions.Jacobian_dEdnorm_t(E, m)[source]
NeSST.collisions.beta_2_Ekin(beta, m)[source]
NeSST.collisions.beta_2_normtime(beta)[source]
NeSST.collisions.cla_CoM_scattering_cosine(A, Ein, Eout, muin, muout, vf)[source]
NeSST.collisions.cla_lab_scattering_cosine(A, Ein, Eout, muin, muout, vf)[source]
NeSST.collisions.cla_mu_out(A, Ein, Eout, vf)[source]
NeSST.collisions.cla_mucE_jacobian(A, Ein, Eout, muin, muout, vf)[source]
NeSST.collisions.flux_change(Ein, muin, vf)[source]
NeSST.collisions.g(A, Ein, Eout, muin, muout, vf)[source]
NeSST.collisions.gamma(beta)[source]
NeSST.collisions.gamma_2_beta(g)[source]
NeSST.collisions.mom_invariant(m1, m2, beta1, beta2, cos)[source]
NeSST.collisions.mu_out(A, Ein, Eout, vf)[source]
NeSST.collisions.muc(A, Ein, Eout, muin, muout, vf)[source]
NeSST.collisions.p(m, beta)[source]
NeSST.collisions.rel_CoM_scattering_cosine(m1, m2, beta1, beta2, beta3, cos12, cos23)[source]
NeSST.collisions.rel_lab_scattering_cosine(m1, m2, beta1, beta2, beta3, cos12, cos23)[source]
NeSST.collisions.rel_mu_out(m1, m2, beta1, beta2, beta3)[source]
NeSST.collisions.rel_mucE_jacobian(m1, m2, beta1, beta2, beta3, cos12, cos23)[source]
NeSST.collisions.v_2_beta(v)[source]
NeSST.collisions.velocity_addition_to_Ekin(Ek, m, u)[source]

ENDF Interface

class NeSST.endf_interface.ENDFManifest(total: bool, elastic: bool, inelastic: bool, n2n: bool)[source]

Bases: object

elastic: bool
inelastic: bool
n2n: bool
total: bool
NeSST.endf_interface.convert_json_to_manifest(json_file)[source]
NeSST.endf_interface.convert_to_NeSST_LAW7_format(ENDF_dist)[source]
NeSST.endf_interface.convert_to_NeSST_legendre_format(ENDF_al)[source]
NeSST.endf_interface.retrieve_ENDF_data(json_file)[source]
NeSST.endf_interface.retrieve_ENDF_data_from_manifest(manifest)[source]
NeSST.endf_interface.retrieve_total_cross_section_from_ENDF_file(filename)[source]