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);
420  int metastable_id(int nuc, int m);
422  int metastable_id(int nuc);
423 
429  double half_life(int nuc);
431  double half_life(char * nuc);
433  double half_life(std::string nuc);
434 
440  double decay_const(int nuc);
442  double decay_const(char * nuc);
444  double decay_const(std::string nuc);
445 
451  double branch_ratio(std::pair<int, int> from_to);
453  double branch_ratio(int from_nuc, int to_nuc);
455  double branch_ratio(char * from_nuc, char * to_nuc);
457  double branch_ratio(std::string from_nuc, std::string to_nuc);
458 
464  double state_energy(int nuc);
466  double state_energy(char * nuc);
468  double state_energy(std::string nuc);
469 
475  std::set<int> decay_children(int nuc);
477  std::set<int> decay_children(char * nuc);
479  std::set<int> decay_children(std::string nuc);
480 
482  typedef struct decay{
483  int parent;
484  int child;
485  unsigned int decay;
486  double half_life;
488  double branch_ratio;
490  double photon_branch_ratio;
498  } decay;
499 
501  template<> void _load_data<decay>();
504  extern std::map<std::pair<int, int>, decay> decay_data;
505 
506  //
507  //
508  std::vector<int> decay_data_children(int parent);
509  std::pair<double, double> decay_half_life(std::pair<int,int>);
510  std::vector<std::pair<double, double> > decay_half_lifes(int);
511  std::pair<double, double> decay_branch_ratio(std::pair<int,int>);
512  std::vector<double> decay_branch_ratios(int parent);
513  std::pair<double, double> decay_photon_branch_ratio(std::pair<int,int>);
514  std::vector<std::pair<double, double> >decay_photon_branch_ratios(int parent);
515  std::pair<double, double> decay_beta_branch_ratio(std::pair<int,int>);
516  std::vector<std::pair<double, double> >decay_beta_branch_ratios(int parent);
517 
518 
520  typedef struct gamma{
521  int from_nuc;
522  int to_nuc;
524  int child_nuc;
525  double energy;
526  double energy_err;
529  double conv_intensity;
533  double k_conv_e;
534  double l_conv_e;
535  double m_conv_e;
536  } gamma;
537 
539  template<> void _load_data<gamma>();
540 
541  extern std::map<std::pair<int, double>, gamma> gamma_data;
542 
543  //returns a list of gamma decay energies from input parent nuclide
544  std::vector<std::pair<double, double> > gamma_energy(int parent);
545  std::vector<std::pair<double, double> > gamma_energy(double energy,
546  double error);
547  //returns a list of gamma photon intensities from input parent nuclide
548  std::vector<std::pair<double, double> > gamma_photon_intensity(int parent);
549  std::vector<std::pair<double, double> > gamma_photon_intensity(double energy,
550  double error);
551  //returns a list of gamma conversion intensities from input parent nuclide
552  std::vector<std::pair<double, double> > gamma_conversion_intensity(int parent);
553  //returns a list of gamma total intensities from input parent nuclide
554  std::vector<std::pair<double, double> > gamma_total_intensity(int parent);
555  //returns a list of pairs of excited state transitions from an input parent nuclide
556  std::vector<std::pair<int, int> > gamma_from_to(int parent);
557  //returns a list of pairs of excited state transitions from an decay energy
558  std::vector<std::pair<int, int> > gamma_from_to(double energy, double error);
559  //returns a list of parent/child pairs associated with an input decay energy
560  std::vector<std::pair<int, int> > gamma_parent_child(double energy, double error);
561  //returns a list of parent nuclides associated with an input decay energy
562  std::vector<int> gamma_parent(double energy, double error);
563  // returns a list of child state_id's based on a gamma-ray energy
564  std::vector<int> gamma_child(double energy, double error);
565  // returns a list of child state_id's based on a parent state_id
566  std::vector<int> gamma_child(int parent);
567  //returns an array of arrays of X-ray energies and intesities for a
568  //given parent
569  std::vector<std::pair<double, double> > gamma_xrays(int parent);
570 
572  std::vector<std::pair<double, double> > gammas(int parent_state_id);
573  std::vector<std::pair<double, double> > alphas(int parent_state_id);
574  std::vector<std::pair<double, double> > betas(int parent_state_id);
575  std::vector<std::pair<double, double> > xrays(int parent);
576 
578  typedef struct alpha{
579  int from_nuc;
580  int to_nuc;
581  double energy;
582  double intensity;
583  } alpha;
584 
586  template<> void _load_data<alpha>();
587 
589  extern std::map<std::pair<int, double>, alpha> alpha_data;
590 
591  //returns a list of alpha decay energies from input parent nuclide
592  std::vector<double > alpha_energy(int parent);
593  //returns a list of alpha decay intensities from input parent nuclide
594  std::vector<double> alpha_intensity(int parent);
595  //returns a list of alpha decay parents from input decay energy range
596  std::vector<int> alpha_parent(double energy, double error);
597  //returns a list of alpha decay children from input decay energy range
598  std::vector<int> alpha_child(double energy, double error);
599  //returns a list of alpha decay children from input parent nuclide
600  std::vector<int> alpha_child(int parent);
601 
603  typedef struct beta{
604  int from_nuc;
605  int to_nuc;
607  double avg_energy;
608  double intensity;
609  } beta;
610 
612  template<> void _load_data<beta>();
613 
615  extern std::map<std::pair<int, double>, beta> beta_data;
616  //returns a list of beta decay endpoint energies from input parent nuclide
617  std::vector<double > beta_endpoint_energy(int parent);
618  //returns a list of beta decay average energies from input parent nuclide
619  std::vector<double > beta_average_energy(int parent);
620  //returns a list of beta decay intensities from input parent nuclide
621  std::vector<double> beta_intensity(int parent);
622  //returns a list of beta decay parents from input decay energy range
623  std::vector<int> beta_parent(double energy, double error);
624  //returns a list of beta decay children from input decay energy range
625  std::vector<int> beta_child(double energy, double error);
626  //returns a list of beta decay children from input parent nuclide
627  std::vector<int> beta_child(int parent);
628 
630  typedef struct ecbp{
631  int from_nuc;
632  int to_nuc;
634  double avg_energy;
636  double ec_intensity;
637  double k_conv_e;
638  double l_conv_e;
639  double m_conv_e;
640  } ecbp;
641 
643  extern std::map<std::pair<int, double>, ecbp> ecbp_data;
644 
647  template<> void _load_data<ecbp>();
650  std::vector<double > ecbp_endpoint_energy(int parent);
651  //returns a list of electron capture/ beta plus decay average energies from
652  //input parent nuclide
653  std::vector<double > ecbp_average_energy(int parent);
654  //returns a list of electron capture decay intensities from input parent
655  //nuclide
656  std::vector<double> ec_intensity(int parent);
657  //returns a list of beta plus decay intensities from input parent nuclide
658  std::vector<double> bp_intensity(int parent);
659  //returns a list of electron capture /beta plus decay parents from input
660  //decay energy range
661  std::vector<int> ecbp_parent(double energy, double error);
662  //returns a list of electron capture /beta plus decay children from input
663  //decay energy range
664  std::vector<int> ecbp_child(double energy, double error);
665  //returns a list of electron capture /beta plus decay children from input
666  //parent nuclide
667  std::vector<int> ecbp_child(int parent);
668  //returns an array of arrays of X-ray energies and intesities for a
669  //given parent
670  std::vector<std::pair<double, double> > ecbp_xrays(int parent);
672 
674  extern std::map<std::string, std::map<int, std::map<int, double> > >
676 
681  double simple_xs(int nuc, int rx, std::string energy);
686  double simple_xs(int nuc, std::string rx, std::string energy);
691  double simple_xs(std::string nuc, int rx, std::string energy);
696  double simple_xs(std::string nuc, std::string rx, std::string energy);
697 
699  class InvalidSimpleXS : public std::exception {
700  public:
701  InvalidSimpleXS () {};
702  ~InvalidSimpleXS () throw () {};
704  InvalidSimpleXS(std::string msg) : msg_(msg) {};
706  virtual const char* what() const throw() {
707  return msg_.c_str();
708  };
709 
710  private:
711  std::string msg_;
712  };
713 
714 } // namespace pyne
715 
716 #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:1668
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:2516
int to_nuc
state id of child nuclide
Definition: data.h:632
double k_conv_e
k conversion electron fraction
Definition: data.h:637
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:527
int to_nuc
state id of child nuclide
Definition: data.h:605
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:1619
int nuc_id
state id of nuclide
Definition: data.h:394
double energy
energy of alpha
Definition: data.h:581
double dose_ratio(int nuc, int source)
Dose Ratio.
Definition: data.cpp:481
double total_intensity
total decay intensity
Definition: data.h:531
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:638
double conv_intensity_err
conversion intensity error
Definition: data.h:530
int child_nuc
stateless id of the child nucleus
Definition: data.h:524
std::map< int, double > atomic_mass_map
Mapping from nuclides in id form to their atomic masses.
Definition: data.h:55
std::map< int, double > natural_abund_map
Mapping from nuclides in id form to their natural abundances.
Definition: data.h:90
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:580
double avg_energy
beta decay average energy
Definition: data.h:607
double half_life_error
half life error of the decay [s]
Definition: data.h:487
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:634
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:639
Custom exception for declaring a simple_xs request invalid.
Definition: data.h:699
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:631
int from_nuc
state id of parent nuclide
Definition: data.h:604
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:2280
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:2057
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:489
double beta_branch_ratio_error
beta branching ratio error of this decay [fraction]
Definition: data.h:497
Data access functions.
Definition: data.h:315
double energy
energy of the photon [keV]
Definition: data.h:525
a struct matching the &#39;/decay/betas&#39; table in nuc_data.h5.
Definition: data.h:603
double l_shell_fluor_error
L-shell fluorescence error [fraction].
Definition: data.h:357
double conv_intensity
conversion intensity
Definition: data.h:529
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:50
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:2134
double ec_intensity
intensity of electron capture
Definition: data.h:636
int child
state id of decay child
Definition: data.h:484
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:578
const double Ci_per_Bq
Definition: data.cpp:19
double branch_ratio
branching ratio of this decay [fraction]
Definition: data.h:488
double l_conv_e
l conversion electron fraction
Definition: data.h:534
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:482
double state_energy(int nuc)
Returns the excitation energy [MeV] of a nuc in a given state.
Definition: data.cpp:1544
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:535
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:630
char special
special high-spin state [character]
Definition: data.h:400
int to_nuc
state id of final level
Definition: data.h:522
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:493
int from_nuc
state id of starting level
Definition: data.h:521
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:2219
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:608
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:520
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:582
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:633
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
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:606
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:526
double xs_incoherent
incoherent scattering cross section
Definition: data.h:208
int from_nuc
state id of parent nuclide
Definition: data.h:579
int parent
state id of decay parent
Definition: data.h:483
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:2358
double photon_intensity_err
photon intensity error
Definition: data.h:528
double yield_thermal_err
thermal yield error [fraction]
Definition: data.h:277
double total_intensity_err
total decay intensity error
Definition: data.h:532
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:1595
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:1569
double yield_thermal
thermal yield [fraction]
Definition: data.h:276
A container representing enrichment cascades.
Definition: _atomic_data.h:7
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:635
int parent_nuc
state id of the primary decaying nucleus
Definition: data.h:523
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:2594
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:533
unsigned int decay
rx id of decay
Definition: data.h:485
double half_life
half life of the decay [s]
Definition: data.h:486
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
virtual const char * what() const
Exception returns the string passed when thrown.
Definition: data.h:706
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:704
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:495
double half_life
half life [seconds]
Definition: data.h:396
double li_shell_be
L-shell binding energy [fraction].
Definition: data.h:361