def test_readmass(self): inp = six.StringIO(SAMPLE_RIPL_MASS) for z, a, el, mass, _err in ripl.readFRDMMassFile(inp): if z == 1 and a == 1: self.assertAlmostEqual(mass, 1.0078250321) self.assertEqual(el, "H") break else: raise ValueError("No hydrogen found")
def __readRiplNuclides(): """ Initialize all nuclides with experimentally-measured masses. This includes roughly 4000 nuclides and should represent anything we ever want to model. This builds the large set of NuclideBases available. RIPL is the Reference Input Parameter Library (RIPL-3), which can be found at https://www-nds.iaea.org/RIPL-3/. """ from armi.nuclearDataIO import ripl elements.clearNuclideBases() for z, a, symbol, mass, _err in ripl.readFRDMMassFile( os.path.join(armi.context.RES, "ripl-mass-frdm95.dat")): if z == 0 and a == 1: # skip the neutron continue element = elements.bySymbol[symbol.upper()] NuclideBase(element, a, mass, 0, 0, None)