.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "_examples/01_modelling/plot_07_fwd_model_plotting.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_01_modelling_plot_07_fwd_model_plotting.py: Plot forward models ^^^^^^^^^^^^^^^^^^^ Test plotting forward models for different mesh boundaries. .. GENERATED FROM PYTHON SOURCE LINES 11-12 imports .. GENERATED FROM PYTHON SOURCE LINES 12-15 .. code-block:: Python import numpy as np import crtomo .. GENERATED FROM PYTHON SOURCE LINES 16-17 set up plotting facilities - this will often generate better fitting plots .. GENERATED FROM PYTHON SOURCE LINES 17-20 .. code-block:: Python import crtomo.mpl crtomo.mpl.setup() .. GENERATED FROM PYTHON SOURCE LINES 21-22 a surface grid .. GENERATED FROM PYTHON SOURCE LINES 22-36 .. code-block:: Python grid = crtomo.crt_grid.create_surface_grid(nr_electrodes=15, spacing=1) grid.plot_grid() frequencies = np.logspace(-3, 3, 10) eitman = crtomo.eitMan(frequencies=frequencies, grid=grid) eitman.add_homogeneous_model(magnitude=100, phase=0) eitman.set_area_to_single_colecole( 0, 5, -2, 0, [100, 0.1, 0.04, 0.8] ) r = eitman.plot_forward_models(maglim=[90, 110], phalim=[-30, 0]) # save to files r['rpha']['fig'].savefig('fwd_model_par_rpha.png', dpi=300) .. rst-class:: sphx-glr-horizontal * .. image-sg:: /_examples/01_modelling/images/sphx_glr_plot_07_fwd_model_plotting_001.png :alt: plot 07 fwd model plotting :srcset: /_examples/01_modelling/images/sphx_glr_plot_07_fwd_model_plotting_001.png :class: sphx-glr-multi-img * .. image-sg:: /_examples/01_modelling/images/sphx_glr_plot_07_fwd_model_plotting_002.png :alt: 0.001 Hz, 0.005 Hz, 0.022 Hz, 0.100 Hz, 0.464 Hz, 2.154 Hz, 10.000 Hz, 46.416 Hz, 215.443 Hz, 1000.000 Hz :srcset: /_examples/01_modelling/images/sphx_glr_plot_07_fwd_model_plotting_002.png :class: sphx-glr-multi-img * .. image-sg:: /_examples/01_modelling/images/sphx_glr_plot_07_fwd_model_plotting_003.png :alt: 0.001 Hz, 0.005 Hz, 0.022 Hz, 0.100 Hz, 0.464 Hz, 2.154 Hz, 10.000 Hz, 46.416 Hz, 215.443 Hz, 1000.000 Hz :srcset: /_examples/01_modelling/images/sphx_glr_plot_07_fwd_model_plotting_003.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none This grid was sorted using CutMcK. The nodes were resorted! Triangular grid found .. GENERATED FROM PYTHON SOURCE LINES 37-38 a rhizotron .. GENERATED FROM PYTHON SOURCE LINES 38-53 .. code-block:: Python grid = crtomo.crt_grid('grid_rhizotron/elem.dat', 'grid_rhizotron/elec.dat') grid.plot_grid() frequencies = np.logspace(-3, 3, 10) eitman = crtomo.eitMan(frequencies=frequencies, grid=grid) eitman.add_homogeneous_model(magnitude=100, phase=0) eitman.set_area_to_single_colecole( 0, 5, -2, 0, [100, 0.1, 0.04, 0.8] ) r = eitman.plot_forward_models(maglim=[90, 110], phalim=[-30, 0]) # save to files # r['rpha']['fig'].savefig('fwd_model_par_rpha.png', dpi=300) # sphinx_gallery_thumbnail_number = -1 .. rst-class:: sphx-glr-horizontal * .. image-sg:: /_examples/01_modelling/images/sphx_glr_plot_07_fwd_model_plotting_004.png :alt: plot 07 fwd model plotting :srcset: /_examples/01_modelling/images/sphx_glr_plot_07_fwd_model_plotting_004.png :class: sphx-glr-multi-img * .. image-sg:: /_examples/01_modelling/images/sphx_glr_plot_07_fwd_model_plotting_005.png :alt: 0.001 Hz, 0.005 Hz, 0.022 Hz, 0.100 Hz, 0.464 Hz, 2.154 Hz, 10.000 Hz, 46.416 Hz, 215.443 Hz, 1000.000 Hz :srcset: /_examples/01_modelling/images/sphx_glr_plot_07_fwd_model_plotting_005.png :class: sphx-glr-multi-img * .. image-sg:: /_examples/01_modelling/images/sphx_glr_plot_07_fwd_model_plotting_006.png :alt: 0.001 Hz, 0.005 Hz, 0.022 Hz, 0.100 Hz, 0.464 Hz, 2.154 Hz, 10.000 Hz, 46.416 Hz, 215.443 Hz, 1000.000 Hz :srcset: /_examples/01_modelling/images/sphx_glr_plot_07_fwd_model_plotting_006.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none This grid was sorted using CutMcK. The nodes were resorted! Triangular grid found .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 19.639 seconds) .. _sphx_glr_download__examples_01_modelling_plot_07_fwd_model_plotting.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_07_fwd_model_plotting.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_07_fwd_model_plotting.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_07_fwd_model_plotting.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_