PyNE C++
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
pyne Namespace Reference

A container representing enrichment cascades. More...

Namespaces

 enrichment
 Enrichment Component Class and Functions.
 
 nucname
 Nuclide naming conventions.
 
 particle
 Converts betweeen naming/numbering conventions for particle types.
 
 rxname
 Converts between naming conventions for reaction channels.
 

Classes

class  AliasTable
 A data structure for O(1) source sampling. More...
 
struct  alpha
 a struct matching the '/decay/alphas' table in nuc_data.h5. More...
 
struct  atomic
 Structure for atomic data. More...
 
struct  atomic_mass_data
 a struct matching the atomic_mass table in nuc_data.h5. More...
 
struct  beta
 a struct matching the '/decay/betas' table in nuc_data.h5. More...
 
struct  decay
 a struct matching the '/decay/decays' table in nuc_data.h5. More...
 
struct  dose
 A struct matching the dose factor table in nuc_data.h5. More...
 
struct  ecbp
 A struct matching the '/decay/ecbp' table in nuc_data.h5. More...
 
struct  edge_points
 Stores 4 connected points in a mesh volume element. More...
 
class  FileNotFound
 
struct  gamma
 a struct matching the '/decay/gammas' table in nuc_data.h5. More...
 
class  InvalidSimpleXS
 Custom exception for declaring a simple_xs request invalid. More...
 
struct  level_data
 a struct matching the '/decay/level_list' table in nuc_data.h5. More...
 
class  Material
 Material composed of nuclides. More...
 
struct  material_data
 
class  MaterialLibrary
 
class  MaterialProtocolError
 Custom exception for invalid HDF5 protocol numbers. More...
 
struct  ndsfpy
 a struct matching the '/neutron/nds_fission_product' table in nuc_data.h5 More...
 
struct  ndsfpysub
 a struct for the nds data for fpyield More...
 
class  PointSource
 
struct  q_val_data
 a struct matching the q_value table in nuc_data.h5. More...
 
class  ray_buffers
 
class  Sampler
 Mesh based Monte Carlo source sampling. More...
 
struct  scattering_lengths
 a struct matching the '/neutron/scattering_lengths' table in nuc_data.h5. More...
 
class  Source
 
class  SourceParticle
 
class  swapmapcompare
 Data access functions. More...
 
class  Tally
 
struct  tally_struct
 
class  ValueError
 Exception representing value errors of all kinds. More...
 
struct  wimsdfpy
 a struct matching the '/neutron/wimsd_fission_product' table in nuc_data.h5. More...
 

Typedefs

typedef std::map< int, double > comp_map
 Nuclide-mass composition map type.
 
typedef comp_map::iterator comp_iter
 Nuclide-mass composition iter type.
 
typedef struct pyne::material_data material_data
 
typedef std::shared_ptr< pyne::Materialshr_mat_ptr
 
typedef std::unordered_map< std::string, shr_mat_ptr > mat_map
 
typedef std::set< std::string > matname_set
 
typedef std::set< int > nuc_set
 
typedef struct pyne::tally_struct tally_struct
 

Enumerations

enum  BiasMode { USER, ANALOG, UNIFORM }
 Problem modes.
 
enum  MeshMode { VOXEL, SUBVOXEL, TET }
 

Functions

void _load_atomic_mass_map_memory ()
 
void _insert_atomic_mass_map ()
 
void _insert_abund_map ()
 
float dag_version (void)
 
unsigned dag_rev_version (void)
 
int dag_ent_handle_size (void)
 
const int * geom_id_list (int dimension, int *number_of_items)
 
EntityHandle handle_from_id (int dimension, int id)
 
int id_from_handle (EntityHandle eh)
 
ErrorCode dag_load (const char *filename)
 
void * dag_alloc_ray_history (void)
 
void dag_dealloc_ray_history (void *r)
 
ErrorCode dag_ray_fire (EntityHandle vol, vec3 ray_start, vec3 ray_dir, EntityHandle *next_surf_ent, double *next_surf_dist, void *history, double distance_limit)
 
ErrorCode dag_ray_follow (EntityHandle firstvol, vec3 ray_start, vec3 ray_dir, double distance_limit, int *num_intersections, EntityHandle **surfs, double **distances, EntityHandle **volumes, void *data_buffers)
 
void dag_dealloc_ray_buffer (void *data_buffers)
 
ErrorCode dag_pt_in_vol (EntityHandle vol, vec3 pt, int *result, vec3 dir, const void *history)
 
ErrorCode dag_next_vol (EntityHandle surface, EntityHandle volume, EntityHandle *next_vol)
 
int vol_is_graveyard (EntityHandle vol)
 
int vol_is_implicit_complement (EntityHandle vol)
 
ErrorCode get_volume_metadata (EntityHandle vol, int *material, double *density, double *importance)
 
