6 #ifndef PYNE_TEWK4A7VOFFLHDDXD5ZZ7KPXEQ 7 #define PYNE_TEWK4A7VOFFLHDDXD5ZZ7KPXEQ 23 #ifndef PYNE_IS_AMALGAMATED 35 extern const double pi;
36 extern const double N_A;
66 std::map<std::string, std::string> get_data_checksums();
112 extern std::map<int, double> gamma_frac_map;
132 double gamma_frac(
int nuc);
133 double gamma_frac(
const char *
nuc);
134 double gamma_frac(std::string
nuc);
155 extern std::map<int, dose> doe_dose_map;
156 extern std::map<int, dose> genii_dose_map;
160 void _load_dose_map(std::map<int, dose>& dm, std::string source_path);
200 extern std::map<int, double>
b_map;
240 double b(
char *
nuc);
242 double b(std::string
nuc);
285 extern std::map<std::pair<int, int>,
ndsfpysub> ndsfpy_data;
298 double fpyield(std::pair<int, int> from_to,
int source,
bool get_error);
300 double fpyield(
int from_nuc,
int to_nuc,
int source,
bool get_error);
302 double fpyield(
char * from_nuc,
char * to_nuc,
int source,
bool get_error);
304 double fpyield(std::string from_nuc, std::string to_nuc,
int source,
bool get_error);
318 bool operator()(
const std::pair<int, double>& lhs,
319 const std::pair<int, double>& rhs)
const;
325 template<
typename T,
typename U> std::vector<T>
data_access(
double emin,
326 double emax,
size_t valoffset, std::map<std::pair<int, double>, U> &data);
330 template<
typename T,
typename U> std::vector<T>
data_access(
int parent,
331 double min,
double max,
size_t valoffset,
332 std::map<std::pair<int, double>, U> &data);
336 template<
typename T,
typename U> T
data_access(std::pair<int, int> from_to,
337 size_t valoffset, std::map<std::pair<int, int>, U> &data);
341 template<
typename T,
typename U> std::vector<T>
data_access(
int parent,
342 size_t valoffset, std::map<std::pair<int, int>, U> &data);
343 template<
typename T,
typename U> std::vector<T>
data_access(
int parent,
344 size_t valoffset, std::map<std::pair<int, unsigned int>, U> &data);
348 template<
typename U>
double data_access(
int parent,
349 size_t valoffset, std::map<int, U> &data);
382 extern std::map<int, atomic> atomic_data_map;
384 template<
typename T>
void _load_data();
385 template<>
void _load_data<atomic>();
388 std::vector<std::pair<double, double> >
389 calculate_xray_data(
int z,
double k_conv,
double l_conv);
406 extern std::map<std::pair<int,unsigned int>,
level_data> level_data_rx_map;
408 template<>
void _load_data<level_data>();
458 double branch_ratio(std::string from_nuc, std::string to_nuc);
491 double photon_branch_ratio;
509 std::vector<int> decay_data_children(
int parent);
510 std::pair<double, double> decay_half_life(std::pair<int,int>);
511 std::vector<std::pair<double, double> > decay_half_lifes(
int);
512 std::pair<double, double> decay_branch_ratio(std::pair<int,int>);
513 std::vector<double> decay_branch_ratios(
int parent);
514 std::pair<double, double> decay_photon_branch_ratio(std::pair<int,int>);
515 std::vector<std::pair<double, double> >decay_photon_branch_ratios(
int parent);
516 std::pair<double, double> decay_beta_branch_ratio(std::pair<int,int>);
517 std::vector<std::pair<double, double> >decay_beta_branch_ratios(
int parent);
542 extern std::map<std::pair<int, double>,
gamma> gamma_data;
545 std::vector<std::pair<double, double> > gamma_energy(
int parent);
546 std::vector<std::pair<double, double> > gamma_energy(
double energy,
549 std::vector<std::pair<double, double> > gamma_photon_intensity(
int parent);
550 std::vector<std::pair<double, double> > gamma_photon_intensity(
double energy,
553 std::vector<std::pair<double, double> > gamma_conversion_intensity(
int parent);
555 std::vector<std::pair<double, double> > gamma_total_intensity(
int parent);
557 std::vector<std::pair<int, int> > gamma_from_to(
int parent);
559 std::vector<std::pair<int, int> > gamma_from_to(
double energy,
double error);
561 std::vector<std::pair<int, int> > gamma_parent_child(
double energy,
double error);
563 std::vector<int> gamma_parent(
double energy,
double error);
565 std::vector<int> gamma_child(
double energy,
double error);
567 std::vector<int> gamma_child(
int parent);
570 std::vector<std::pair<double, double> > gamma_xrays(
int parent);
573 std::vector<std::pair<double, double> >
gammas(
int parent_state_id);
574 std::vector<std::pair<double, double> > alphas(
int parent_state_id);
575 std::vector<std::pair<double, double> > betas(
int parent_state_id);
576 std::vector<std::pair<double, double> > xrays(
int parent);
593 std::vector<double > alpha_energy(
int parent);
595 std::vector<double> alpha_intensity(
int parent);
597 std::vector<int> alpha_parent(
double energy,
double error);
599 std::vector<int> alpha_child(
double energy,
double error);
601 std::vector<int> alpha_child(
int parent);
618 std::vector<double > beta_endpoint_energy(
int parent);
620 std::vector<double > beta_average_energy(
int parent);
622 std::vector<double> beta_intensity(
int parent);
624 std::vector<int> beta_parent(
double energy,
double error);
626 std::vector<int> beta_child(
double energy,
double error);
628 std::vector<int> beta_child(
int parent);
654 std::vector<double > ecbp_average_energy(
int parent);
657 std::vector<double> ec_intensity(
int parent);
659 std::vector<double> bp_intensity(
int parent);
662 std::vector<int> ecbp_parent(
double energy,
double error);
665 std::vector<int> ecbp_child(
double energy,
double error);
668 std::vector<int> ecbp_child(
int parent);
671 std::vector<std::pair<double, double> > ecbp_xrays(
int parent);
675 extern std::map<std::string, std::map<int, std::map<int, double> > >
687 double simple_xs(
int nuc, std::string rx, std::string energy);
692 double simple_xs(std::string
nuc,
int rx, std::string energy);
697 double simple_xs(std::string
nuc, std::string rx, std::string energy);
707 virtual const char*
what()
const throw() {
unsigned int rx_id
rx id of reaction, 0 for basic level data
Definition: data.h:395
struct pyne::alpha alpha
a struct matching the '/decay/alphas' table in nuc_data.h5.
std::map< std::pair< int, int >, decay > decay_data
Definition: data.cpp:1672
A struct matching the dose factor table in nuc_data.h5.
Definition: data.h:142
xd_complex_t b_incoherent
incoherent scattering length [cm]
Definition: data.h:206
std::map< std::string, std::map< int, std::map< int, double > > > simple_xs_map
map<energy, map<nuclide, map<rx, xs> > >
Definition: data.cpp:2520
int to_nuc
state id of child nuclide
Definition: data.h:633
double k_conv_e
k conversion electron fraction
Definition: data.h:638
double yield_fast_err
fast yield error [fraction]
Definition: data.h:269
struct pyne::atomic atomic
Structure for atomic data.
double prob
probability K shell hole is filled by L shell [fraction]
Definition: data.h:358
double yield_thermal
thermal yield [fraction]
Definition: data.h:266
std::map< int, double > q_val_map
Definition: data.cpp:255
struct pyne::ndsfpysub ndsfpysub
a struct for the nds data for fpyield
double photon_intensity
photon intensity
Definition: data.h:528
int to_nuc
state id of child nuclide
Definition: data.h:606
double ext_soil_dose(int nuc, int source)
Definition: data.cpp:507
double b(int nuc)
Computes the scattering length [cm] from the coherent and incoherent components.
Definition: data.cpp:835
int nuc
nuclide in id form
Definition: data.h:59
double branch_ratio(std::pair< int, int > from_to)
Returns the branch ratio for a parent/child nuclide pair.
Definition: data.cpp:1622
int nuc_id
state id of nuclide
Definition: data.h:394
double energy
energy of alpha
Definition: data.h:582
double dose_ratio(int nuc, int source)
Dose Ratio.
Definition: data.cpp:481
double total_intensity
total decay intensity
Definition: data.h:532
const double Bq_per_Ci
Becquerel per Curie.
Definition: data.cpp:18
double xs
scattering cross section
Definition: data.h:209
std::string dose_lung_model(int nuc, int source)
Lung Model.
Definition: data.cpp:606
void _load_data< gamma >()
Loads the gamma ray data from the nuc_data.h5 file into memory.
complex type struct, matching PyTables definition
Definition: extra_types.h:56
double ext_soil_dose
nuclide ext_soil dose factor [mrem/h per Ci/m^2]
Definition: data.h:146
void _load_dose_map(std::map< int, dose > &dm, std::string source_path)
Definition: data.cpp:359
int metastable_id(int nuc, int m)
Returns the nuc_id of a metastable state.
Definition: data.cpp:1468
void _load_data< ecbp >()
double ka2_x_ray_en
Ka2 X-ray energy [keV].
Definition: data.h:375
double ingest_dose(int nuc, int source)
Ingestion.
Definition: data.cpp:535
int nuc
nuclide in id form
Definition: data.h:204
double kb_to_ka_err
error in ratio of Kb to Ka fluorescence [fraction]
Definition: data.h:368
double ni_shell_be
N-shell binding energy [fraction].
Definition: data.h:365
double l_conv_e
l conversion electron fraction
Definition: data.h:639
double conv_intensity_err
conversion intensity error
Definition: data.h:531
int child_nuc
stateless id of the child nucleus
Definition: data.h:525
std::map< int, double > atomic_mass_map
Mapping from nuclides in id form to their atomic masses.
Definition: atomic_data.h:35
std::map< int, double > natural_abund_map
Mapping from nuclides in id form to their natural abundances.
Definition: atomic_data.h:32
double yield_14MeV
14 MeV yield [fraction]
Definition: data.h:270
const double barns_per_cm2
barns per cm^2
Definition: data.cpp:13
struct pyne::wimsdfpy wimsdfpy
a struct matching the '/neutron/wimsd_fission_product' table in nuc_data.h5.
int to_nuc
state id of child nuclide
Definition: data.h:581
double avg_energy
beta decay average energy
Definition: data.h:608
double half_life_error
half life error of the decay [s]
Definition: data.h:488
double l_auger
Auger electrons from l shell holes [fraction].
Definition: data.h:372
double yield_fast
fast yield [fraction]
Definition: data.h:278
double yield_thermal_err
thermal yield error [fraction]
Definition: data.h:267
double avg_energy
beta decay average energy
Definition: data.h:635
Structure for atomic data.
Definition: data.h:352
struct pyne::ecbp ecbp
A struct matching the '/decay/ecbp' table in nuc_data.h5.
double li_shell_be_err
L-shell binding energy error [fraction].
Definition: data.h:362
double m_conv_e
m conversion electron fraction
Definition: data.h:640
Custom exception for declaring a simple_xs request invalid.
Definition: data.h:700
void _load_data< decay >()
Loads the decay data from the nuc_data.h5 file into memory.
double mass
nuclide atomic mass [amu]
Definition: data.h:60
std::map< int, double > b_map
Mapping from nuclides in id form to their scattering length.
Definition: data.cpp:634
void _load_q_val_map()
Loads the q_value data from the nuc_data.h5 file into memory.
Definition: data.cpp:213
int from_nuc
state id of parent nuclide
Definition: data.h:632
int from_nuc
state id of parent nuclide
Definition: data.h:605
const double N_A
Avogadro's Number.
Definition: data.cpp:12
double ratio
ratio of external air dose factor to dose factor due to inhalation
Definition: data.h:145
std::vector< double > ecbp_endpoint_energy(int parent)
Definition: data.cpp:2284
xd_complex_t b_coherent(int nuc)
Finds the coherent scattering length [cm] for a nuclide nuc.
Definition: data.cpp:694
int id_from_level(int nuc, double level)
Returns the nuc_id of an energy level.
Definition: data.cpp:1461
std::map< std::pair< int, double >, alpha > alpha_data
A vector of structs containing alpha data for access in memory.
Definition: data.cpp:2061
double dose_fluid_frac(int nuc, int source)
Fluid Fraction.
Definition: data.cpp:557
a struct matching the '/neutron/wimsd_fission_product' table in nuc_data.h5.
Definition: data.h:253
struct pyne::scattering_lengths scattering_lengths
a struct matching the '/neutron/scattering_lengths' table in nuc_data.h5.
double branch_ratio_error
Definition: data.h:490
double beta_branch_ratio_error
beta branching ratio error of this decay [fraction]
Definition: data.h:498
Data access functions.
Definition: data.h:315
double energy
energy of the photon [keV]
Definition: data.h:526
a struct matching the '/decay/betas' table in nuc_data.h5.
Definition: data.h:604
double l_shell_fluor_error
L-shell fluorescence error [fraction].
Definition: data.h:357
double conv_intensity
conversion intensity
Definition: data.h:530
double l_x_ray_en
L X-ray energy [keV].
Definition: data.h:378
double ni_shell_be_err
N-shell binding energy error [fraction].
Definition: data.h:366
double level
level energy [keV]
Definition: data.h:397
double branch_ratio
branch ratio [fraction]
Definition: data.h:398
std::string NUC_DATA_PATH
Path to the nuc_data.h5 file.
Definition: utils.h:51
a struct matching the q_value table in nuc_data.h5.
Definition: data.h:115
int from_nuc
from nuclide in id form
Definition: data.h:254
std::map< std::pair< int, double >, beta > beta_data
A vector of structs containing beta data for access in memory.
Definition: data.cpp:2138
double ec_intensity
intensity of electron capture
Definition: data.h:637
int child
state id of decay child
Definition: data.h:485
double yield_fast
fast yield [fraction]
Definition: data.h:268
a struct matching the '/decay/alphas' table in nuc_data.h5.
Definition: data.h:579
const double Ci_per_Bq
Curies per Becquerel.
Definition: data.cpp:19
double branch_ratio
branching ratio of this decay [fraction]
Definition: data.h:489
double l_conv_e
l conversion electron fraction
Definition: data.h:535
double k_shell_be_err
K-shell binding energy error [fraction].
Definition: data.h:360
double inhale_dose
nuclide dose factor due to inhalation [mrem/pCi]
Definition: data.h:149
double yield_fast_err
fast yield error [fraction]
Definition: data.h:279
double ingest_dose
nuclide dose factor due to ingestion [mrem/pCi]
Definition: data.h:147
void _load_scattering_lengths()
Loads the scattering length data from the nuc_data.h5 file into memory.
Definition: data.cpp:637
double gamma_frac
fraction of q that comes from gammas
Definition: data.h:118
double k_shell_fluor_error
K-shell fluorescence error [fraction].
Definition: data.h:355
struct pyne::dose dose
A struct matching the dose factor table in nuc_data.h5.
a struct matching the '/decay/decays' table in nuc_data.h5.
Definition: data.h:483
double state_energy(int nuc)
Returns the excitation energy [MeV] of a nuc in a given state.
Definition: data.cpp:1547
struct pyne::ndsfpy ndsfpy
a struct matching the '/neutron/nds_fission_product' table in nuc_data.h5
double m_conv_e
m conversion electron fraction
Definition: data.h:536
double yield_14MeV
14 MeV yield [fraction]
Definition: data.h:280
double inhale_dose(int nuc, int source)
Inhalation.
Definition: data.cpp:584
a struct matching the '/decay/level_list' table in nuc_data.h5.
Definition: data.h:393
void _load_ndsfpy()
Loads the NDS fission product yield data from the nuc_data.h5 file into memory.
Definition: data.cpp:926
A struct matching the '/decay/ecbp' table in nuc_data.h5.
Definition: data.h:631
char special
special high-spin state [character]
Definition: data.h:400
int to_nuc
state id of final level
Definition: data.h:523
double fluid_frac
fraction of activity abosorbed in body fluids
Definition: data.h:148
double photon_branch_ratio_error
photon branching ratio error of this decay [fraction]
Definition: data.h:494
int from_nuc
state id of starting level
Definition: data.h:522
double k_shell_be
K-shell binding energy [fraction].
Definition: data.h:359
double natural_abund(int nuc)
Returns the natural abundance of a nuclide nuc.
Definition: data.cpp:157
double mi_shell_be_err
M-shell binding energy error [fraction].
Definition: data.h:364
struct pyne::q_val_data q_val_data
a struct matching the q_value table in nuc_data.h5.
double ext_air_dose(int nuc, int source)
Returns the dose factors of a nuclide.
Definition: data.cpp:458
double k_shell_fluor
K-shell fluorescence [fraction].
Definition: data.h:354
std::map< std::pair< int, double >, ecbp > ecbp_data
A vector of structs containing ecbp data for access in memory.
Definition: data.cpp:2223
double ext_air_dose
nuclide ext_air dose factor [mrem/h per Ci/m^3]
Definition: data.h:144
xd_complex_t b_incoherent(int nuc)
Finds the incoherent scattering length [cm] for a nuclide nuc.
Definition: data.cpp:766
double intensity
beta intensity
Definition: data.h:609
double l_shell_fluor
L-shell fluorescence [fraction].
Definition: data.h:356
struct pyne::decay decay
a struct matching the '/decay/decays' table in nuc_data.h5.
std::map< int, xd_complex_t > b_coherent_map
Mapping from nuclides in id form to their coherent scattering length.
Definition: data.cpp:632
struct pyne::gamma gamma
a struct matching the '/decay/gammas' table in nuc_data.h5.
double q_val(int nuc)
Returns the q_value of a nuclide nuc.
Definition: data.cpp:257
int to_nuc
from nuclide in id form
Definition: data.h:255
const double MeV_per_MJ
MeV per MJ.
Definition: data.cpp:17
struct pyne::level_data level_data
a struct matching the '/decay/level_list' table in nuc_data.h5.
a struct matching the '/decay/gammas' table in nuc_data.h5.
Definition: data.h:521
double abund
natural abundance of nuclide [atom fraction]
Definition: data.h:62
void _load_atomic_mass_map()
Definition: data.cpp:47
double intensity
intensity of alpha decay
Definition: data.h:583
int nuc
nuclide in id form
Definition: data.h:143
double k_auger
Auger electrons from k shell holes [fraction].
Definition: data.h:371
double endpoint_energy
beta decay endpoint energy
Definition: data.h:634
std::map< std::pair< int, double >, level_data > level_data_lvl_map
Definition: data.cpp:1364
std::vector< T > data_access(double emin, double emax, size_t valoffset, std::map< std::pair< int, double >, U > &data)
Definition: data.cpp:1079
Provides some HDF5 helper functionality in its own namespace.
void _load_data< beta >()
Loads the beta decay data from the nuc_data.h5 file into memory.
double yield_14MeV_err
14 MeV yield error [fraction]
Definition: data.h:281
virtual const char * what() const
Exception returns the string passed when thrown.
Definition: data.h:707
double q_val
nuclide q_value [MeV/fission]
Definition: data.h:117
double ka1_x_ray_en_err
Ka1 X-ray energy error [keV].
Definition: data.h:374
double yield_14MeV_err
14 MeV yield error [fraction]
Definition: data.h:271
double xs_coherent
coherent scattering cross section
Definition: data.h:207
double endpoint_energy
beta decay endpoint energy
Definition: data.h:607
double kb_to_ka
ratio of Kb to Ka fluorescence [fraction]
Definition: data.h:367
std::set< int > decay_children(int nuc)
Returns a set of decay children of a nuc.
Definition: data.cpp:1498
const double cm2_per_barn
cm^2 per barn
Definition: data.cpp:14
struct pyne::beta beta
a struct matching the '/decay/betas' table in nuc_data.h5.
void _load_data< alpha >()
Loads the alpha decay data from the nuc_data.h5 file into memory.
a struct matching the atomic_mass table in nuc_data.h5.
Definition: data.h:58
struct pyne::atomic_mass_data atomic_mass_data
a struct matching the atomic_mass table in nuc_data.h5.
double yields
fission product yield, fraction [unitless]
Definition: data.h:256
a struct matching the '/neutron/nds_fission_product' table in nuc_data.h5
Definition: data.h:263
double energy_err
energy error of the photon [keV]
Definition: data.h:527
double xs_incoherent
incoherent scattering cross section
Definition: data.h:208
int from_nuc
state id of parent nuclide
Definition: data.h:580
int parent
state id of decay parent
Definition: data.h:484
std::map< std::string, std::string > data_checksums
Mapping from nodes in nuc_data.h5 to hashes of nodes.
Definition: data.cpp:39
std::vector< std::pair< double, double > > gammas(int parent_state_id)
Returns a list of energies and intensities normalized to branching ratios.
Definition: data.cpp:2362
double photon_intensity_err
photon intensity error
Definition: data.h:529
double yield_thermal_err
thermal yield error [fraction]
Definition: data.h:277
double total_intensity_err
total decay intensity error
Definition: data.h:533
const double pi
pi = 3.14159265359
Definition: data.cpp:11
const double MeV_per_K
MeV per Kelvin.
Definition: data.cpp:16
double ka1_x_ray_en
Ka1 X-ray energy [keV].
Definition: data.h:373
double half_life(int nuc)
Returns the half life for a nuclide nuc.
Definition: data.cpp:1598
int z
number of protons [int]
Definition: data.h:353
int from_nuc
id of fissioning nuclide
Definition: data.h:264
double decay_const(int nuc)
Returns the decay constant for a nuclide nuc.
Definition: data.cpp:1572
double yield_thermal
thermal yield [fraction]
Definition: data.h:276
A container representing enrichment cascades.
Definition: _atomic_data.h:16
double fpyield(std::pair< int, int > from_to, int source, bool get_error)
Returns the fission product yield for a parent/child nuclide pair.
Definition: data.cpp:993
double beta_plus_intensity
intensity of beta plus decay
Definition: data.h:636
int parent_nuc
state id of the primary decaying nucleus
Definition: data.h:524
std::map< int, xd_complex_t > b_incoherent_map
Mapping from nuclides in id form to their incoherent scattering length.
Definition: data.cpp:633
void _load_wimsdfpy()
Loads the WIMSD fission product yield data from the nuc_data.h5 file into memory. ...
Definition: data.cpp:875
double simple_xs(int nuc, int rx, std::string energy)
Definition: data.cpp:2598
const double sec_per_day
seconds per day
Definition: data.cpp:15
a struct matching the '/neutron/scattering_lengths' table in nuc_data.h5.
Definition: data.h:203
std::map< int, dose > epa_dose_map
Mapping from int to dose for 3 sources.
Definition: data.cpp:448
double atomic_mass(int nuc)
Returns the atomic mass of a nuclide nuc.
Definition: data.cpp:95
double mi_shell_be
M-shell binding energy [fraction].
Definition: data.h:363
int nuc
nuclide in id form
Definition: data.h:116
double k_conv_e
k conversion electron fraction
Definition: data.h:534
unsigned int decay
rx id of decay
Definition: data.h:486
double half_life
half life of the decay [s]
Definition: data.h:487
double ka2_to_ka1
Ka2 to Ka1 fluorescence ratio [fraction].
Definition: data.h:369
int to_nuc
id of fission product
Definition: data.h:265
a struct for the nds data for fpyield
Definition: data.h:275
double error
error in atomic mass [amu]
Definition: data.h:61
double ka2_x_ray_en_err
Ka2 X-ray energy error [keV].
Definition: data.h:376
int metastable
metastable level [int]
Definition: data.h:399
double kb_x_ray_en
Kb X-ray energy [keV].
Definition: data.h:377
std::map< std::pair< int, int >, double > wimsdfpy_data
Mapping from nuclides in id form to their scattering length.
Definition: data.cpp:872
InvalidSimpleXS(std::string msg)
Exception thrown if energy group or rxname are invalid.
Definition: data.h:705
double ka2_to_ka1_err
Ka2 to Ka1 fluorescence error [fraction].
Definition: data.h:370
xd_complex_t b_coherent
coherent scattering length [cm]
Definition: data.h:205
char lung_mod
model of lung used (time of biological half life– D, W, or Y)
Definition: data.h:150
double beta_branch_ratio
beta branching ratio of this decay [fraction]
Definition: data.h:496
double half_life
half life [seconds]
Definition: data.h:396
double li_shell_be
L-shell binding energy [fraction].
Definition: data.h:361