.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "_examples/06_eit_fzj/plot_eit_fzj_leakage_currents.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_06_eit_fzj_plot_eit_fzj_leakage_currents.py: Analyzing leakage currents -------------------------- Reproduce Fig. 4 of Zimmermann et al 2019: Zimmermann, E., Huisman, J. A., Mester, A., and van Waasen, S.: Correction of phase errors due to leakage currents in wideband EIT field measurements on soil and sediments, Measurement Science and Technology, 30, 084 002, doi:10.1088/1361-6501/ab1b09, 2019. .. GENERATED FROM PYTHON SOURCE LINES 14-46 .. image-sg:: /_examples/06_eit_fzj/images/sphx_glr_plot_eit_fzj_leakage_currents_001.png :alt: plot eit fzj leakage currents :srcset: /_examples/06_eit_fzj/images/sphx_glr_plot_eit_fzj_leakage_currents_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none selecting multiplexer group 1 selecting multiplexer group 1 Constructing four-point measurements | .. code-block:: Python import matplotlib.pylab as plt import numpy as np import reda import reda.importers.eit_fzj as eit_fzj emd, md = eit_fzj.get_mnu0_data( 'data_eit_fzj_leakage_currents/eit_data_mnu0.mat', 'data_eit_fzj_leakage_currents/configs.data', multiplexer_group=1 ) data_1k = emd.query('frequency == 1000') # symmetric excitation current Is = data_1k['Iab'] # leakage current Il = data_1k['Ileakage'] ratio_IlIs = np.abs(Il) / np.abs(Is) Zt_imag = np.imag(data_1k['Zt']) fig, ax = plt.subplots(1, 1, figsize=(8.3 / 2.54, 4.5 / 2.54)) ax.semilogx(ratio_IlIs, Zt_imag, '.') ax.set_ylabel(r'imag(Zt) [$\Omega$]') ax.set_xlabel(r'$|I_l| / |I_s|$') fig.tight_layout() with reda.CreateEnterDirectory('output_eit_fzj_leakage_currents'): fig.savefig('plot_ratio_vs_Zt.jpg', dpi=300) .. _sphx_glr_download__examples_06_eit_fzj_plot_eit_fzj_leakage_currents.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_eit_fzj_leakage_currents.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_eit_fzj_leakage_currents.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_