ErrorCode get_volume_boundary (EntityHandle vol, vec3 minPt, vec3 maxPt)
 
double simple_xs (int nuc, int rx, std::string energy)
 
double simple_xs (int nuc, std::string rx, std::string energy)
 
double simple_xs (std::string nuc, int rx, std::string energy)
 
double simple_xs (std::string nuc, std::string rx, std::string energy)
 
bool detect_nuclidelist (hid_t dataset, std::string &nucpath)
 
std::ostream & operator<< (std::ostream &os, Material mat)
 
std::ostream & operator<< (std::ostream &os, Source source)
 Converts a Source to a string stream representation.
 
void sampling_setup_ (int *mode, int *cell_list_size)
 
void particle_birth_ (double *rands, double *x, double *y, double *z, double *e, double *w, int *cell_list)
 
std::vector< double > read_e_bounds (std::string e_bounds_file)
 
std::ostream & operator<< (std::ostream &os, Tally tally)
 Converts a Tally to a string stream representation.
 
void pyne_start ()
 Initializes PyNE based on environment.
 
int to_int (std::string s)
 Converts a string of digits to an int using atoi().
 
double to_dbl (std::string s)
 Converts a valid string to a float using atof().
 
double endftod_cpp (char *s)
 
double endftod_f (char *s)
 Converts a string from ENDF format to a float.
 
void use_fast_endftod ()
 
std::string to_upper (std::string s)
 switches endftod to fast cpp version More...
 
std::string to_lower (std::string s)
 Returns an all lower case copy of the string.
 
std::string capitalize (std::string s)
 Returns a capitalized copy of the string.
 
std::string comment_line_wrapping (std::string line, std::string comment_prefix="", int line_length=79)
 Forms and returns the wrapped lines with a lenght up to line_lenght.
 
std::string get_flag (char line[], int max_l)
 
std::string remove_substring (std::string s, std::string substr)
 Creates a copy of s with all instances of substr taken out.
 
std::string remove_characters (std::string s, std::string chars)
 Removes all characters in the string chars from s.
 
std::string replace_all_substrings (std::string s, std::string substr, std::string repstr)
 Replaces all instance of substr in s with repstr.
 
std::string last_char (std::string s)
 Returns the last character in a string.
 
std::string slice_from_end (std::string s, int n=-1, int l=1)
 
bool ternary_ge (int a, int b, int c)
 Returns true if a <= b <= c and flase otherwise.
 
bool contains_substring (std::string s, std::string substr)
 Returns true if substr is in s.
 
std::string natural_naming (std::string name)
 
std::vector< std::string > split_string (std::string lists, std::string delimiter=" ")
 
template<typename T >
std::string join_to_string (std::vector< T > vect, std::string delimiter=" ")
 
template std::string join_to_string (std::vector< int > vect, std::string delimiter)
 
template std::string join_to_string (std::vector< double > vect, std::string delimiter)
 
template std::string join_to_string (std::vector< std::string > vect, std::string delimiter)
 
double slope (double x2, double y2, double x1, double y1)
 Finds the slope of a line from the points (x1, y1) and (x2, y2).
 
double solve_line (double x, double x2, double y2, double x1, double y1)
 
double tanh (double x)
 The hyperbolic tangent function.
 
double coth (double x)
 The hyperbolic cotangent function.
 
bool file_exists (std::string strfilename)
 Returns true if the file can be found.
 
std::string get_full_filepath (char *filename)
 
std::string get_full_filepath (std::string filename)
 
bool toggle_warnings ()
 Toggles warnings on and off.
 
void warning (std::string s)
 Prints a warning message.
 
String Conversion Functions

Converts the variables of various types to their C++ string representation.

std::string to_str (int t)
 
std::string to_str (unsigned int t)
 
std::string to_str (double t)
 
std::string to_str (bool t)
 

Variables

std::map< int, double > atomic_mass_error_map
 
std::string NUC_DATA_PATH = ""
 Path to the nuc_data.h5 file.
 
std::map< std::string, std::string > 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 > > > simple_xs_map
 map<energy, map<nuclide, map<rx, xs> > >
 
const vector< double > null_v_dbl
 
const vector< int > null_v_int
 
std::string PYNE_DATA = ""
 Path to the directory containing the PyNE data.
 
std::string VERSION = "0.7.1"
 PyNE version number.
 
double(* endftod )(char *s) = &pyne::endftod_f
 endftod function pointer. defaults to fortran
 
bool USE_WARNINGS = true
 
Mathematical and Physical Constants
const double pi = 3.14159265359
 pi = 3.14159265359
 
const double N_A = 6.0221415e+23
 Avogadro's Number.
 
const double barns_per_cm2 = 1e24
 barns per cm^2
 
