Analysis of the dynamics¶
This module sets up api functions for dynamical correlation analysis.

tunacell.stats.api.
compute_bivariate
(row_univariate, col_univariate, size=None)¶ Computes crosscorrelation between observables defiend in univs.
This functions handles conditions and timewindow binning:
 all conditions provided in cset are applied independently, in addition to the computation with unconditioned data (labelled ‘master’)
 A timebinning window is provided with a given offset and a period. Explicitely a given time value t found in data will be rounded up to closest offset_t + k * delta_t, where k is an integer.
Parameters:  univs (couple of Univariate instances) –
 size (int (default None)) – limit the iterator to size Lineage instances (used for testing)
Returns: Return type: TwoObservable instance

tunacell.stats.api.
compute_stationary
(univ, region, options, size=None)¶ Computes stationary autocorrelation. API level.
Parameters:  univ (
Univariate
instance) – the stationary autocorr is based on this object  region (
Region
instance) –  options (
CompuParams
instance) – set the ‘adjust_mean’ and ‘disjoint’ options  size (int (default None)) – limit number of parsed Lineages
 univ (

tunacell.stats.api.
compute_stationary_bivariate
(row_univariate, col_univariate, region, options, size=None)¶ Computes stationary crosscorrelation function from couple of univs
Need to compute stationary univariates as well.

tunacell.stats.api.
compute_univariate
(exp, obs, region='ALL', cset=[], times=None, size=None)¶ Computes onepoint and twopoint functions of statistical analysis.
This functions handles conditions and timewindow binning:
 all conditions provided in cset are applied independently, in addition to the computation with unconditioned data (labelled ‘master’)
 A timebinning window is provided with a given offset and a period. Explicitely a given time value t found in data will be rounded up to closest offset_t + k * delta_t, where k is an integer.
Parameters:  exp (
Experiment
instance) –  obs (
Observable
instance) –  region (
Region
instance or str (default ‘ALL’)) – in case of str, must be the name of a registered region  cset (list of
FilterSet
instances) –  times (1d ndarray, or str (default None)) – array of times at which process is evaluated. Default is to use the ‘ALL’ region with the period taken from experiment metadata. User can opt for a specific time array, or for the label of a region as a string
 size (int (default None)) – limit the iterator to size Lineage instances (used for testing)
Returns: Return type: Univariate instance

tunacell.stats.api.
load_bivariate
(row_univariate, col_univariate)¶ Initialize a StationaryBivariate instance from its dynamical one.
Parameters:  row_univariate (
Univariate
instance) –  col_univariate (
Univariate
instance) –
Returns: set up with empty arrays
Return type: Bivariate
instance row_univariate (

tunacell.stats.api.
load_stationary
(univ, region, options)¶ Initialize a StationaryUnivariate instance from its dynamical one.
Parameters:  univ (
Univariate
instance) –  region (
Region
instance) –  options (
CompuParams
instance) –
Returns: set up with empty arrays
Return type: StationaryInstance
instance univ (

tunacell.stats.api.
load_stationary_bivariate
(row_univariate, col_univariate, region, options)¶ Initialize a StationaryBivariate instance from its dynamical one.
Parameters:  row_univariate (
Univariate
instance) –  col_univariate (
Univariate
instance) –  region (
Region
instance) –  options (
CompuParams
instance) –
Returns: set up with empty arrays
Return type: StationaryBivariate
instance row_univariate (

tunacell.stats.api.
load_univariate
(exp, obs, region='ALL', cset=[])¶ Initialize an empty Univariate instance.
Such a Univariate instance is bound to an experiment (through exp), an observable, and a set of conditions.
Parameters:  exp (
Experiment
instance) –  obs (
Observable
instance) –  region (
Region
instance or str (default ‘ALL’)) – in case of str, must be the name of a registered region  cset (sequence of
FilterSet
instances) –
Returns: initialized, nothing computed yet
Return type: Univariate
instanceRaises: UnivariateIOError
– when importing fails (no data corresponds to input params) exp (