def test_DnmrTwoSinglets_frequencies_commute(): ab = DnmrTwoSinglets(165.00, 135.00, 1.50, 2.50, 0.50, 0.75) ba = DnmrTwoSinglets(135.00, 165.00, 1.50, 0.50, 2.50, 0.25) ab_spec = ab.lineshape() # doing this saves a function call (faster test) ba_spec = ba.lineshape() popplot(*ab_spec) popplot(*ba_spec) np.testing.assert_array_almost_equal(ab_spec, ba_spec)
def test_DnmrTwoSinglets_fastexchange(): sim = DnmrTwoSinglets(165, 135, 1000, 0.5, 0.5, 0.5) assert np.allclose(sim.lineshape(), TWOSPIN_FAST) popplot(*sim.lineshape())
def test_DnmrTwoSinglets_coalesce(): sim = DnmrTwoSinglets(165, 135, 65.9, 0.5, 0.5, 0.5) assert np.allclose(sim.lineshape(), TWOSPIN_COALESCE) popplot(*sim.lineshape())
def test_DnmrTwoSinglets_slow_exchange(): sim = DnmrTwoSinglets(165, 135, 1.5, 0.5, 0.5, 0.5) assert np.allclose(sim.lineshape(), TWOSPIN_SLOW) popplot(*sim.lineshape())