const double cm2_per_barn = 1e-24
 cm^2 per barn
 
const double sec_per_day = 24.0 * 3600.0
 seconds per day
 
const double MeV_per_K = 8.617343e-11
 MeV per Kelvin.
 
const double MeV_per_MJ = 6.2415096471204E+18
 MeV per MJ.
 
const double Bq_per_Ci = 3.7e10
 Becquerel per Curie.
 
const double Ci_per_Bq = 2.7027027e-11
 Curies per Becquerel.
 

Atomic Mass Data

typedef struct pyne::atomic_mass_data atomic_mass_data
 a struct matching the atomic_mass table in nuc_data.h5.
 
std::map< int, double > atomic_mass_map = std::map<int, double>()
 Mapping from nuclides in id form to their atomic masses.
 
std::map< std::string, std::string > get_data_checksums ()
 
void _load_atomic_mass_map ()
 
double atomic_mass (int nuc)
 Returns the atomic mass of a nuclide nuc. More...
 
double atomic_mass (char *nuc)
 Returns the atomic mass of a nuclide nuc.
 
double atomic_mass (std::string nuc)
 Returns the atomic mass of a nuclide nuc.
 

Natural Abundance Data

std::map< int, double > natural_abund_map = std::map<int, double>()
 Mapping from nuclides in id form to their natural abundances.
 
double natural_abund (int nuc)
 Returns the natural abundance of a nuclide nuc. More...
 
double natural_abund (char *nuc)
 Returns the natural abundance of a nuclide nuc.
 
double natural_abund (std::string nuc)
 Returns the natural abundance of a nuclide nuc.
 

Q_value Data

typedef struct pyne::q_val_data q_val_data
 a struct matching the q_value table in nuc_data.h5.
 
std::map< int, double > q_val_map = std::map<int, double>()
 
std::map< int, double > gamma_frac_map = std::map<int, double>()
 
void _load_q_val_map ()
 Loads the q_value data from the nuc_data.h5 file into memory.
 
double q_val (int nuc)
 Returns the q_value of a nuclide nuc. More...
 
double q_val (const char *nuc)
 
double q_val (std::string nuc)
 
double gamma_frac (int nuc)
 
double gamma_frac (const char *nuc)
 
double gamma_frac (std::string nuc)
 

Dose Factor Data

typedef struct pyne::dose dose
 A struct matching the dose factor table in nuc_data.h5.
 
std::map< int, doseepa_dose_map
 Mapping from int to dose for 3 sources.
 
std::map< int, dosedoe_dose_map
 
std::map< int, dosegenii_dose_map
 
void _load_dose_map (std::map< int, dose > &dm, std::string source_path)
 
double ext_air_dose (int nuc, int source)
 Returns the dose factors of a nuclide. More...
 
double ext_air_dose (const char *nuc, int source)
 
double ext_air_dose (std::string nuc, int source)
 
double ext_soil_dose (int nuc, int source)
 
double ext_soil_dose (const char *nuc, int source)
 
double ext_soil_dose (std::string nuc, int source)
 
double ingest_dose (int nuc, int source)
 Ingestion. More...
 
double ingest_dose (const char *nuc, int source)
 
double ingest_dose (std::string nuc, int source)
 
double inhale_dose (int nuc, int source)
 Inhalation. More...
 
double inhale_dose (const char *nuc, int source)
 
double inhale_dose (std::string nuc, int source)
 
double dose_ratio (int nuc, int source)
 Dose Ratio.
 
double dose_ratio (const char *nuc, int source)
 
double dose_ratio (std::string nuc, int source)
 
double dose_fluid_frac (int nuc, int source)
 Fluid Fraction.
 
double dose_fluid_frac (const char *nuc, int source)
 
double dose_fluid_frac (std::string nuc, int source)
 
std::string dose_lung_model (int nuc, int source)
 Lung Model.
 
std::string dose_lung_model (const char *nuc, int source)
 
std::string dose_lung_model (std::string nuc, int source)
 

Scattering Length Data

typedef struct pyne::scattering_lengths scattering_lengths
 a struct matching the '/neutron/scattering_lengths' table in nuc_data.h5.
 
std::map< int, xd_complex_tb_coherent_map = std::map<int, xd_complex_t>()
 Mapping from nuclides in id form to their coherent scattering length.
 
std::map< int, xd_complex_tb_incoherent_map = std::map<int, xd_complex_t>()
 Mapping from nuclides in id form to their incoherent scattering length.
 
std::map< int, double > b_map = std::map<int, double>()
 Mapping from nuclides in id form to their scattering length.
 
void _load_scattering_lengths ()
 Loads the scattering length data from the nuc_data.h5 file into memory.
 
xd_complex_t b_coherent (int nuc)
 Finds the coherent scattering length [cm] for a nuclide nuc. More...
 
