shnitsel.vis.plot.filtration#

Attributes#

Functions#

check_thresholds(…)

Display graphs illustrating

validity_populations(ds_or_da[, intersections])

Display two plots showing

Module Contents#

shnitsel_blue#
shnitsel_yellow = '#C4A000'#
shnitsel_magenta = '#7E5273'#
text_color = '#fff'#
text_backgroundcolor = (0, 0, 0, 0.2)#
check_thresholds(ds_or_da: shnitsel.data.tree.node.TreeNode[Any, xarray.Dataset | xarray.DataArray | shnitsel.data.dataset_containers.shared.ShnitselDataset], quantiles: Sequence[float] | None = None) shnitsel.vis.support.multi_plot.MultiPlot#
check_thresholds(ds_or_da: xarray.Dataset | xarray.DataArray | shnitsel.data.dataset_containers.shared.ShnitselDataset, quantiles: Sequence[float] | None = None) matplotlib.axes.Axes
Display graphs illustrating
  1. how many trajectories meet each criterion throughout, and

  2. quantiles of cumulative maxima over time for each criterion, indicating at what times a given proportion has failed the criterion

Parameters:
  • ds_or_da (xr.Dataset | xr.DataArray | ShnitselDataset | TreeNode[Any, xr.Dataset | xr.DataArray | ShnitselDataset]) – Data to plot. Can be flat or hierarchical format.

  • quantiles (Sequence[float] | None, optional) – Quantiles to display and mark on the right-hand graph, by default None.

Return type:

The matplotlib Axes object of the plots

validity_populations(ds_or_da, intersections=True)#

Display two plots showing 1. how many trajectories meet criteria (or combinations thereof) up to a given time 2. how many frames would remain if the ensemble were transected at a given time (see shnitsel.clean.transect())

Parameters:
  • ds_or_da – Data to plot

  • intersections (bool) – whether to plot intersections of criteria (how many trajectories still meet criterion 1 AND criterion 2) or to consider criteria independently

  • optional – whether to plot intersections of criteria (how many trajectories still meet criterion 1 AND criterion 2) or to consider criteria independently

Return type:

The matplotlib Axes object of the plots