.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/01_ImportingData/plot_02_load_1D_NMR_spectrum_Kea.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_auto_examples_01_ImportingData_plot_02_load_1D_NMR_spectrum_Kea.py: .. _plot_02_load_1D_NMR_spectrum_Kea: ===================================== Load two 1D NMR spectra in Kea format ===================================== In this example we demonstrate how to import two ODNP-enhanced NMR spectra, one recorded with a microwave power of 0 W (off-signal) and one with a microwave power of 2 W (on-signal). The spectra are recorded using a Magritek Kea system. The example script has three different sections: #. Load and Process Off-Signal #. Load and Process On-Signal #. Create a Figure and Plot On/Off Spectra .. GENERATED FROM PYTHON SOURCE LINES 19-20 Make sure to start with importing DNPLab .. GENERATED FROM PYTHON SOURCE LINES 20-22 .. code-block:: Python import dnplab as dnp .. GENERATED FROM PYTHON SOURCE LINES 23-26 Load and Process Off-Signal ----------------------------- The next section demonstrates how the FID is imported into DNPLab and processed. Processing involves removing any DC offset, followed by a 15 Hz linewidth apodization, prior to performing the Fourier transformation. .. GENERATED FROM PYTHON SOURCE LINES 26-34 .. code-block:: Python ########## OFF Signal (P = 0 W) ########## data_off = dnp.load("../../data/prospa/10mM_TEMPO_Water/1Pulse_20200929/35/data.1d") data_off = dnp.remove_background(data_off) data_off = dnp.apodize(data_off, lw=15) data_off = dnp.fourier_transform(data_off) .. GENERATED FROM PYTHON SOURCE LINES 35-38 Load and Process ON-Signal ---------------------------- Importing the on-signal involves the same steps as importing the off-signal. Once processed the data is copied to the results buffer 'onSignal'. .. GENERATED FROM PYTHON SOURCE LINES 38-46 .. code-block:: Python ########## ON Signal (P = 2 W) ########## data_on = dnp.load("../../data/prospa/10mM_TEMPO_Water/1Pulse_20200929/51/data.1d") data_on = dnp.remove_background(data_on) data_on = dnp.apodize(data_on, lw=15) data_on = dnp.fourier_transform(data_on) .. GENERATED FROM PYTHON SOURCE LINES 47-50 Plot Microwave On/Off DNP Spectra --------------------------------- First plot spectra individually .. GENERATED FROM PYTHON SOURCE LINES 50-60 .. code-block:: Python sampleTag = "10 mM TEMPO in Water" dnp.plt.figure() dnp.fancy_plot(data_on, title=sampleTag + ", MW On Spectrum") dnp.plt.figure() dnp.fancy_plot(data_off, title=sampleTag + ", MW Off Spectrum") dnp.plt.show() .. rst-class:: sphx-glr-horizontal * .. image-sg:: /auto_examples/01_ImportingData/images/sphx_glr_plot_02_load_1D_NMR_spectrum_Kea_001.png :alt: 10 mM TEMPO in Water, MW On Spectrum :srcset: /auto_examples/01_ImportingData/images/sphx_glr_plot_02_load_1D_NMR_spectrum_Kea_001.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/01_ImportingData/images/sphx_glr_plot_02_load_1D_NMR_spectrum_Kea_002.png :alt: 10 mM TEMPO in Water, MW Off Spectrum :srcset: /auto_examples/01_ImportingData/images/sphx_glr_plot_02_load_1D_NMR_spectrum_Kea_002.png :class: sphx-glr-multi-img .. GENERATED FROM PYTHON SOURCE LINES 61-62 Next plot both spectra in the same figure .. GENERATED FROM PYTHON SOURCE LINES 62-69 .. code-block:: Python dnp.plt.figure() dnp.fancy_plot(data_on, xlim=[-20, 20]) dnp.fancy_plot(data_off * 50, xlim=[-20, 20]) dnp.plt.title(sampleTag + ", MW ON/OFF(*50)") dnp.plt.tight_layout() dnp.plt.show() .. image-sg:: /auto_examples/01_ImportingData/images/sphx_glr_plot_02_load_1D_NMR_spectrum_Kea_003.png :alt: 10 mM TEMPO in Water, MW ON/OFF(*50) :srcset: /auto_examples/01_ImportingData/images/sphx_glr_plot_02_load_1D_NMR_spectrum_Kea_003.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.463 seconds) .. _sphx_glr_download_auto_examples_01_ImportingData_plot_02_load_1D_NMR_spectrum_Kea.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_02_load_1D_NMR_spectrum_Kea.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_02_load_1D_NMR_spectrum_Kea.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_