xd_complex_t b_coherent (char *nuc)
 Finds the coherent scattering length [cm] for a nuclide nuc.
 
xd_complex_t b_coherent (std::string nuc)
 Finds the coherent scattering length [cm] for a nuclide nuc.
 
xd_complex_t b_incoherent (int nuc)
 Finds the incoherent scattering length [cm] for a nuclide nuc. More...
 
xd_complex_t b_incoherent (char *nuc)
 Finds the incoherent scattering length [cm] for a nuclide nuc.
 
xd_complex_t b_incoherent (std::string nuc)
 Finds the incoherent scattering length [cm] for a nuclide nuc.
 
double b (int nuc)
 Computes the scattering length [cm] from the coherent and incoherent components.
 
double b (char *nuc)
 Computes the scattering length [cm] from the coherent and incoherent components.
 
double b (std::string nuc)
 Computes the scattering length [cm] from the coherent and incoherent components.
 

Fission Product Yield Data

typedef struct pyne::wimsdfpy wimsdfpy
 a struct matching the '/neutron/wimsd_fission_product' table in nuc_data.h5.
 
typedef struct pyne::ndsfpy ndsfpy
 a struct matching the '/neutron/nds_fission_product' table in nuc_data.h5
 
typedef struct pyne::ndsfpysub ndsfpysub
 a struct for the nds data for fpyield
 
std::map< std::pair< int, int >, double > wimsdfpy_data
 Mapping from nuclides in id form to their scattering length. More...
 
std::map< std::pair< int, int >, ndsfpysubndsfpy_data
 
void _load_wimsdfpy ()
 Loads the WIMSD fission product yield data from the nuc_data.h5 file into memory.
 
void _load_ndsfpy ()
 Loads the NDS fission product yield data from the nuc_data.h5 file into memory.
 
double 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 fpyield (int from_nuc, int to_nuc, int source, bool get_error)
 Returns the fission product yield for a parent/child nuclide pair.
 
double fpyield (char *from_nuc, char *to_nuc, int source, bool get_error)
 Returns the fission product yield for a parent/child nuclide pair.
 
double 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 atomic
 Structure for atomic data.
 
typedef struct pyne::level_data level_data
 a struct matching the '/decay/level_list' table in nuc_data.h5.
 
typedef struct pyne::decay decay
 a struct matching the '/decay/decays' table in nuc_data.h5.
 
typedef struct pyne::gamma gamma
 a struct matching the '/decay/gammas' table in nuc_data.h5.
 
typedef struct pyne::alpha alpha
 a struct matching the '/decay/alphas' table in nuc_data.h5.
 
typedef struct pyne::beta beta
 a struct matching the '/decay/betas' table in nuc_data.h5.
 
typedef struct pyne::ecbp ecbp
 A struct matching the '/decay/ecbp' table in nuc_data.h5.
 
std::map< int, atomicatomic_data_map
 
std::map< std::pair< int, double >, level_datalevel_data_lvl_map
 
std::map< std::pair< int, unsigned int >, level_datalevel_data_rx_map
 
std::map< std::pair< int, int >, decaydecay_data
 
std::map< std::pair< int, double >, gammagamma_data
 
std::map< std::pair< int, double >, alphaalpha_data
 A vector of structs containing alpha data for access in memory.
 
std::map< std::pair< int, double >, betabeta_data
 A vector of structs containing beta data for access in memory.
 
std::map< std::pair< int, double >, ecbpecbp_data
 A vector of structs containing ecbp data for access in memory.
 
template<typename T , typename U >
std::vector< T > 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 > data_access (int parent, double min, double max, size_t valoffset, std::map< std::pair< int, double >, U > &data)
 
template<typename T , typename U >
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 > data_access (int parent, size_t valoffset, std::map< std::pair< int, int >, U > &data)
 
template<typename T , typename U >
std::vector< T > data_access (int parent, size_t valoffset, std::map< std::pair< int, unsigned int >, U > &data)
 
template<typename U >
double data_access (int parent, size_t valoffset, std::map< int, U > &data)
 
template<typename T >
void _load_data ()
 
template<>
void _load_data< atomic > ()
 
std::vector< std::pair< double, double > > calculate_xray_data (int z, double k_conv, double l_conv)
 
template<>
void _load_data< level_data > ()
 
int id_from_level (int nuc, double level)
 Returns the nuc_id of an energy level. More...
 
int id_from_level (int nuc, double level, std::string special)
 
int metastable_id (int nuc, int m)
 Returns the nuc_id of a metastable state. More...
 
int metastable_id (int nuc)
 Assumes the first metastable state is the desired one.
 
double half_life (int nuc)
 Returns the half life for a nuclide nuc. More...
 
double half_life (char *nuc)
 Returns the half life for a nuclide nuc.
 
