PyNE C++
data.h
Go to the documentation of this file.
1 
6 #ifndef PYNE_TEWK4A7VOFFLHDDXD5ZZ7KPXEQ
7 #define PYNE_TEWK4A7VOFFLHDDXD5ZZ7KPXEQ
8 #include <iostream>
9 #include <string>
10 #include <utility>
11 #include <map>
12 #include <set>
13 #include <limits>
14 #include <exception>
15 #include <stdlib.h>
16 #include <stdio.h>
17 #include <float.h>
18 #include <math.h>
19 
20 #include "hdf5.h"
21 #include "hdf5_hl.h"
22 
23 #ifndef PYNE_IS_AMALGAMATED
24 #include "h5wrap.h"
25 #include "extra_types.h"
26 #include "utils.h"
27 #include "nucname.h"
28 #include "rxname.h"
29 #endif
30 
31 namespace pyne
32 {
35  extern const double pi;
36  extern const double N_A;
37  extern const double barns_per_cm2;
38  extern const double cm2_per_barn;
39  extern const double sec_per_day;
40  extern const double MeV_per_K;
41  extern const double MeV_per_MJ;
42  extern const double Bq_per_Ci;
43  extern const double Ci_per_Bq;
44 
46  extern std::string NUC_DATA_PATH;
47 
49  extern std::map<std::string, std::string> data_checksums;
50 
53 
55  extern std::map<int, double> atomic_mass_map;
56 
58  typedef struct atomic_mass_data {
59  int nuc;
60  double mass;
61  double error;
62  double abund;
64 
65  // Loads preset dataset hashes into memory.
66  std::map<std::string, std::string> get_data_checksums();
67 
70  void _load_atomic_mass_map();
71 
78  double atomic_mass(int nuc);
80  double atomic_mass(char * nuc);
82  double atomic_mass(std::string nuc);
84 
85 
88 
90  extern std::map<int, double> natural_abund_map;
91 
97  double natural_abund(int nuc);
99  double natural_abund(char * nuc);
101  double natural_abund(std::string nuc);
103 
104 
105 
108 
111  extern std::map<int, double> q_val_map;
112  extern std::map<int, double> gamma_frac_map;
113 
115  typedef struct q_val_data {
116  int nuc;
117  double q_val;
118  double gamma_frac;
119  } q_val_data;
120 
122  void _load_q_val_map();
123 
129  double q_val(int nuc);
130  double q_val(const char * nuc);
131  double q_val(std::string nuc);
132  double gamma_frac(int nuc);
133  double gamma_frac(const char * nuc);
134  double gamma_frac(std::string nuc);
136 
137 
140 
142  typedef struct dose {
143  int nuc;
144  double ext_air_dose;
145  double ratio;
146  double ext_soil_dose;
147  double ingest_dose;
148  double fluid_frac;
149  double inhale_dose;
150  char lung_mod;
151  } dose;
152 
154  extern std::map<int, dose> epa_dose_map;
155  extern std::map<int, dose> doe_dose_map;
156  extern std::map<int, dose> genii_dose_map;
157 
160  void _load_dose_map(std::map<int, dose>& dm, std::string source_path);
161 
167  double ext_air_dose(int nuc, int source);
168  double ext_air_dose(const char * nuc, int source);
169  double ext_air_dose(std::string nuc, int source);
170  double ext_soil_dose(int nuc, int source);
171  double ext_soil_dose(const char * nuc, int source);
172  double ext_soil_dose(std::string nuc, int source);
173  double ingest_dose(int nuc, int source);
174  double ingest_dose(const char * nuc, int source);
175  double ingest_dose(std::string nuc, int source);
176  double inhale_dose(int nuc, int source);
177  double inhale_dose(const char * nuc, int source);
178  double inhale_dose(std::string nuc, int source);
179  double dose_ratio(int nuc, int source);
180  double dose_ratio(const char * nuc, int source);
181  double dose_ratio(std::string nuc, int source);
182  double dose_fluid_frac(int nuc, int source);
183  double dose_fluid_frac(const char * nuc, int source);
184  double dose_fluid_frac(std::string nuc, int source);
185  std::string dose_lung_model(int nuc, int source);
186  std::string dose_lung_model(const char * nuc, int source);
187  std::string dose_lung_model(std::string nuc, int source);
189 
190 
191 
194 
196  extern std::map<int, xd_complex_t> b_coherent_map;
198  extern std::map<int, xd_complex_t> b_incoherent_map;
200  extern std::map<int, double> b_map;
201 
203  typedef struct scattering_lengths {
204  int nuc;
207  double xs_coherent;
208  double xs_incoherent;
209  double xs;
211 
214 
224  xd_complex_t b_coherent(char * nuc);
226  xd_complex_t b_coherent(std::string nuc);
227 
233  xd_complex_t b_incoherent(char * nuc);
235  xd_complex_t b_incoherent(std::string nuc);
236 
238  double b(int nuc);
240  double b(char * nuc);
242  double b(std::string nuc);
244 
245 
248 
250  extern std::map<std::pair<int, int>, double> wimsdfpy_data;
251 
253  typedef struct wimsdfpy {
254  int from_nuc;
255  int to_nuc;
256  double yields;
257  } wimsdfpy;
258 
260  void _load_wimsdfpy();
261 
263  typedef struct ndsfpy {
264  int from_nuc;
265  int to_nuc;
266  double yield_thermal;
268  double yield_fast;
269  double yield_fast_err;
270  double yield_14MeV;
272  } ndsfpy;
273 
275  typedef struct ndsfpysub {
276  double yield_thermal;
278  double yield_fast;
279  double yield_fast_err;
280  double yield_14MeV;
282  } ndsfpysub;
283 
284 
285  extern std::map<std::pair<int, int>, ndsfpysub> ndsfpy_data;
286 
288  void _load_ndsfpy();
289 
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);
305 
307 
308 
311 
313 
316  public:
318  bool operator()(const std::pair<int, double>& lhs,
319  const std::pair<int, double>& rhs) const;
320  };
321 
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);
345 
348  template<typename U> double data_access(int parent,
349  size_t valoffset, std::map<int, U> &data);
350 
352  typedef struct atomic{
353  int z;
354  double k_shell_fluor;
356  double l_shell_fluor;
358  double prob;
359  double k_shell_be;
360  double k_shell_be_err;
361  double li_shell_be;
363  double mi_shell_be;
365  double ni_shell_be;
367  double kb_to_ka;
368  double kb_to_ka_err;
369  double ka2_to_ka1;
370  double ka2_to_ka1_err;
371  double k_auger;
372  double l_auger;
373  double ka1_x_ray_en;
375  double ka2_x_ray_en;
377  double kb_x_ray_en;
378  double l_x_ray_en;
379  } atomic;
380 
381  // map of Z to atomic data
382  extern std::map<int, atomic> atomic_data_map;
383 
384  template<typename T> void _load_data();
385  template<> void _load_data<atomic>();
386 
387  // compute X-ray data
388  std::vector<std::pair<double, double> >
389  calculate_xray_data(int z, double k_conv, double l_conv);
390 
391 
393  typedef struct level_data{
394  int nuc_id;
395  unsigned int rx_id;
396  double half_life;
397  double level;
398  double branch_ratio;
400  char special;
401  } level_data;
402 
405  extern std::map<std::pair<int,double>, level_data> level_data_lvl_map;
406  extern std::map<std::pair<int,unsigned int>, level_data> level_data_rx_map;
407 
408  template<> void _load_data<level_data>();
409 
414  int id_from_level(int nuc, double level);
415  int id_from_level(int nuc, double level, std::string special);
421  int metastable_id(int nuc, int m);
423  int metastable_id(int nuc);
424 
430  double half_life(int nuc);
432  double half_life(char * nuc);
434  double half_life(std::string nuc);
435 
441  double decay_const(int nuc);
443  double decay_const(char * nuc);
445  double decay_const(std::string nuc);
446 
452  double branch_ratio(std::pair<int, int> from_to);
454  double branch_ratio(int from_nuc, int to_nuc);
456  double branch_ratio(char * from_nuc, char * to_nuc);
458  double branch_ratio(std::string from_nuc, std::string to_nuc);
459 
465  double state_energy(int nuc);
467  double state_energy(char * nuc);
469  double state_energy(std::string nuc);
470 
476  std::set<int> decay_children(int nuc);
478  std::set<int> decay_children(char * nuc);
480  std::set<int> decay_children(std::string nuc);
481 
483  typedef struct decay{
484  int parent;
485  int child;
486  unsigned int decay;
487  double half_life;
489  double branch_ratio;
491  double photon_branch_ratio;
499  } decay;
500 
502  template<> void _load_data<decay>();
505  extern std::map<std::pair<int, int>, decay> decay_data;
506 
507  //
508  //
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);
518 
519 
521  typedef struct gamma{
522  int from_nuc;
523  int to_nuc;
525  int child_nuc;
526  double energy;
527  double energy_err;
530  double conv_intensity;
534  double k_conv_e;
535  double l_conv_e;
536  double m_conv_e;
537  } gamma;
538 
540  template<> void _load_data<gamma>();
541 
542  extern std::map<std::pair<int, double>, gamma> gamma_data;
543 
544  //returns a list of gamma decay energies from input parent nuclide
545  std::vector<std::pair<double, double> > gamma_energy(int parent);
546  std::vector<std::pair<double, double> > gamma_energy(double energy,
547  double error);
548  //returns a list of gamma photon intensities from input parent nuclide
549  std::vector<std::pair<double, double> > gamma_photon_intensity(int parent);
550  std::vector<std::pair<double, double> > gamma_photon_intensity(double energy,
551  double error);
552  //returns a list of gamma conversion intensities from input parent nuclide
553  std::vector<std::pair<double, double> > gamma_conversion_intensity(int parent);
554  //returns a list of gamma total intensities from input parent nuclide
555  std::vector<std::pair<double, double> > gamma_total_intensity(int parent);
556  //returns a list of pairs of excited state transitions from an input parent nuclide
557  std::vector<std::pair<int, int> > gamma_from_to(int parent);
558  //returns a list of pairs of excited state transitions from an decay energy
559  std::vector<std::pair<int, int> > gamma_from_to(double energy, double error);
560  //returns a list of parent/child pairs associated with an input decay energy
561  std::vector<std::pair<int, int> > gamma_parent_child(double energy, double error);
562  //returns a list of parent nuclides associated with an input decay energy
563  std::vector<int> gamma_parent(double energy, double error);
564  // returns a list of child state_id's based on a gamma-ray energy
565  std::vector<int> gamma_child(double energy, double error);
566  // returns a list of child state_id's based on a parent state_id
567  std::vector<int> gamma_child(int parent);
568  //returns an array of arrays of X-ray energies and intesities for a
569  //given parent
570  std::vector<std::pair<double, double> > gamma_xrays(int parent);
571 
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);
577 
579  typedef struct alpha{
580  int from_nuc;
581  int to_nuc;
582  double energy;
583  double intensity;
584  } alpha;
585 
587  template<> void _load_data<alpha>();
588 
590  extern std::map<std::pair<int, double>, alpha> alpha_data;
591 
592  //returns a list of alpha decay energies from input parent nuclide
593  std::vector<double > alpha_energy(int parent);
594  //returns a list of alpha decay intensities from input parent nuclide
595  std::vector<double> alpha_intensity(int parent);
596  //returns a list of alpha decay parents from input decay energy range
597  std::vector<int> alpha_parent(double energy, double error);
598  //returns a list of alpha decay children from input decay energy range
599  std::vector<int> alpha_child(double energy, double error);
600  //returns a list of alpha decay children from input parent nuclide
601  std::vector<int> alpha_child(int parent);
602 
604  typedef struct beta{
605  int from_nuc;
606  int to_nuc;
608  double avg_energy;
609  double intensity;
610  } beta;
611 
613  template<> void _load_data<beta>();
614 
616  extern std::map<std::pair<int, double>, beta> beta_data;
617  //returns a list of beta decay endpoint energies from input parent nuclide
618  std::vector<double > beta_endpoint_energy(int parent);
619  //returns a list of beta decay average energies from input parent nuclide
620  std::vector<double > beta_average_energy(int parent);
621  //returns a list of beta decay intensities from input parent nuclide
622  std::vector<double> beta_intensity(int parent);
623  //returns a list of beta decay parents from input decay energy range
624  std::vector<int> beta_parent(double energy, double error);
625  //returns a list of beta decay children from input decay energy range
626  std::vector<int> beta_child(double energy, double error);
627  //returns a list of beta decay children from input parent nuclide
628  std::vector<int> beta_child(int parent);
629 
631  typedef struct ecbp{
632  int from_nuc;
633  int to_nuc;
635  double avg_energy;
637  double ec_intensity;
638  double k_conv_e;
639  double l_conv_e;
640  double m_conv_e;
641  } ecbp;
642 
644  extern std::map<std::pair<int, double>, ecbp> ecbp_data;
645 
648  template<> void _load_data<ecbp>();
651  std::vector<double > ecbp_endpoint_energy(int parent);
652  //returns a list of electron capture/ beta plus decay average energies from
653  //input parent nuclide
654  std::vector<double > ecbp_average_energy(int parent);
655  //returns a list of electron capture decay intensities from input parent
656  //nuclide
657  std::vector<double> ec_intensity(int parent);
658  //returns a list of beta plus decay intensities from input parent nuclide
659  std::vector<double> bp_intensity(int parent);
660  //returns a list of electron capture /beta plus decay parents from input
661  //decay energy range
662  std::vector<int> ecbp_parent(double energy, double error);
663  //returns a list of electron capture /beta plus decay children from input
664  //decay energy range
665  std::vector<int> ecbp_child(double energy, double error);
666  //returns a list of electron capture /beta plus decay children from input
667  //parent nuclide
668  std::vector<int> ecbp_child(int parent);
669  //returns an array of arrays of X-ray energies and intesities for a
670  //given parent
671  std::vector<std::pair<double, double> > ecbp_xrays(int parent);
673 
675  extern std::map<std::string, std::map<int, std::map<int, double> > >
677 
682  double simple_xs(int nuc, int rx, std::string energy);
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);
698 
700  class InvalidSimpleXS : public std::exception {
701  public:
702  InvalidSimpleXS () {};
703  ~InvalidSimpleXS () throw () {};
705  InvalidSimpleXS(std::string msg) : msg_(msg) {};
707  virtual const char* what() const throw() {
708  return msg_.c_str();
709  };
710 
711  private:
712  std::string msg_;
713  };
714 
715 } // namespace pyne
716 
717 #endif
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 &#39;/decay/alphas&#39; 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 &#39;/neutron/wimsd_fission_product&#39; 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 &#39;/decay/ecbp&#39; 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&#39;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 &#39;/neutron/wimsd_fission_product&#39; table in nuc_data.h5.
Definition: data.h:253
struct pyne::scattering_lengths scattering_lengths
a struct matching the &#39;/neutron/scattering_lengths&#39; 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 &#39;/decay/betas&#39; 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 &#39;/decay/alphas&#39; 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 &#39;/decay/decays&#39; 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 &#39;/neutron/nds_fission_product&#39; 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 &#39;/decay/level_list&#39; 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 &#39;/decay/ecbp&#39; 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 &#39;/decay/decays&#39; 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 &#39;/decay/gammas&#39; 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 &#39;/decay/level_list&#39; table in nuc_data.h5.
a struct matching the &#39;/decay/gammas&#39; 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 &#39;/decay/betas&#39; 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 &#39;/neutron/nds_fission_product&#39; 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 &#39;/neutron/scattering_lengths&#39; 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