Plotting dynamic analysis

This module defines plotting functions for the statistics of the dynamics.

tunacell.plotting.dynamics.plot_onepoint(univariate, show_cdts='all', show_ci=False, mean_ref=None, var_ref=None, axe_xsize=6.0, axe_ysize=2.0, time_range=(None, None), time_fractional_pad=0.1, counts_range=(None, None), counts_fractional_pad=0.1, average_range=(None, None), average_fractional_pad=0.1, variance_range=(None, None), variance_fractional_pad=0.1, show_legend=True, show_cdt_details_in_legend=False, use_obs_name=None, save=False, user_path=None, ext='.png', verbose=False)

Plot one point statistics: counts, average, abd variance.

One point functions are plotted for each condition set up in show_cdts argument: ‘all’ for all conditions, or the string representation (or label) of a particuler condition (or a list thereof).

Parameters:
  • univariate (Univariate instance) –
  • show_cdts (str (default 'all')) – must be either ‘all’, or ‘master’, or the repr of a condition, or a list thereof
  • show_ci (bool {False, True}) – whether to show 99% confidence interval
  • mean_ref (float) – reference mean value: what user expect to see as sample average to compare with data
  • var_ref (float) – reference variance value: what user expect to see as sample variance to compare with data
  • axe_xsize (float (default 6)) – size of the x-axis (inches)
  • axe_ysize (float (default 2.)) – size if a single ax y-axis (inches)
  • time_range (couple of floats (default (None, None))) – specifies (left, right) bounds
  • time_fractional_pad (float (default .1)) – fraction of x-range to add as padding
  • counts_range (couple of floats (default (None, None))) – specifies range for the Counts y-axis
  • counts_fractional_pad (float (default .2)) – fractional amount of y-range to add as padding
  • average_range (couple of floats (default (None, None))) – sepcifies range for the Average y-axis
  • average_fractional_pad (couple of floats (default .2)) – fractional amounts of range to padding
  • variance_range (couple of floats (default (None, None))) – sepcifies range for the Variance y-axis
  • average_fractional_pad – fractional amounts of range to padding
  • show_legend (bool {True, False}) – print out legend
  • show_cdt_details_in_legend (bool {False, True}) – show details about filters
  • use_obs_name (str (default None)) – when filled, the plot title will use this observable name instead of looking for the observable registered name
  • save (bool {False, True}) – whether to save plot
  • user_path (str (default None)) – user defined path where to save figure; default is canonical path (encouraged)
  • ext (str {'.png', '.pdf'}) – extension to be used when saving file
  • verbose (bool {False, True}) –
tunacell.plotting.dynamics.plot_stationary(stationary, show_cdts='all', axe_xsize=6.0, axe_ysize=2.0, time_range=(None, None), time_fractional_pad=0.1, time_guides=[0.0], counts_range=(None, None), counts_fractional_pad=0.1, corr_range=(None, None), counts_logscale=False, corr_fractional_pad=0.1, corr_logscale=False, corr_guides=[0.0], show_exp_decay=None, show_legend=True, show_cdt_details_in_legend=False, use_obs_name=None, save=False, ext='.png', verbose=False)

Plot stationary autocorrelation.

Parameters:
  • stationary (StationaryUnivariate or StationaryBivariate instance) –
  • axe_xsize (float (default 6)) – size (in inches) of the x-axis
  • axe_ysize (float (default 2)) – size (in inches) of the individual y-axis
  • time_range (couple of floats) – bounds for time (x-axis)
  • time_fractional_pad (float) – fractional padding for x-axis
  • counts_range (couple of ints) – bounds for counts axis
  • counts_fractional_pad (float) – fractional padding for counts axis
  • corr_range (couple of floats) – bounds for correlation values
  • counts_logscale (bool {False, True}) – use logscale for counts axis
  • corr_fractional_pad (float) – fractional padding for correlation values
  • corr_logscale (bool {False, True}) – use logscale for correlation values (symlog is used to display symmetrically negative values)
  • corr_guides (list of float) – values where to plot shaded grey horizontal lines
  • show_exp_decay (float (default None)) – whether to plot an exponential decay with corresponding rate exp(-rate * t)
  • save (bool {False, True}) – whether to save plot at canonical path
  • use_obs_name (str (default None)) – when filled, the plot title will use this observable name instead of looking for the observable registered name
  • ext (str {'.png', '.pdf'}) – extension used for file
Returns:

fig

Return type:

Figure instance

tunacell.plotting.dynamics.plot_twopoints(univariate, condition_label=None, trefs=[], ntrefs=4, axe_xsize=6.0, axe_ysize=2.0, time_range=(None, None), time_fractional_pad=0.1, counts_range=(None, None), counts_fractional_pad=0.1, corr_range=(None, None), corr_fractional_pad=0.1, delta_t_max=None, show_exp_decay=None, show_legend=True, show_cdt_details_in_legend=False, use_obs_name=None, save=False, ext='.png', verbose=False)

Plot two-point functions: counts and autocorrelation functions.

These plots are able to show only one extra condition with ‘master’, and are plotted for a set of time of references.

Parameters:
  • univariate (Univariate instance) –
  • condition_label (str (default None)) – must be the repr of a given FilterSet
  • trefs (flist of floats) – indicate the times that you would like to have as references if left empty, reference times will be computed automatically
  • ntrefs (int) – if trefs is empty, number of times of reference to display
  • axe_xsize (float (default 6)) – size of the x-axis (inches)
  • axe_ysize (float (default 2.)) – size if a single ax y-axis (inches)
  • time_range (couple of floats (default (None, None))) – specifies (left, right) bounds
  • time_fractional_pad (float (default .1)) – fraction of x-range to add as padding
  • counts_range (couple of floats (default (None, None))) – specifies range for the Counts y-axis
  • counts_fractional_pad (float (default .2)) – fractional amount of y-range to add as padding
  • corr_range (couple of floats (default (None, None))) – sepcifies range for the Average y-axis
  • corr_fractional_pad (couple of floats (default .2)) – fractional amounts of range to padding
  • delta_t_max (float (default None)) – when given, bottom plot will be using this max range symmetrically; otherwise, will use the largest intervals found in data (often too large to see something)
  • show_exp_decay (float (default None)) –
    when a floating point number is passed, a light exponential decay
    curve is plotted for each tref
    show_legend : bool {True, False}
    print out legend
  • show_cdt_details_in_legend (bool {False, True}) – show details about filters
  • use_obs_name (str (default None)) – when filled, the plot title will use this observable name instead of looking for the observable registered name
  • save (bool {False, True}) – whether to save figure at canonical path
  • ext (str {'.png', '.pdf'}) – extension to be used when saving figure
  • verbose (bool {False, True}) –