double half_life (std::string nuc)
 Returns the half life for a nuclide nuc.
 
double decay_const (int nuc)
 Returns the decay constant for a nuclide nuc. More...
 
double decay_const (char *nuc)
 Returns the decay constant for a nuclide nuc.
 
double decay_const (std::string nuc)
 Returns the decay constant for a nuclide nuc.
 
double branch_ratio (std::pair< int, int > from_to)
 Returns the branch ratio for a parent/child nuclide pair. More...
 
double branch_ratio (int from_nuc, int to_nuc)
 Returns the branch ratio for a parent/child nuclide pair.
 
double branch_ratio (char *from_nuc, char *to_nuc)
 Returns the branch ratio for a parent/child nuclide pair.
 
double branch_ratio (std::string from_nuc, std::string to_nuc)
 Returns the branch ratio for a parent/child nuclide pair.
 
double state_energy (int nuc)
 Returns the excitation energy [MeV] of a nuc in a given state. More...
 
double state_energy (char *nuc)
 Returns the excitation energy [MeV] of a nuc in a given state.
 
double state_energy (std::string nuc)
 Returns the excitation energy [MeV] of a nuc in a given state.
 
std::set< int > decay_children (int nuc)
 Returns a set of decay children of a nuc. More...
 
std::set< int > decay_children (char *nuc)
 Returns the decay constant for a nuclide nuc.
 
std::set< int > decay_children (std::string nuc)
 Returns the decay constant for a nuclide nuc.
 
template<>
void _load_data< decay > ()
 Loads the decay data from the nuc_data.h5 file into memory.
 
std::vector< int > decay_data_children (int parent)
 
std::pair< double, double > decay_half_life (std::pair< int, int >)
 
std::vector< std::pair< double, double > > decay_half_lifes (int)
 
std::pair< double, double > decay_branch_ratio (std::pair< int, int >)
 
std::vector< double > decay_branch_ratios (int parent)
 
std::pair< double, double > decay_photon_branch_ratio (std::pair< int, int >)
 
std::vector< std::pair< double, double > > decay_photon_branch_ratios (int parent)
 
std::pair< double, double > decay_beta_branch_ratio (std::pair< int, int >)
 
std::vector< std::pair< double, double > > decay_beta_branch_ratios (int parent)
 
template<>
void _load_data< gamma > ()
 Loads the gamma ray data from the nuc_data.h5 file into memory.
 
std::vector< std::pair< double, double > > gamma_energy (int parent)
 
std::vector< std::pair< double, double > > gamma_energy (double energy, double error)
 
std::vector< std::pair< double, double > > gamma_photon_intensity (int parent)
 
std::vector< std::pair< double, double > > gamma_photon_intensity (double energy, double error)
 
std::vector< std::pair< double, double > > gamma_conversion_intensity (int parent)
 
std::vector< std::pair< double, double > > gamma_total_intensity (int parent)
 
std::vector< std::pair< int, int > > gamma_from_to (int parent)
 
std::vector< std::pair< int, int > > gamma_from_to (double energy, double error)
 
std::vector< std::pair< int, int > > gamma_parent_child (double energy, double error)
 
std::vector< int > gamma_parent (double energy, double error)
 
std::vector< int > gamma_child (double energy, double error)
 
std::vector< int > gamma_child (int parent)
 
std::vector< std::pair< double, double > > gamma_xrays (int parent)
 
std::vector< std::pair< double, double > > gammas (int parent_state_id)
 Returns a list of energies and intensities normalized to branching ratios. More...
 
std::vector< std::pair< double, double > > alphas (int parent_state_id)
 
std::vector< std::pair< double, double > > betas (int parent_state_id)
 
std::vector< std::pair< double, double > > xrays (int parent)
 
template<>
void _load_data< alpha > ()
 Loads the alpha decay data from the nuc_data.h5 file into memory.
 
std::vector< double > alpha_energy (int parent)
 
std::vector< double > alpha_intensity (int parent)
 
std::vector< int > alpha_parent (double energy, double error)
 
std::vector< int > alpha_child (double energy, double error)
 
std::vector< int > alpha_child (int parent)
 
template<>
void _load_data< beta > ()
 Loads the beta decay data from the nuc_data.h5 file into memory.
 
std::vector< double > beta_endpoint_energy (int parent)
 
std::vector< double > beta_average_energy (int parent)
 
std::vector< double > beta_intensity (int parent)
 
std::vector< int > beta_parent (double energy, double error)
 
std::vector< int > beta_child (double energy, double error)
 
std::vector< int > beta_child (int parent)
 
template<>
void _load_data< ecbp > ()
 
std::vector< double > ecbp_endpoint_energy (int parent)
 
std::vector< double > ecbp_average_energy (int parent)
 
std::vector< double > ec_intensity (int parent)
 
