.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/2D_simulation(crystalline)/plot_2_STMAS_quad_coupling_cross.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_2D_simulation(crystalline)_plot_2_STMAS_quad_coupling_cross.py: Co59 (I=7/2) STMAS ^^^^^^^^^^^^^^^^^^ Co59 (I=7/2) satellite-transition magic-angle spinning simulation. (Quad-coupling cross terms) .. GENERATED FROM PYTHON SOURCE LINES 11-20 .. code-block:: Python import matplotlib.pyplot as plt from mrsimulator import Simulator, SpinSystem, Site, Coupling from mrsimulator.method.lib import ST1_VAS from mrsimulator import signal_processor as sp from mrsimulator.spin_system.tensors import SymmetricTensor from mrsimulator.method import SpectralDimension .. GENERATED FROM PYTHON SOURCE LINES 22-23 Generate the site and spin system objects. .. GENERATED FROM PYTHON SOURCE LINES 23-36 .. code-block:: Python Co_sites = [ Site( isotope="59Co", # 59Co isotropic_chemical_shift=0, # in ppm # shielding_symmetric=SymmetricTensor(zeta=-1750, eta=0), quadrupolar=SymmetricTensor(Cq=3.1e6, eta=0.2), # Cq is in Hz ), Site(isotope="1H", isotropic_chemical_shift=0), ] coupling = [Coupling(site_index=[0, 1], dipolar={"D": 50000})] spin_systems = [SpinSystem(sites=Co_sites, couplings=coupling)] .. GENERATED FROM PYTHON SOURCE LINES 37-40 Select a satellite-transition variable-angle spinning method. The following `ST1_VAS` method correlates the frequencies from the two inner-satellite transitions to the central transition. .. GENERATED FROM PYTHON SOURCE LINES 40-66 .. code-block:: Python method = ST1_VAS( channels=["59Co"], magnetic_flux_density=4.684, # in T rotor_angle=54.7359 * 3.14159 / 180, # in rad (magic angle) spectral_dimensions=[ SpectralDimension( count=256, spectral_width=1e3, # in Hz # reference_offset=-1e3, # in Hz label="Isotropic dimension", ), SpectralDimension( count=512, spectral_width=3e3, # in Hz reference_offset=-1e3, # in Hz label="MAS dimension", ), ], ) # A graphical representation of the method object. plt.figure(figsize=(5, 2.5)) method.plot() plt.show() .. image-sg:: /examples/2D_simulation(crystalline)/images/sphx_glr_plot_2_STMAS_quad_coupling_cross_001.png :alt: ST1_VAS :srcset: /examples/2D_simulation(crystalline)/images/sphx_glr_plot_2_STMAS_quad_coupling_cross_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 67-69 Create the Simulator object, add the method and spin system objects, and run the simulation. .. GENERATED FROM PYTHON SOURCE LINES 69-73 .. code-block:: Python sim = Simulator(spin_systems=spin_systems, methods=[method]) sim.config.decompose_spectrum = "spin_system" sim.run() .. GENERATED FROM PYTHON SOURCE LINES 74-75 Add post-simulation signal processing. .. GENERATED FROM PYTHON SOURCE LINES 75-88 .. code-block:: Python dataset = sim.methods[0].simulation processor = sp.SignalProcessor( operations=[ # Gaussian convolution along both dimensions. sp.IFFT(dim_index=(0, 1)), sp.apodization.Gaussian(FWHM="20 Hz", dim_index=0), sp.apodization.Gaussian(FWHM="20 Hz", dim_index=1), sp.FFT(dim_index=(0, 1)), ] ) processed_dataset = processor.apply_operations(dataset=dataset) .. GENERATED FROM PYTHON SOURCE LINES 89-90 The plot of the simulation. .. GENERATED FROM PYTHON SOURCE LINES 90-100 .. code-block:: Python _ = [item.to("kHz", "nmr_frequency_ratio") for item in processed_dataset.x] processed_dataset = processed_dataset.split() plt.figure(figsize=(4.25, 3.0)) ax = plt.subplot(projection="csdm") ax.imshow(processed_dataset[0].real, cmap="gist_ncar_r", aspect="auto") ax.invert_xaxis() ax.invert_yaxis() plt.tight_layout() plt.show() .. image-sg:: /examples/2D_simulation(crystalline)/images/sphx_glr_plot_2_STMAS_quad_coupling_cross_002.png :alt: spin system 0 :srcset: /examples/2D_simulation(crystalline)/images/sphx_glr_plot_2_STMAS_quad_coupling_cross_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.600 seconds) .. _sphx_glr_download_examples_2D_simulation(crystalline)_plot_2_STMAS_quad_coupling_cross.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_2_STMAS_quad_coupling_cross.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_2_STMAS_quad_coupling_cross.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_