.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "_examples/06_eit_fzj/plot_04_analyze_ug.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_04_analyze_ug.py: EIT-FZJ: Analyze DC voltages at electrodes during injections ------------------------------------------------------------ .. GENERATED FROM PYTHON SOURCE LINES 7-45 .. image-sg:: /_examples/06_eit_fzj/images/sphx_glr_plot_04_analyze_ug_001.png :alt: Ug3-1 for 0.31446541 Hz :srcset: /_examples/06_eit_fzj/images/sphx_glr_plot_04_analyze_ug_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pylab as plt import reda import reda.importers.eit_fzj as eit_fzj adc_data = eit_fzj.get_adc_data('data_eit_fzj_2013_ug/eit_data_mnu0.mat') with reda.CreateEnterDirectory('output_04_ug3'): frequencies = list( adc_data.swaplevel(0, 2).groupby('frequency').groups.keys()) # frequency to plot frequency = frequencies[1] fig, ax = plt.subplots( 1, 1, figsize=(20 / 2.54, 25 / 2.54), sharex=True, sharey=True) subdata = adc_data.swaplevel(0, 2).loc[frequency] im = ax.imshow( subdata.swaplevel(0, 1, axis=1)['Ug3_1'].values, interpolation=None, ) ax.set_aspect('auto') ax.set_yticks(list(range(subdata.index.shape[0]))) ax.set_yticklabels(subdata.index.droplevel(2).values) cb = fig.colorbar(im, ax=ax) cb.set_label(r'Ug [V]') # ax.set_ylim(0, 10) ax.set_title('Ug3-1 for {} Hz'.format(frequency)) ax.set_ylabel('injection number') ax.set_xlabel('ADC Channel') fig.tight_layout() fig.savefig('plot_ug3-1.pdf', dpi=300) .. _sphx_glr_download__examples_06_eit_fzj_plot_04_analyze_ug.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_04_analyze_ug.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_04_analyze_ug.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_