src.visualise.jitter_measurement_graphs
Code for generating plots from recordings of network latency and jitter
Functions
Generates all plots in this file, with required arguments and inputs |
Classes
|
Measures inter-beat latency for recordings in Librosa |
|
Creates lineplots (with marginal histrograms) for multiple recordings |
- class src.visualise.jitter_measurement_graphs.JitterMeasurementAnalysis(directory: str, **kwargs)
Bases:
object
Measures inter-beat latency for recordings in Librosa
- _extract_iois(onset_times: ndarray) array
Extracts inter-onset intervals between real and delayed metronome clicks
- _extract_onsets(y: ndarray) array
Extracts onsets from audio file in Librosa
- _get_files() list[str]
Returns strings of valid filepaths
- static _get_minimum(list_of_arrays: list[numpy.array]) float
Gets the minimum shape of multiple input arrays, used when subsetting
- _load_audio() list[numpy.array]
Loads audio into librosa
- _match_latency_onset_and_ioi() list[pandas.core.frame.DataFrame]
Matches each inter-onset interval together with the initial onset time
- class src.visualise.jitter_measurement_graphs.LinePlotJitterMeasurement(arrays, **kwargs)
Bases:
BasePlot
Creates lineplots (with marginal histrograms) for multiple recordings
- _create_plot() None
Creates the line plot and histogram for each array
- _format_array(arrs: list[numpy.array]) Generator
Formats array returned from each recording
- _format_ax() None
Formats all axis
- _format_fig() None
Formats figure-level attributes
- _format_main_ax() None
Formats the main line plots
- _format_marginal_ax() None
Formats the marginal histograms
- create_plot() tuple[matplotlib.figure.Figure, str]
Called from outside the class and generates the plot, then saves in decorator
- src.visualise.jitter_measurement_graphs.generate_latency_measurement_plots(input_dir: str, output_dir: str, **kwargs) None
Generates all plots in this file, with required arguments and inputs