pypam.plots.plot_summary_dataset

pypam.plots.plot_summary_dataset(ds, percentiles, data_var='band_density', time_coord='datetime', freq_coord='frequency', min_val=None, max_val=None, show=True, log=True, save_path=None, location=None)[source]

Plots a summary of the data combining the LTSA and a SPD. If location is given, it also plots an extra colorbar showing the day/night patterns

Parameters:
ds: xarray Dataset

dataset output of pypam

data_var: string

name of the data variable to plot as a spectrogram. default band_density.

time_coord: string

name of the coordinate which represents time (has to be type np.datetime64)

freq_coord: string

name of the coordinate which represents frequency.

percentiles: list or numpy array

percentiles to compute and plot (1 to 100).

min_val: float

minimum value (SPL) in db to compute the SPD. If None, minimum of the dataset will be used

max_val: float

maximum value (SPL) in db to compute the SPD. If None, maximum of the dataset will be used

show: bool.

Set to True to show the plot

log: bool

Set to True to set the frequencies axis in a log scale

save_path: None, string or Path.

Where to save the plot. If None, the plot is not saved.

location: tuple or list

[latitude, longitude] in decimal coordinates. If location is passed, a bar with the sun position is going to be added below the time axis