PyNE C++
|
Implements basic nuclear data functions. More...
#include <iostream>
#include <string>
#include <utility>
#include <map>
#include <set>
#include <limits>
#include <exception>
#include <stdlib.h>
#include <stdio.h>
#include <float.h>
#include <math.h>
#include "hdf5.h"
#include "hdf5_hl.h"
#include "h5wrap.h"
#include "extra_types.h"
#include "utils.h"
#include "nucname.h"
#include "rxname.h"
Go to the source code of this file.
Classes | |
struct | pyne::atomic_mass_data |
a struct matching the atomic_mass table in nuc_data.h5. More... | |
struct | pyne::q_val_data |
a struct matching the q_value table in nuc_data.h5. More... | |
struct | pyne::dose |
A struct matching the dose factor table in nuc_data.h5. More... | |
struct | pyne::scattering_lengths |
a struct matching the '/neutron/scattering_lengths' table in nuc_data.h5. More... | |
struct | pyne::wimsdfpy |
a struct matching the '/neutron/wimsd_fission_product' table in nuc_data.h5. More... | |
struct | pyne::ndsfpy |
a struct matching the '/neutron/nds_fission_product' table in nuc_data.h5 More... | |
struct | pyne::ndsfpysub |
a struct for the nds data for fpyield More... | |
class | pyne::swapmapcompare |
Data access functions. More... | |
struct | pyne::atomic |
Structure for atomic data. More... | |
struct | pyne::level_data |
a struct matching the '/decay/level_list' table in nuc_data.h5. More... | |
struct | pyne::decay |
a struct matching the '/decay/decays' table in nuc_data.h5. More... | |
struct | pyne::gamma |
a struct matching the '/decay/gammas' table in nuc_data.h5. More... | |
struct | pyne::alpha |
a struct matching the '/decay/alphas' table in nuc_data.h5. More... | |
struct | pyne::beta |
a struct matching the '/decay/betas' table in nuc_data.h5. More... | |
struct | pyne::ecbp |
A struct matching the '/decay/ecbp' table in nuc_data.h5. More... | |
class | pyne::InvalidSimpleXS |
Custom exception for declaring a simple_xs request invalid. More... | |
Namespaces | |
pyne | |
A container representing enrichment cascades. | |
Functions | |
double | pyne::simple_xs (int nuc, int rx, std::string energy) |
double | pyne::simple_xs (int nuc, std::string rx, std::string energy) |
double | pyne::simple_xs (std::string nuc, int rx, std::string energy) |
double | pyne::simple_xs (std::string nuc, std::string rx, std::string energy) |
Natural Abundance Data | |
double | pyne::natural_abund (int nuc) |
Returns the natural abundance of a nuclide nuc. More... | |
double | pyne::natural_abund (char *nuc) |
Returns the natural abundance of a nuclide nuc. | |
double | pyne::natural_abund (std::string nuc) |
Returns the natural abundance of a nuclide nuc. | |
Variables | |
std::string | pyne::NUC_DATA_PATH = "" |
Path to the nuc_data.h5 file. | |
std::map< std::string, std::string > | pyne::data_checksums |
Mapping from nodes in nuc_data.h5 to hashes of nodes. More... | |
std::map< std::string, std::map< int, std::map< int, double > > > | pyne::simple_xs_map |
map<energy, map<nuclide, map<rx, xs> > > | |
Mathematical and Physical Constants | |
const double | pyne::pi = 3.14159265359 |
pi = 3.14159265359 | |
const double | pyne::N_A = 6.0221415e+23 |
Avogadro's Number. | |
const double | pyne::barns_per_cm2 = 1e24 |
barns per cm^2 | |
const double | pyne::cm2_per_barn = 1e-24 |
cm^2 per barn | |
const double | pyne::sec_per_day = 24.0 * 3600.0 |
seconds per day | |
const double | pyne::MeV_per_K = 8.617343e-11 |
MeV per Kelvin. | |
const double | pyne::MeV_per_MJ = 6.2415096471204E+18 |
MeV per MJ. | |
const double | pyne::Bq_per_Ci = 3.7e10 |
Becquerel per Curie. | |
const double | pyne::Ci_per_Bq = 2.7027027e-11 |
Curies per Becquerel. | |
Atomic Mass Data | |
typedef struct pyne::atomic_mass_data | pyne::atomic_mass_data |
a struct matching the atomic_mass table in nuc_data.h5. | |
std::map< std::string, std::string > | pyne::get_data_checksums () |
void | pyne::_load_atomic_mass_map () |
double | pyne::atomic_mass (int nuc) |
Returns the atomic mass of a nuclide nuc. More... | |
double | pyne::atomic_mass (char *nuc) |
Returns the atomic mass of a nuclide nuc. | |
double | pyne::atomic_mass (std::string nuc) |
Returns the atomic mass of a nuclide nuc. | |
Q_value Data | |
typedef struct pyne::q_val_data | pyne::q_val_data |
a struct matching the q_value table in nuc_data.h5. | |
std::map< int, double > | pyne::q_val_map = std::map<int, double>() |
std::map< int, double > | pyne::gamma_frac_map = std::map<int, double>() |
void | pyne::_load_q_val_map () |
Loads the q_value data from the nuc_data.h5 file into memory. | |
double | pyne::q_val (int nuc) |
Returns the q_value of a nuclide nuc. More... | |
double | pyne::q_val (const char *nuc) |
double | pyne::q_val (std::string nuc) |
double | pyne::gamma_frac (int nuc) |
double | pyne::gamma_frac (const char *nuc) |
double | pyne::gamma_frac (std::string nuc) |
Dose Factor Data | |
typedef struct pyne::dose | pyne::dose |
A struct matching the dose factor table in nuc_data.h5. | |
std::map< int, dose > | pyne::epa_dose_map |
Mapping from int to dose for 3 sources. | |
std::map< int, dose > | pyne::doe_dose_map |
std::map< int, dose > | pyne::genii_dose_map |
void | pyne::_load_dose_map (std::map< int, dose > &dm, std::string source_path) |
double | pyne::ext_air_dose (int nuc, int source) |
Returns the dose factors of a nuclide. More... | |
double | pyne::ext_air_dose (const char *nuc, int source) |
double | pyne::ext_air_dose (std::string nuc, int source) |
double | pyne::ext_soil_dose (int nuc, int source) |
double | pyne::ext_soil_dose (const char *nuc, int source) |
double | pyne::ext_soil_dose (std::string nuc, int source) |
double | pyne::ingest_dose (int nuc, int source) |
Ingestion. More... | |
double | pyne::ingest_dose (const char *nuc, int source) |
double | pyne::ingest_dose (std::string nuc, int source) |
double | pyne::inhale_dose (int nuc, int source) |
Inhalation. More... | |
double | pyne::inhale_dose (const char *nuc, int source) |
double | pyne::inhale_dose (std::string nuc, int source) |
double | pyne::dose_ratio (int nuc, int source) |
Dose Ratio. | |
double | pyne::dose_ratio (const char *nuc, int source) |
double | pyne::dose_ratio (std::string nuc, int source) |
double | pyne::dose_fluid_frac (int nuc, int source) |
Fluid Fraction. | |
double | pyne::dose_fluid_frac (const char *nuc, int source) |
double | pyne::dose_fluid_frac (std::string nuc, int source) |
std::string | pyne::dose_lung_model (int nuc, int source) |
Lung Model. | |
std::string | pyne::dose_lung_model (const char *nuc, int source) |
std::string | pyne::dose_lung_model (std::string nuc, int source) |
Scattering Length Data | |
typedef struct pyne::scattering_lengths | pyne::scattering_lengths |
a struct matching the '/neutron/scattering_lengths' table in nuc_data.h5. | |
std::map< int, xd_complex_t > | pyne::b_coherent_map = std::map<int, xd_complex_t>() |
Mapping from nuclides in id form to their coherent scattering length. | |
std::map< int, xd_complex_t > | pyne::b_incoherent_map = std::map<int, xd_complex_t>() |
Mapping from nuclides in id form to their incoherent scattering length. | |
std::map< int, double > | pyne::b_map = std::map<int, double>() |
Mapping from nuclides in id form to their scattering length. | |
void | pyne::_load_scattering_lengths () |
Loads the scattering length data from the nuc_data.h5 file into memory. | |
xd_complex_t | pyne::b_coherent (int nuc) |
Finds the coherent scattering length [cm] for a nuclide nuc. More... | |
xd_complex_t | pyne::b_coherent (char *nuc) |
Finds the coherent scattering length [cm] for a nuclide nuc. | |
xd_complex_t | pyne::b_coherent (std::string nuc) |
Finds the coherent scattering length [cm] for a nuclide nuc. | |
xd_complex_t | pyne::b_incoherent (int nuc) |
Finds the incoherent scattering length [cm] for a nuclide nuc. More... | |
xd_complex_t | pyne::b_incoherent (char *nuc) |
Finds the incoherent scattering length [cm] for a nuclide nuc. | |
xd_complex_t | pyne::b_incoherent (std::string nuc) |
Finds the incoherent scattering length [cm] for a nuclide nuc. | |
double | pyne::b (int nuc) |
Computes the scattering length [cm] from the coherent and incoherent components. | |
double | pyne::b (char *nuc) |
Computes the scattering length [cm] from the coherent and incoherent components. | |
double | pyne::b (std::string nuc) |
Computes the scattering length [cm] from the coherent and incoherent components. | |
Fission Product Yield Data | |
typedef struct pyne::wimsdfpy | pyne::wimsdfpy |
a struct matching the '/neutron/wimsd_fission_product' table in nuc_data.h5. | |
typedef struct pyne::ndsfpy | pyne::ndsfpy |
a struct matching the '/neutron/nds_fission_product' table in nuc_data.h5 | |
typedef struct pyne::ndsfpysub | pyne::ndsfpysub |
a struct for the nds data for fpyield | |
std::map< std::pair< int, int >, double > | pyne::wimsdfpy_data |
Mapping from nuclides in id form to their scattering length. More... | |
std::map< std::pair< int, int >, ndsfpysub > | pyne::ndsfpy_data |
void | pyne::_load_wimsdfpy () |
Loads the WIMSD fission product yield data from the nuc_data.h5 file into memory. | |
void | pyne::_load_ndsfpy () |
Loads the NDS fission product yield data from the nuc_data.h5 file into memory. | |
double | pyne::fpyield (std::pair< int, int > from_to, int source, bool get_error) |
Returns the fission product yield for a parent/child nuclide pair. More... | |
double | pyne::fpyield (int from_nuc, int to_nuc, int source, bool get_error) |
Returns the fission product yield for a parent/child nuclide pair. | |
double | pyne::fpyield (char *from_nuc, char *to_nuc, int source, bool get_error) |
Returns the fission product yield for a parent/child nuclide pair. | |
double | pyne::fpyield (std::string from_nuc, std::string to_nuc, int source, bool get_error) |
Returns the fission product yield for a parent/child nuclide pair. | |
Decay Data | |
typedef struct pyne::atomic | pyne::atomic |
Structure for atomic data. | |
typedef struct pyne::level_data | pyne::level_data |
a struct matching the '/decay/level_list' table in nuc_data.h5. | |
typedef struct pyne::decay | pyne::decay |
a struct matching the '/decay/decays' table in nuc_data.h5. | |
typedef struct pyne::gamma | pyne::gamma |
a struct matching the '/decay/gammas' table in nuc_data.h5. | |
typedef struct pyne::alpha | pyne::alpha |
a struct matching the '/decay/alphas' table in nuc_data.h5. | |
typedef struct pyne::beta | pyne::beta |
a struct matching the '/decay/betas' table in nuc_data.h5. | |
typedef struct pyne::ecbp | pyne::ecbp |
A struct matching the '/decay/ecbp' table in nuc_data.h5. | |
std::map< int, atomic > | pyne::atomic_data_map |
std::map< std::pair< int, double >, level_data > | pyne::level_data_lvl_map |
std::map< std::pair< int, unsigned int >, level_data > | pyne::level_data_rx_map |
std::map< std::pair< int, int >, decay > | pyne::decay_data |
std::map< std::pair< int, double >, gamma > | pyne::gamma_data |
std::map< std::pair< int, double >, alpha > | pyne::alpha_data |
A vector of structs containing alpha data for access in memory. | |
std::map< std::pair< int, double >, beta > | pyne::beta_data |
A vector of structs containing beta data for access in memory. | |
std::map< std::pair< int, double >, ecbp > | pyne::ecbp_data |
A vector of structs containing ecbp data for access in memory. | |
template<typename T , typename U > | |
std::vector< T > | pyne::data_access (double emin, double emax, size_t valoffset, std::map< std::pair< int, double >, U > &data) |
template<typename T , typename U > | |
std::vector< T > | pyne::data_access (int parent, double min, double max, size_t valoffset, std::map< std::pair< int, double >, U > &data) |
template<typename T , typename U > | |
T | pyne::data_access (std::pair< int, int > from_to, size_t valoffset, std::map< std::pair< int, int >, U > &data) |
template<typename T , typename U > | |
std::vector< T > | pyne::data_access (int parent, size_t valoffset, std::map< std::pair< int, int >, U > &data) |
template<typename T , typename U > | |
std::vector< T > | pyne::data_access (int parent, size_t valoffset, std::map< std::pair< int, unsigned int >, U > &data) |
template<typename U > | |
double | pyne::data_access (int parent, size_t valoffset, std::map< int, U > &data) |
template<typename T > | |
void | pyne::_load_data () |
template<> | |
void | pyne::_load_data< atomic > () |
std::vector< std::pair< double, double > > | pyne::calculate_xray_data (int z, double k_conv, double l_conv) |
template<> | |
void | pyne::_load_data< level_data > () |
int | pyne::id_from_level (int nuc, double level) |
Returns the nuc_id of an energy level. More... | |
int | pyne::id_from_level (int nuc, double level, std::string special) |
int | pyne::metastable_id (int nuc, int m) |
Returns the nuc_id of a metastable state. More... | |
int | pyne::metastable_id (int nuc) |
Assumes the first metastable state is the desired one. | |
double | pyne::half_life (int nuc) |
Returns the half life for a nuclide nuc. More... | |
double | pyne::half_life (char *nuc) |
Returns the half life for a nuclide nuc. | |
double | pyne::half_life (std::string nuc) |
Returns the half life for a nuclide nuc. | |
double | pyne::decay_const (int nuc) |
Returns the decay constant for a nuclide nuc. More... | |
double | pyne::decay_const (char *nuc) |
Returns the decay constant for a nuclide nuc. | |
double | pyne::decay_const (std::string nuc) |
Returns the decay constant for a nuclide nuc. | |
double | pyne::branch_ratio (std::pair< int, int > from_to) |
Returns the branch ratio for a parent/child nuclide pair. More... | |
double | pyne::branch_ratio (int from_nuc, int to_nuc) |
Returns the branch ratio for a parent/child nuclide pair. | |
double | pyne::branch_ratio (char *from_nuc, char *to_nuc) |
Returns the branch ratio for a parent/child nuclide pair. | |
double | pyne::branch_ratio (std::string from_nuc, std::string to_nuc) |
Returns the branch ratio for a parent/child nuclide pair. | |
double | pyne::state_energy (int nuc) |
Returns the excitation energy [MeV] of a nuc in a given state. More... | |
double | pyne::state_energy (char *nuc) |
Returns the excitation energy [MeV] of a nuc in a given state. | |
double | pyne::state_energy (std::string nuc) |
Returns the excitation energy [MeV] of a nuc in a given state. | |
std::set< int > | pyne::decay_children (int nuc) |
Returns a set of decay children of a nuc. More... | |
std::set< int > | pyne::decay_children (char *nuc) |
Returns the decay constant for a nuclide nuc. | |
std::set< int > | pyne::decay_children (std::string nuc) |
Returns the decay constant for a nuclide nuc. | |
template<> | |
void | pyne::_load_data< decay > () |
Loads the decay data from the nuc_data.h5 file into memory. | |
std::vector< int > | pyne::decay_data_children (int parent) |
std::pair< double, double > | pyne::decay_half_life (std::pair< int, int >) |
std::vector< std::pair< double, double > > | pyne::decay_half_lifes (int) |
std::pair< double, double > | pyne::decay_branch_ratio (std::pair< int, int >) |
std::vector< double > | pyne::decay_branch_ratios (int parent) |
std::pair< double, double > | pyne::decay_photon_branch_ratio (std::pair< int, int >) |
std::vector< std::pair< double, double > > | pyne::decay_photon_branch_ratios (int parent) |
std::pair< double, double > | pyne::decay_beta_branch_ratio (std::pair< int, int >) |
std::vector< std::pair< double, double > > | pyne::decay_beta_branch_ratios (int parent) |
template<> | |
void | pyne::_load_data< gamma > () |
Loads the gamma ray data from the nuc_data.h5 file into memory. | |
std::vector< std::pair< double, double > > | pyne::gamma_energy (int parent) |
std::vector< std::pair< double, double > > | pyne::gamma_energy (double energy, double error) |
std::vector< std::pair< double, double > > | pyne::gamma_photon_intensity (int parent) |
std::vector< std::pair< double, double > > | pyne::gamma_photon_intensity (double energy, double error) |
std::vector< std::pair< double, double > > | pyne::gamma_conversion_intensity (int parent) |
std::vector< std::pair< double, double > > | pyne::gamma_total_intensity (int parent) |
std::vector< std::pair< int, int > > | pyne::gamma_from_to (int parent) |
std::vector< std::pair< int, int > > | pyne::gamma_from_to (double energy, double error) |
std::vector< std::pair< int, int > > | pyne::gamma_parent_child (double energy, double error) |
std::vector< int > | pyne::gamma_parent (double energy, double error) |
std::vector< int > | pyne::gamma_child (double energy, double error) |
std::vector< int > | pyne::gamma_child (int parent) |
std::vector< std::pair< double, double > > | pyne::gamma_xrays (int parent) |
std::vector< std::pair< double, double > > | pyne::gammas (int parent_state_id) |
Returns a list of energies and intensities normalized to branching ratios. More... | |
std::vector< std::pair< double, double > > | pyne::alphas (int parent_state_id) |
std::vector< std::pair< double, double > > | pyne::betas (int parent_state_id) |
std::vector< std::pair< double, double > > | pyne::xrays (int parent) |
template<> | |
void | pyne::_load_data< alpha > () |
Loads the alpha decay data from the nuc_data.h5 file into memory. | |
std::vector< double > | pyne::alpha_energy (int parent) |
std::vector< double > | pyne::alpha_intensity (int parent) |
std::vector< int > | pyne::alpha_parent (double energy, double error) |
std::vector< int > | pyne::alpha_child (double energy, double error) |
std::vector< int > | pyne::alpha_child (int parent) |
template<> | |
void | pyne::_load_data< beta > () |
Loads the beta decay data from the nuc_data.h5 file into memory. | |
std::vector< double > | pyne::beta_endpoint_energy (int parent) |
std::vector< double > | pyne::beta_average_energy (int parent) |
std::vector< double > | pyne::beta_intensity (int parent) |
std::vector< int > | pyne::beta_parent (double energy, double error) |
std::vector< int > | pyne::beta_child (double energy, double error) |
std::vector< int > | pyne::beta_child (int parent) |
template<> | |
void | pyne::_load_data< ecbp > () |
std::vector< double > | pyne::ecbp_endpoint_energy (int parent) |
std::vector< double > | pyne::ecbp_average_energy (int parent) |
std::vector< double > | pyne::ec_intensity (int parent) |
std::vector< double > | pyne::bp_intensity (int parent) |
std::vector< int > | pyne::ecbp_parent (double energy, double error) |
std::vector< int > | pyne::ecbp_child (double energy, double error) |
std::vector< int > | pyne::ecbp_child (int parent) |
std::vector< std::pair< double, double > > | pyne::ecbp_xrays (int parent) |
Implements basic nuclear data functions.