Exemple #1
0
 def test_json(self):
     n = Nuclide.load(line=self.lines[0])
     self.assertEqual({
         'atomicNumber': 0,
         'massNumber':   1,
         'halfLife':     613.9,
     }, n.json())
Exemple #2
0
 def test_column_widths(self):
     n = Nuclide.load(line=self.lines[16])
     self.assertEqual({
         'atomicNumber':             '003',
         'atomicNumberExtra':        '8W',
         'decayModesAndIntensities': 'IT=100',
         'ensdfArchiveFileYear':     '02',
         'excitationEnergy':         '3562.88    0.10',
         'halfLife':                 '56',
         'halfLifeUnit':             'as',
         'massNumber':               '006',
         'massExcess':               '17649.76     0.10',
         'nuclide':                  '6Lii',
         'reference':                '81Ro02e',
         'spinAndParity':            '0+      T=1',
         'unknown':                  '14',
         'yearOfDiscovery':          '1981',
     }, n._row)
Exemple #3
0
 def test_beta_decay_note(self):
     n = Nuclide.load(line=self.lines[0])
     self.assertIn('→β-', n.notes)
Exemple #4
0
 def test_60Ni(self):
     n = Nuclide.load(line=self.lines[781])
     self.assertEqual('60Ni', n.label)
     self.assertEqual(-64472.5, n.mass_excess_kev)
Exemple #5
0
 def test_59Ni(self):
     n = Nuclide.load(line=self.lines[763])
     self.assertEqual('59Ni', n.label)
     self.assertEqual(-61156.1, n.mass_excess_kev)
Exemple #6
0
 def test_isotopic_abundance_2(self):
     "The abundance should be zero for unstable isotopes."
     n = Nuclide.load(line=self.lines[3])
     self.assertEqual(0., n.isotopic_abundance)
Exemple #7
0
 def test_signature(self):
     n = Nuclide.load(line=self.lines[15])
     self.assertEqual(('6Li', '0'), n.signature)
     n = Nuclide.load(line=self.lines[16])
     self.assertEqual(('6Li', 'i'), n.signature)
Exemple #8
0
 def test_alpha_decay_note(self):
     n = Nuclide.load(line=self.lines[29])
     self.assertIn('→α', n.notes)
Exemple #9
0
 def test_isotopic_abundance_1(self):
     "There should be an abundance for a stable isotope."
     n = Nuclide.load(line=self.lines[1])
     self.assertEqual(99.9885, n.isotopic_abundance)
     n = Nuclide.load(line=self.lines[2])
     self.assertEqual(0.0115, n.isotopic_abundance)
Exemple #10
0
 def test_neutron_decay_note(self):
     n = Nuclide.load(line=self.lines[6])
     self.assertIn('→n', n.notes)
Exemple #11
0
 def test_electron_capture_note(self):
     n = Nuclide.load(line=self.lines[23])
     self.assertIn('→ε', n.notes)
Exemple #12
0
 def test_SF_note(self):
     n = Nuclide.load(line=self.lines[4901])
     self.assertIn('→SF', n.notes)
Exemple #13
0
 def test_basic_fields(self):
     n = Nuclide.load(line=self.lines[0])
     self.assertEqual(0, n.atomic_number)
     self.assertEqual('613.9 s', str(n.half_life))
Exemple #14
0
 def test_B_n_note2(self):
     n = Nuclide.load(line=self.lines[478])
     self.assertIn('→β-n', n.notes)
Exemple #15
0
 def test_B_3n_note(self):
     n = Nuclide.load(line=self.lines[126])
     self.assertIn('→β-3n', n.notes)
Exemple #16
0
 def test_B_d_note(self):
     n = Nuclide.load(line=self.lines[14])
     self.assertIn('→β-d', n.notes)
Exemple #17
0
 def test_B_2n_note(self):
     n = Nuclide.load(line=self.lines[89])
     self.assertIn('→β-2n', n.notes)
Exemple #18
0
 def test_B_A_note(self):
     n = Nuclide.load(line=self.lines[41])
     self.assertIn('→β+α', n.notes)
Exemple #19
0
 def test_proton_decay_note(self):
     n = Nuclide.load(line=self.lines[11])
     self.assertIn('→p', n.notes)
Exemple #20
0
 def test_mass_number(self):
     n = Nuclide.load(line=self.lines[0])
     self.assertEqual(1, n.mass_number)
Exemple #21
0
 def test_internal_transition_note2(self):
     n = Nuclide.load(line=self.lines[16])
     self.assertIn('→IT', n.notes)
Exemple #22
0
 def test_2p_note(self):
     n = Nuclide.load(line=self.lines[17])
     self.assertIn('→2p', n.notes)