headers

Plot headers from SDCard

class mio.plots.headers.StreamPlotter(header_keys: List[str], history_length: int = 100, update_ms: int = 1000)

Plot headers from StreamDaq.

Note

Eventually this should get generalized into a plotter object that can take an arbitrary set of keys and values, but for now is somewhat specific to StreamDaq , at least in the type hints.

close_plot() None

Close the plot and perform any necessary cleanup.

update(header: StreamBufferHeader) None

Update the plot with the latest data.

Parameters:

header – StreamBufferHeader to update with

mio.plots.headers.battery_voltage(headers: DataFrame, ax: plt.Axes) plt.Axes

Plot battery voltage against time

mio.plots.headers.buffer_count(headers: DataFrame, ax: plt.Axes) plt.Axes

Plot number of buffers by time

mio.plots.headers.dropped_buffers(headers: DataFrame, ax: plt.Axes) plt.Axes

Plot number of buffers by time

mio.plots.headers.plot_headers(headers: DataFrame, size: Tuple[int, int] | None = None)

Plot the headers (generated from Frame.to_df() )

Mimicking the plot in https://github.com/Aharoni-Lab/Miniscope-v4-Wire-Free/blob/2fd86cc85b810b2ecc6f71c8ee2dffdb838badcf/Miniscope-v4-Wire-Free-Python%20DAQ%20Interface/Load%20raw%20data%20from%20SD%20card%20and%20write%20video%20-%20WireFree%20V4%20Miniscope.ipynb For more generic plotting, see pandas.DataFrame.plot()

Parameters:
mio.plots.headers.timestamps(headers: DataFrame, ax: plt.Axes) plt.Axes

Plot frame number against time