"ch1": { "P": [-1], "D": [0] } }], ) ], ), ], experiment=experiment, # also add the measurement to the method. ) # Optimize the script by pre-setting the transition pathways for each spin system from # the das method. for sys in spin_systems: sys.transition_pathways = DAS.get_transition_pathways(sys) # %% # **Guess Spectrum** # Simulation # ---------- sim = Simulator(spin_systems=spin_systems, methods=[DAS]) sim.config.number_of_sidebands = 1 # no sidebands are required for this dataset. sim.run() # Post Simulation Processing # -------------------------- processor = sp.SignalProcessor(operations=[ # Gaussian convolution along both dimensions. sp.IFFT(dim_index=(0, 1)),
# the two SpectralEvent. A MixingEvent does not directly contribute to the frequencies. # As the name suggests, a mixing event is used for the mixing of transitions in a # multi-event method such as HahnEcho. In the above code, we define a mixing query # on channel-1 by setting the attributes ``angle`` and ``phase`` to :math:`\pi` and # 0, respectively. There two parameters are analogous to the pulse angle and phase. # %% plt.figure(figsize=(4, 2)) hahn_echo.plot() plt.show() # %% # As mentioned before, a method object is decoupled from the spin system object. Notice, # when we get the transition pathways from this method for a single-site spin system, we # get a single transition pathway. pprint(hahn_echo.get_transition_pathways(spin_system_1)) # %% # In the case of a homonuclear two-site spin 1/2 spin system, the same method returns # four transition pathways. pprint(hahn_echo.get_transition_pathways(spin_system_2)) # %% # Create the Simulator object, add the method and spin system objects, and run the # simulation. sim = Simulator(spin_systems=[spin_system_1, spin_system_2], methods=[hahn_echo]) sim.config.decompose_spectrum = "spin_system" sim.run() # %%
def test_warnings(): s = SpinSystem(sites=[Site(isotope="23Na")]) m = Method(channels=["1H"], spectral_dimensions=[{}]) assert m.get_transition_pathways(s) == []
"ch1": { "P": [-1] } }], freq_contrib=["Shielding1_0", "Shielding1_2"], ) ], ), ], experiment=experiment, # also add the measurement to the method. ) # Optimize the script by pre-setting the transition pathways for each spin system from # the method. for sys in spin_systems: sys.transition_pathways = shifting_d.get_transition_pathways(sys) # %% # **Guess Spectrum** # Simulation # ---------- sim = Simulator(spin_systems=spin_systems, methods=[shifting_d]) sim.config.integration_volume = "hemisphere" sim.run() # Post Simulation Processing # -------------------------- processor = sp.SignalProcessor(operations=[ # Gaussian convolution along both dimensions. sp.IFFT(dim_index=(0, 1)),