.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/QESR.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_QESR.py: Quantify the Double Integral of an ESR spectra (QESR) ======================================================== Calculate the concentration of spin label present in a sample based on the double integral of an ESR spectra. An ESR spectra should be collected for both the sample of interest as well as a "background" (typically water for aqueous samples). The spectra is rescaled according to it's acquisition parameters (e.g., Q value, diameter of capillaries, modulation amplitude, gain, etc) and multiplied by a proportionality constant that is defined in your pyspecdata config file. In order to properly run this example, your config file should have the following values under General: :: 220720new propfactor = 1.715e-10 220720new q = 4600 qesr caps diameter = 0.704 default calibration = 220720new default diameter = qesr caps Note that the diameter is given in units of mm. .. GENERATED FROM PYTHON SOURCE LINES 27-68 .. rst-class:: sphx-glr-horizontal * .. image-sg:: /auto_examples/images/sphx_glr_QESR_001.png :alt: zoomed-in baseline diagnostic showing only baseline (data and fit) :srcset: /auto_examples/images/sphx_glr_QESR_001.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_QESR_002.png :alt: abs mode: background subtracted, show baseline, $\left(\frac{dblint}{denom}\right)(calibration\ \rightarrow None)$ :srcset: /auto_examples/images/sphx_glr_QESR_002.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_QESR_003.png :alt: zoomed-in baseline diagnostic showing only baseline (data and fit) :srcset: /auto_examples/images/sphx_glr_QESR_003.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_QESR_004.png :alt: abs mode: background subtracted, show baseline, $\left(\frac{dblint}{denom}\right)(calibration\ \rightarrow None)$ :srcset: /auto_examples/images/sphx_glr_QESR_004.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none the stored concentration is 69.93816677405941 millimolar the stored concentration is 521.3475578866337 micromolar 1: ras baseline diagnostic {'print_string': '\\par'} {'width': 0.9} 2: ras absorption, bg. no bl. |||G {'print_string': '\\textbf{\\texttt{220804_rasI36_MTSL.DSC}}\\par'} {'print_string': '\\par'} 3: calibration experiment baseline diagnostic {'print_string': '\\par'} {'width': 0.9} 4: calibration experiment absorption, bg. no bl. |||G {'print_string': '\\textbf{\\texttt{220720_stock_4.DSC}}\\par'} {'print_string': '\\par'} \par \textbf{\texttt{220804_rasI36_MTSL.DSC}}\par \par \par \textbf{\texttt{220720_stock_4.DSC}}\par \par | .. code-block:: Python from matplotlib.pyplot import rcParams from pyspecProcScripts import QESR from pyspecdata import figlist_var, find_file import pickle # sphinx_gallery_thumbnail_number = 2 rcParams["image.aspect"] = "auto" # needed for sphinx gallery pickle_file = "TEMPOL_rerun_conc.pickle" # when complete, the # concentration is stored here with figlist_var() as fl: fl.basename = "ras" # I want different basenames so these show up on # different plots, because they have very # different concentrations c = QESR( "220804_rasI36_MTSL.DSC", # filename label="kRas I36", # label for legends exp_type="francklab_esr/Farhana", # location of file diameter_name="QESR caps", background=find_file( "220804_water.DSC", exp_type="francklab_esr/Farhana" )[ "harmonic", 0 ], # background used for background subtraction - loaded above pickle_file=pickle_file, fl=fl, ) fl.basename = "calibration experiment" c = QESR( "220720_stock_4.DSC", # filename label="70 mM ref", # label for legends exp_type="francklab_esr/alex", # location of file diameter_name="QESR caps", pickle_file=pickle_file, fl=fl, ) with open(pickle_file, "rb") as fp: pickle_vars = pickle.load(fp) print("the stored concentration is", pickle_vars["70 mM ref"]) print("the stored concentration is", pickle_vars["kRas I36"]) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 2.328 seconds) .. _sphx_glr_download_auto_examples_QESR.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: QESR.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: QESR.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_