deepextractor.utils.visualization¶
Module Contents¶
- deepextractor.utils.visualization.save_predictions_as_plots(loader, model, folder='saved_predictions/', device='cuda')[source]¶
Save model prediction vs target plots for each sample in the loader.
- deepextractor.utils.visualization.plot_examples(Difference_ts, clean_glitch_subtract, snrs, signal_type, PLOTS_PATH, indices_to_plot, noisy=False)[source]¶
Plot up to 3 example time series and save to disk.
- deepextractor.utils.visualization.plot_q_transform(data, srate=4096.0, crop=None, whiten=True, ax=None, colourbar=True, qrange=[4, 64], frange=[10, 1200], clim=(0, 25.5))[source]¶
Plot the Q-transform of a time series using gwpy.
- Parameters:
data (array-like) – Input time-domain data.
srate (float) – Sample rate in Hz.
crop (tuple or list, optional) –
(center_time, duration)window in seconds for the Q-transform.whiten (bool) – If True, apply whitening before the Q-transform.
ax (matplotlib.axes.Axes, optional) – Axes on which to plot. A new figure is created if not provided.
colourbar (bool) – If True, add a colorbar to the plot.
qrange (list) – [q_min, q_max] range for the Q-transform.
frange (list) – [f_min, f_max] frequency range in Hz.
clim (tuple) – (vmin, vmax) colour axis limits for normalised energy.