—
Extract and plot data from an LNB test file.
This example shows how to extract oscilloscope channels from a .lnb file
using sda.io.read_lnb.extract_all() and plot the result.
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()