.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/extract_from_lnb_test.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note You can download :ref:`below ` the full example code. and run it online in `Codespaces `__ .. image:: https://github.com/codespaces/badge.svg :target: https://codespaces.new/spark-cleantech-l3/sda-copy?quickstart=1 --- .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_extract_from_lnb_test.py: Extract and plot data from an LNB test file. ============================================ This example shows how to extract oscilloscope channels from a ``.lnb`` file using :py:func:`sda.io.read_lnb.extract_all` and plot the result. .. GENERATED FROM PYTHON SOURCE LINES 9-27 .. code-block:: Python import matplotlib.pyplot as plt import pandas as pd from sda.io.read_lnb import extract_all from sda.misc.utils import getTestFile lnb_path = getTestFile("data/test_file_extract_all.lnb") C1_path = extract_all(str(lnb_path))["C1"] df = pd.read_csv(C1_path, skiprows=1, header=None, names=["time", "value"]) plt.plot(df["time"], df["value"], label="C1") plt.xlabel("Time [s]") # or seconds if you converted plt.ylabel("Voltage [V]") # or current for F-channels plt.title("Voltage measurement") plt.grid(True) plt.legend() plt.show() .. _sphx_glr_download_auto_examples_extract_from_lnb_test.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: extract_from_lnb_test.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: extract_from_lnb_test.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: extract_from_lnb_test.zip `