m3resp.visualization.plot_synchronization_comparison#
- m3resp.visualization.plot_synchronization_comparison(session, *, max_seconds=120.0, emg_channel=None, eit_waveform='global_impedance_(raw)', backend='matplotlib', max_points=5000)[source]#
Plot each signal before and after synchronization.
Each row shows one signal: on its own clock at the left, and on the shared clock at the right. The lines mark the breaths of each modality.
- Parameters:
session (M3Session) – The session after
synchronize_raw_modalitiesor aftersynchronize_multimodal_breaths.max_seconds (float | None) – Show the first
max_secondsseconds of each signal.Noneshows the full signal.emg_channel (int | None) – The EMG channel to show. It must be the channel that the EMG processing used.
Noneshows that channel.eit_waveform (str) – The name of the EIT signal to show.
backend (str) –
"matplotlib"gives a static figure."plotly"gives an interactive figure for a web page or a notebook.max_points (int | None) – For
backend="plotly"only. The largest number of points drawn for one signal. Seeplot_session_overview().
- Returns:
The figure.
- Return type:
- Raises:
ValueError – If
backendis unknown, or if the session has no synchronization data or no signal to plot.ImportError – If the plot library of
backendis not installed.