std::vector< double > bp_intensity (int parent)
 
std::vector< int > ecbp_parent (double energy, double error)
 
std::vector< int > ecbp_child (double energy, double error)
 
std::vector< int > ecbp_child (int parent)
 
std::vector< std::pair< double, double > > ecbp_xrays (int parent)
 

Detailed Description

A container representing enrichment cascades.

The 'pyne' namespace all PyNE functionality is included in.

The tally class and helper functions.

Converts between naming conventions for nuclides.

/file atomic_nuclear_data.h /author Andrew Davis (andre.nosp@m.w.da.nosp@m.vis@w.nosp@m.isc..nosp@m.edu)

/brief Implements all the fundamental atomic & nuclear data data

The tally class is in essesence a structure containing attributes related to tallies.

Typedef Documentation

◆ material_data

A stuct for reprensenting fundemental data in a material. Useful for HDF5 representations.

◆ tally_struct

A stuct for reprensenting fundemental data in a tally Maybe Useful for HDF5 representations. following scoptaz's lead here

Function Documentation

◆ _insert_abund_map()

void pyne::_insert_abund_map ( )

function to create mapping from nuclides in id form to their natural abundances

◆ _insert_atomic_mass_map()

void pyne::_insert_atomic_mass_map ( )

function to create mapping from nuclides in id form to their atomic masses

◆ _load_atomic_mass_map()

void pyne::_load_atomic_mass_map ( )

Loads the atomic mass and natural abundance data from the nuc_data.h5 file into memory.

◆ _load_atomic_mass_map_memory()

void pyne::_load_atomic_mass_map_memory ( )

main function to be called when you wish to load the nuclide data into memory

◆ _load_data< ecbp >()

template<>
void pyne::_load_data< ecbp > ( )

Loads the electron capture and beta plus decay data from the nuc_data.h5 file into memory.

◆ _load_dose_map()

void pyne::_load_dose_map ( std::map< int, dose > &  dm,
std::string  source_path 
)

Loads the dose factor data from the nuc_data.h5 file into memory according to the user-input source.

◆ atomic_mass()

double pyne::atomic_mass ( int  nuc)

Returns the atomic mass of a nuclide nuc.

This function will first try to find the atomic mass data in the atomic_mass_map. If this map is empty, it will load the data from disk. If the nuclide is in an excited state and not found in the map, it will give the value for the ground state nuclide. If the nuclide simply cannot be found, the A number is returned.

◆ b_coherent()

xd_complex_t pyne::b_coherent ( int  nuc)

Finds the coherent scattering length [cm] for a nuclide nuc.

This function works by first checking the b_coherent_map. If the map is empty then the data is read in from disk. If no data is found than a value from a nuclide with the same A number is returned instead. If none of these exist, then the value of a nuclide with the same Z number is used. If none of these work then 0.0 is returned.

◆ b_incoherent()

xd_complex_t pyne::b_incoherent ( int  nuc)

Finds the incoherent scattering length [cm] for a nuclide nuc.

This function works in the same way that b_coherent() does.

◆ branch_ratio()

double pyne::branch_ratio ( std::pair< int, int >  from_to)

Returns the branch ratio for a parent/child nuclide pair.

This function works by first checking the branch_ratio_map. If this is empty it loads the data from disk. If the parent/child nuclide pair is still not found, then the decay is assumed to be impossible and 0.0 is returned.

◆ data_access() [1/5]

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 
)

Access data in a std::map<std::pair<int, double> for a range of values of the second member of the pair. Returns a vector of all values at valoffset of class U of type T f

◆ data_access() [2/5]

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 
)

Access data in a std::map<std::pair<int, double> for a given value of the first member of the pair. Returns a vector of all values at valoffset of class U of type T

◆ data_access() [3/5]

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 
)

Access data in a std::map<std::pair<int, int> for a given matching pair. Returns the value at valoffset of class U of type T

◆ data_access() [4/5]

template<typename T , typename U >
std::vector< T > pyne::data_access ( int  parent,
size_t  valoffset,
std::map< std::pair< int, int >, U > &  data 
)

Access data in a std::map<std::pair<int, int> for a given value of the first member of the pair. Returns an array of the values at valoffset of class U of type T

◆ data_access() [5/5]

template<typename U >
double pyne::data_access ( int  parent,
size_t  valoffset,
std::map< int, U > &  data 
)

Access data in a std::map<int, data> format for a given first member of the pair. Returns the value at valoffset of the matching datapoint.

◆ decay_children()

std::set< int > pyne::decay_children ( int  nuc)

Returns a set of decay children of a nuc.

This function works by first checking decay_chidlren_map. If this is empty it loads the data from disk. If the nuclide is still not found, then the species is assumed to be stable and an empty set is returned.

◆ decay_const()

double pyne::decay_const ( int  nuc)

