.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/tttr/plot_tttr_transcode.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_tttr_plot_tttr_transcode.py: ================================ TTTR writing / Transcode ================================ Save the content of a PTU file in an SPC file .. GENERATED FROM PYTHON SOURCE LINES 10-15 .. code-block:: Python import json import tttrlib import numpy as np import pylab as plt .. GENERATED FROM PYTHON SOURCE LINES 16-22 .. code-block:: Python filename_ptu = '../../tttr-data/pq/ptu/pq_ptu_hh_t3.ptu' tttr_ptu = tttrlib.TTTR(filename_ptu) # Note: SPC has limited header support. filename_spc_1 = "conv1.spc" tttr_ptu.write(filename_spc_1) .. rst-class:: sphx-glr-script-out .. code-block:: none True .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 2.317 seconds) .. _sphx_glr_download_auto_examples_tttr_plot_tttr_transcode.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_tttr_transcode.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_tttr_transcode.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_