.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "_examples/02_SIP04/plot_sip04.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_02_SIP04_plot_sip04.py: SIP-04 Import ============= .. GENERATED FROM PYTHON SOURCE LINES 9-10 Create the SIP container .. GENERATED FROM PYTHON SOURCE LINES 10-13 .. code-block:: Python import reda sip = reda.SIP() .. GENERATED FROM PYTHON SOURCE LINES 14-15 Import the SIP data .. GENERATED FROM PYTHON SOURCE LINES 15-17 .. code-block:: Python sip.import_sip04('sip_data.mat') .. rst-class:: sphx-glr-script-out .. code-block:: none Import SIP04 data from .mat file Summary: a b m n count 22.0 22.0 22.0 22.0 mean 1.0 4.0 2.0 3.0 std 0.0 0.0 0.0 0.0 min 1.0 4.0 2.0 3.0 25% 1.0 4.0 2.0 3.0 50% 1.0 4.0 2.0 3.0 75% 1.0 4.0 2.0 3.0 max 1.0 4.0 2.0 3.0 .. GENERATED FROM PYTHON SOURCE LINES 18-19 show the data .. GENERATED FROM PYTHON SOURCE LINES 19-22 .. code-block:: Python print(type(sip.data)) print(sip.data[['a', 'b', 'm', 'n', 'frequency', 'r', 'rpha']]) .. rst-class:: sphx-glr-script-out .. code-block:: none a b m n frequency r rpha 0 1 4 2 3 0.01 91710.822743 -29.362558 1 1 4 2 3 0.02 90636.299943 -28.489816 2 1 4 2 3 0.05 89244.733614 -26.907518 3 1 4 2 3 0.10 88216.019214 -26.126560 4 1 4 2 3 0.20 87199.203662 -25.008222 5 1 4 2 3 0.50 85920.509490 -22.469295 6 1 4 2 3 1.00 85104.832528 -19.333149 7 1 4 2 3 2.00 84452.492098 -15.902216 8 1 4 2 3 5.00 83819.335016 -12.312403 9 1 4 2 3 10.00 83432.605700 -10.303340 10 1 4 2 3 20.00 83104.178605 -8.858852 11 1 4 2 3 30.00 82930.728765 -8.257339 12 1 4 2 3 70.00 82606.356388 -7.006607 13 1 4 2 3 130.00 82389.613467 -6.253892 14 1 4 2 3 200.00 82254.030100 -5.743527 15 1 4 2 3 500.00 82000.383966 -4.723193 16 1 4 2 3 1000.00 81852.442931 -3.658800 17 1 4 2 3 2000.00 81744.531873 -2.586255 18 1 4 2 3 5000.00 81779.213925 -1.349227 19 1 4 2 3 10000.00 82085.647708 -3.090301 20 1 4 2 3 20000.00 82641.939514 -13.275897 21 1 4 2 3 45000.00 83175.799742 -45.989948 .. GENERATED FROM PYTHON SOURCE LINES 23-24 plot the spectrum .. GENERATED FROM PYTHON SOURCE LINES 24-34 .. code-block:: Python from reda.eis.plots import sip_response spectrum = sip_response( frequencies=sip.data['frequency'].values, rcomplex=sip.data['zt'].values, ) # note the dtype indicates that no geometric factor was applied to the data fig = spectrum.plot(filename='spectrum.png', dtype='r', return_fig=True) .. image-sg:: /_examples/02_SIP04/images/sphx_glr_plot_sip04_001.png :alt: plot sip04 :srcset: /_examples/02_SIP04/images/sphx_glr_plot_sip04_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 35-36 save data to ascii file .. GENERATED FROM PYTHON SOURCE LINES 36-42 .. code-block:: Python sip.export_specs_to_ascii('frequencies.dat', 'data.dat') # optionally: # install ccd_tools: pip install ccd_tools # then in the command line, run: # ccd_single --plot --norm 10 .. _sphx_glr_download__examples_02_SIP04_plot_sip04.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_sip04.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_sip04.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_