Animate the measured signals

Showcase how we can produce animations from measured signals.

Load data

[1]:
from IPython.display import HTML
import matplotlib.pyplot as plt

from multipac_testbench import MultipactorTest
from multipac_testbench.data import config_path
from multipac_testbench.data.multipactor_tests import test_140MHz_SWR4_11
from multipac_testbench.instruments import CurrentProbe, FieldProbe

multipactor_test =  MultipactorTest(test_140MHz_SWR4_11, config_path, freq_mhz=140.0, swr=4.0, is_raw=True)
ERROR:root:column_header = 'NI9205_E1' not present in provided file. Skipping associated instrument.

Produce animation plot

[2]:
to_plot = (CurrentProbe, FieldProbe)
fps = 50
ani = multipactor_test.animate_instruments_vs_position(
    to_plot,
    fps=fps,
    keep_one_frame_over=10,
)
plt.close()

Trick to let the gif appear in the notebook (online documentation).

[3]:
HTML(ani.to_jshtml(fps=fps))
[3]: