def genchains(chains, sf=False): chain = chains[-1] children = all_children(chain[-1]) # filters spontaneous fission if not sf: children = {c for c in children if (0.0 == fpyield(chain[-1], c)) and (c not in chain) } if decay_const(chain[-1]) != 0: for child in children: if child not in chain: chains.append(chain + (child,)) chains = genchains(chains, sf=sf) return chains
def genchains(chains, sf=False): chain = chains[-1] children = decay_children(chain[-1]) # filters spontaneous fission if not sf: children = { c for c in children if (0.0 == fpyield(chain[-1], c)) and (c not in chain) } if decay_const(chain[-1]) != 0: for child in children: if child not in chain: chains.append(chain + (child,)) chains = genchains(chains, sf=sf) return chains
def test_nds_fpyield(): assert_equal(data.fpyield("Th-232", "Eu-154", 3), 2.79e-07) assert_equal(data.fpyield("Th-232", "Eu-154", 3, True), 9.3e-08)
def test_wims_fpyield(): assert_equal(data.fpyield("Th-232", "Eu-154"), 2.2000e-13) assert_equal(data.fpyield(962440000, 611480001), 1.3800e-06)
def test_nds_fpyield(): assert_equal(data.fpyield('Th-232', 'Eu-154', 3), 9.6000E-8) assert_equal(data.fpyield('Th-232', 'Eu-154', 3, True), 3.8000E-8)
def test_wims_fpyield(): assert_equal(data.fpyield('Th-232', 'Eu-154'), 2.2000E-13) assert_equal(data.fpyield(962440000, 611480001), 1.3800E-06)
def test_nds_fpyield(): assert_equal(data.fpyield('Th-232', 'Eu-154', 3), 2.79e-07) assert_equal(data.fpyield('Th-232', 'Eu-154', 3, True), 9.3e-08)