diff --git a/src/nqr_blochsimulator/classes/sample.py b/src/nqr_blochsimulator/classes/sample.py index d4a2632..9c59d93 100644 --- a/src/nqr_blochsimulator/classes/sample.py +++ b/src/nqr_blochsimulator/classes/sample.py @@ -18,7 +18,7 @@ class Sample: resonant_frequency : float, gamma : float, nuclear_spin : float, - spin_transition : int, + spin_factor : float, powder_factor : float, filling_factor : float, T1 : float, @@ -46,13 +46,8 @@ class Sample: The gamma value of the sample in MHz/T. nuclear_spin : float The nuclear spin quantum number of the sample. - spin_transition: int - The spin transition of the sample. - 0 is -1/2 -> 1/2 - 1 is 1/2 -> 3/2 - 2 is 3/2 -> 5/2 - 3 is 5/2 -> 7/2 - 4 is 7/2 -> 9/2 + spin_factor : float + The spin transition factor of the sample. powder_factor : float The powder factor of the sample. filling_factor : float @@ -78,8 +73,7 @@ class Sample: self.resonant_frequency = resonant_frequency * 1e6 self.gamma = gamma * 1e6 self.nuclear_spin = nuclear_spin - self.spin_transition = spin_transition - self.spin_factor = self.calculate_spin_transition_factor(nuclear_spin, self.spin_transition) + self.spin_factor = spin_factor self.powder_factor = powder_factor self.filling_factor = filling_factor self.T1 = T1 * 1e-6 diff --git a/tests/simulation.py b/tests/simulation.py index bb5f873..77b5a7d 100644 --- a/tests/simulation.py +++ b/tests/simulation.py @@ -17,8 +17,8 @@ class TestSimulation(unittest.TestCase): molar_mass=440.3, # g/mol resonant_frequency=83.56e6, # Hz gamma=43.42, # MHz/T - nuclear_spin= 7 / 2, - spin_transition=2, + nuclear_spin= 9 / 2, + spin_factor=1.94 powder_factor=0.75, filling_factor=0.7, T1=83.5, # µs @@ -76,7 +76,7 @@ class TestSimulation(unittest.TestCase): def test_spin_factor_calculation(self): spin = self.sample.nuclear_spin - transition = self.sample.spin_transition + transition = 1 spin_factor = self.sample.calculate_spin_transition_factor(spin, transition) logger.info("Spin factor: " + str(spin_factor))