Returns the decay constant for a nuclide nuc.

This function works by first checking the decay_const_map. If this is empty it loads the data from disk. If the nuclide is still not found, then the species is assumed to be stable and 0.0 is returned.

◆ detect_nuclidelist()

bool pyne::detect_nuclidelist ( hid_t  dataset,
std::string &  nucpath 
)

Looking for the nuclide list path in the nucpath attribute of the dataset. This happens according to protocol 1.

Parameters
datasethid of the dataset.
nucpathaddress of the path to the nuclides list in the file (update when nucpath is found).
Returns
true if the nucpath attribure is present in the dataset

◆ ecbp_endpoint_energy()

std::vector< double > pyne::ecbp_endpoint_energy ( int  parent)

returns a list of electron capture/ beta plus decay endpoint energies from input parent nuclide

◆ endftod_cpp()

double pyne::endftod_cpp ( char *  s)

Converts a string from ENDF format to a float. Only handles E-less format but is roughly 5 times faster than endftod.

◆ ext_air_dose()

double pyne::ext_air_dose ( int  nuc,
int  source 
)

Returns the dose factors of a nuclide.

External Air.

These functions will first try to find the dose factor data in the dose_maps. If the maps are empty, it will load the data from disk. If the nuclide simply cannot be found, the default value returned is -1.

Functions for External Air and Ratio of External Air to Inhalation Dose Factors

◆ ext_soil_dose()

double pyne::ext_soil_dose ( int  nuc,
int  source 
)

Function for External Soil Dose Factors

◆ fpyield()

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.

This function works by first checking the fission yield data. If this is empty it loads the data from disk. If the parent/child nuclide pair is still not found, then the process is assumed to be impossible and 0.0 is returned. The data source is determined by the type value as follows: 0 WIMS, 1 thermal NDS, 2 fast NDS, 3 14 MeV NDS. negative type values return error for that data type.

◆ gammas()

std::vector< std::pair< double, double > > pyne::gammas ( int  parent_state_id)

Returns a list of energies and intensities normalized to branching ratios.

Combined decay data ///.

◆ get_flag()

std::string pyne::get_flag ( char  line[],
int  max_l 
)

Finds and returns the first white-space delimited token of a line.

Parameters
linea character array to take the first token from.
max_lan upper bound to the length of the token. Must be 11 or less.
Returns
a the flag as a string

◆ half_life()

double pyne::half_life ( int  nuc)

Returns the half life for a nuclide nuc.

This function works by first checking the half_life_map. If this is empty it loads the data from disk. If the nuclide is still not found, then the species is assumed to be stable and infinity is returned.

◆ id_from_level()

int pyne::id_from_level ( int  nuc,
double  level 
)

Returns the nuc_id of an energy level.

This function looks for the level that best matches the input level within 1 keV of the input nuclide

◆ ingest_dose()

double pyne::ingest_dose ( int  nuc,
int  source 
)

Ingestion.

Functions for Ingestion Dose Factors and Fraction of activity that is absorbed by body fluids

◆ inhale_dose()

double pyne::inhale_dose ( int  nuc,
int  source 
)

Inhalation.

Functions for Inhalation Dose Factors and Lung Model used to obtain dose factors

◆ metastable_id()

int pyne::metastable_id ( int  nuc,
int  m 
)

Returns the nuc_id of a metastable state.

This function looks through the level map for a given input nuc_id to find the nuc_id corresponding to the level, -1 is returned if a metastable state is not found.

◆ natural_abund()

double pyne::natural_abund ( int  nuc)

Returns the natural abundance of a nuclide nuc.

This follows the same the basic rules for finding or computing the natural abundances as the atomic_mass() functions do. However, if the nuclide cannot be found, the default value returned is 0.0.

◆ natural_naming()

std::string pyne::natural_naming ( std::string  name)

Calculates a version of the string name that is also a valid variable name. That is to say that the return value uses only word characters.

◆ operator<<()

std::ostream& pyne::operator<< ( std::ostream &  os,
Material  mat 
)

Converts a Material to a string stream representation for canonical writing. This operator is also defined on inheritors of std::ostream

◆ particle_birth_()

void pyne::particle_birth_ ( double *  rands,
double *  x,
double *  y,
double *  z,
double *  e,
double *  w,
int *  cell_list 
)

MCNP interface to sample particle birth parameters after sampling setup

Parameters
randsSix pseudo-random numbers supplied from the Fortran side.
xThe sampled x position returned by this function
yThe sampled y position returned by this function
zThe sampled z position returned by this function
eThe sampled energy returned by this function
wThe sampled y statistical weight returned by this function
cThe sampled cell number

◆ q_val()

double pyne::q_val ( int  nuc)

Returns the q_value of a nuclide nuc.

