Materials Library – pyne.dbgen.materials_library¶
Module handles the construction of a reference materials library in nuc_data.h5. This currently consists to natural element materials and those coming from PNNL’s Materials Compendium.
- 
pyne.dbgen.materials_library.grab_materials_compendium(location='materials_compendium.csv')[source]¶ Parses data from a materials compendium csv file.
- Parameters
 - locationstr
 The file to read in compendium from.
- Returns
 - matslist of pyne.material.Material
 The materials in the compendium.
- 
pyne.dbgen.materials_library.is_comp_matname_or_density(line)[source]¶ Detect composition, material name, or density lines.
- Parameters
 - linelist of str
 The input line.
- Returns
 - resultbool
 True if the input line has composition, material name, or density data. False otherwise.
- 
pyne.dbgen.materials_library.make_elements()[source]¶ Make natural elemental materials based on isotopic abundances.
- Returns
 - eltsdictdict from str to pyne.material.Material
 Natural elements as materials.
- 
pyne.dbgen.materials_library.make_materials_compendium(nuc_data, matslib)[source]¶ Adds materials compendium to nuc_data.h5.
- 
pyne.dbgen.materials_library.make_materials_library(args)[source]¶ Controller function for adding materials library.
- 
pyne.dbgen.materials_library.make_matslib(fname)[source]¶ Make a pyne.material.MaterialLibrary. First makes elements, then materials from compendium.
- Parameters
 - fnamestr
 Path to materials compendium.
- Returns
 - matslibpyne.material.MaterialLibrary
 All the materials you could want, in a handy MaterialLibrary instance.