This function will first try to find the q_value data in the q_val_map. If this map is empty, it will load the data from disk. If the nuclide simply cannot be found, the default value returned is 0.0.

◆ read_e_bounds()

std::vector< double > pyne::read_e_bounds ( std::string  e_bounds_file)

Helper function for MCNP interface that reads energy boudaries from a file

Parameters
e_bounds_fileA file containing the energy group boundaries.

◆ sampling_setup_()

void pyne::sampling_setup_ ( int *  mode,
int *  cell_list_size 
)

MCNP interface for source sampling setup

Parameters
modeThe sampling mode: Voxel(DEFAULT) R2S: 0 = analog, 1 = uniform, 2 = user-specified SubVoxel(SUBVOXEL) R2S: 3 = analog, 4 = uniform, 5 = user-specified cell_list_size if the variable used for create the cell_list cell_list_size could be 0: for unstructured mesh 1: for sub-voxel mode, max_num_cells: for voxel mode

◆ simple_xs() [1/4]

double pyne::simple_xs ( int  nuc,
int  rx,
std::string  energy 
)

returns the microscopic cross section in barns for the specified nuclide, reaction, and energy group. energy must be one of: "thermal", "thermal_maxwell_ave", "resonance_integral", "fourteen_MeV", "fission_spectrum_ave".

◆ simple_xs() [2/4]

double pyne::simple_xs ( int  nuc,
std::string  rx,
std::string  energy 
)

returns the microscopic cross section in barns for the specified nuclide, reaction, and energy group. energy must be one of: "thermal", "thermal_maxwell_ave", "resonance_integral", "fourteen_MeV", "fission_spectrum_ave".

◆ simple_xs() [3/4]

double pyne::simple_xs ( std::string  nuc,
int  rx,
std::string  energy 
)

returns the microscopic cross section in barns for the specified nuclide, reaction, and energy group. energy must be one of: "thermal", "thermal_maxwell_ave", "resonance_integral", "fourteen_MeV", "fission_spectrum_ave".

◆ simple_xs() [4/4]

double pyne::simple_xs ( std::string  nuc,
std::string  rx,
std::string  energy 
)

returns the microscopic cross section in barns for the specified nuclide, reaction, and energy group. energy must be one of: "thermal", "thermal_maxwell_ave", "resonance_integral", "fourteen_MeV", "fission_spectrum_ave".

◆ slice_from_end()

std::string pyne::slice_from_end ( std::string  s,
int  n = -1,
int  l = 1 
)

Returns the slice of a string s using the negative index n and the length of the slice l.

◆ solve_line()

double pyne::solve_line ( double  x,
double  x2,
double  y2,
double  x1,
double  y1 
)

Solves the equation for the line y = mx + b, given x and the points that form the line: (x1, y1) and (x2, y2).

◆ state_energy()

double pyne::state_energy ( int  nuc)

Returns the excitation energy [MeV] of a nuc in a given state.

This function works by first checking the state_energy_map. If this is empty it loads the data from disk. If the nuclide is still not found, then the species is assumed to be in a ground state and 0.0 is returned.

◆ to_upper()

std::string pyne::to_upper ( std::string  s)

switches endftod to fast cpp version

Returns an all upper case copy of the string.

Variable Documentation

◆ atomic_mass_error_map

std::map< int, double > pyne::atomic_mass_error_map

Mapping from nuclides in id form to the associated error in abdundance

◆ data_checksums

std::map< std::string, std::string > pyne::data_checksums
Initial value:
=
pyne::get_data_checksums()

Mapping from nodes in nuc_data.h5 to hashes of nodes.

◆ decay_data

std::map< std::pair< int, int >, pyne::decay > pyne::decay_data
Initial value:
=
std::map<std::pair<int, int>, pyne::decay>()
a struct matching the &#39;/decay/decays&#39; table in nuc_data.h5.
Definition: data.h:483

Mapping from a pair of nuclides in id form to a struct containing data associated with the decay from the first to the second

◆ level_data_lvl_map

std::map< std::pair< int, double >, pyne::level_data > pyne::level_data_lvl_map

Mapping from nuclides in id form to a struct containing data associated with that level.

◆ ndsfpy_data

std::map< std::pair< int, int >, pyne::ndsfpysub > pyne::ndsfpy_data
Initial value:
=
std::map<std::pair<int, int>, pyne::ndsfpysub>()
a struct for the nds data for fpyield
Definition: data.h:275

◆ q_val_map

std::map< int, double > pyne::q_val_map = std::map<int, double>()

Mapping from nuclides in id form to their q_values and the fraction of Q that comes from gammas.

◆ wimsdfpy_data

std::map< std::pair< int, int >, double > pyne::wimsdfpy_data
Initial value:
=
std::map<std::pair<int, int>, double>()

Mapping from nuclides in id form to their scattering length.