Processing math: 100%

DCProgs 0.9 documentation

MissedEventsG

«  Log10Likelihood   ::   Contents   ::   IdealG  »

MissedEventsG

class dcprogs.likelihood.MissedEventsG(*args, **kwargs)

Computes missed-events likelihood.

Exact calculations take place for times smaller than nmaxτ. Asymptotic calculations take over for larger times.

__init__(*args, **kwargs)

Initializes the missed-events likelihood.

Exact calculations take place for times smaller than nmax * tau. Asymptotic calculations take over for larger times.

There are three possible ways to instantiate this object:

>>> MissedEvents(determinant_af, roots_af, determinant_fa, roots_fa[, nmax=2])
>>> MissedEvents(matrix, nopen, tau, **kwargs)
>>> MissedEvents(qmatrix, tau, **kwargs)

The parameters between brackets are optional. The last two versions will try and calculate the roots of the determinant equations automatically. A number of parameters can be given to control this process.

Parameters:
  • determinant_af – A DeterminantEq instance, specifically for the af block.
  • roots_af – The roots of the af determinant equation. The should come in the format [(root, multiplicity), (root, multiplicity), ...].
  • determinant_fa – A DeterminantEq instance, specifically for the fa block. It should the transpose of determinant_af. It is required so it need not be recomputed, since it most likely already exists.
  • roots_fa – The roots of the fa determinant equation. The should come in the format [(root, multiplicity), (root, multiplicity), ...].
  • matrix – An object convertible to a square matrix.
  • nopen (integer) – Number of open states.
  • qmatrix – A QMatrix instance.
  • nmax (int) – The exact missed event likelihood will be computed for times t[0,nmaxau. Defaults to 3.
  • xtol (float) – Tolerance criteria when computing roots using brentq(). Defaults to 1e-12.
  • rtol (float) – Tolerance criteria when computing roots using brentq(). Defaults to 1e-12.
  • itermax (float) – Maximum number of iterations when computing roots using brentq(). Defaults to 100.
  • lower_bound (float) – Lower bound for all roots. Defaults to None, in which the case the lower bound is computed from find_lower_bound_for_roots().
  • upper_bound (float) – Upper bound for all roots. Defaults to None, in which the case the upper bound is computed from find_upper_bound_for_roots().
__weakref__

list of weak references to the object (if defined)

af(self, t) → DCProgs::t_rmatrix

Likelihood of an observed open time of length t

Parameters:t – A scalar or something to a numpy array. In the latter case, the return is an array of matrices.
af_factor

Factor accounting for minimum shut time

It is the likelihood QAFeQFFτ of a shut time of length τ.

fa(self, t) → DCProgs::t_rmatrix

Likelihood of a shut time of length t

Parameters:t – A scalar or something to a numpy array. In the latter case, the return is an array of matrices.
fa_factor

Factor accounting for minimum open time

It is the likelihood QFAeQAAτ of an open time of length τ.

final_CHS_occupancies(*args)

Computes final CHS occupancies.

final_occupancies

Equilibrium occupancies for final states.

Computes the right eigenvector of eGFAeGAF, where eGFA is the laplacian for s=0 of the likelihood.

initial_CHS_occupancies(*args)

Computes initial CHS occupancies.

initial_occupancies

Equilibrium occupancies for initial states.

Computes the left eigenvector of eGAFeGFA, where eGAF is the laplacian for s=0 of the likelihood.

laplace_af(self, s) → DCProgs::t_rmatrix

Exact missed-events G in Laplace space.

The exact expression is eGAF(s)=AR(s)esτQAFeQFFτ, with AR(s)=[sIQAAQAFτ0esteQFFttQFA]1.

Parameters:s – The laplace scale. A real scalar or something convertible to a numpy array.
Returns:A matrix if the input is scalar, an array of matrices otherwise, with the shape of the input.
laplace_fa(self, s) → DCProgs::t_rmatrix

Exact missed-events G in Laplace space.

The exact expression is eGFA(s)=FR(s)esτQFAeQAAτ, with FR(s)=[sIQFFQFAτ0esteQAAttQAF]1.

Parameters:s – The laplace scale. A real scalar or something convertible to a numpy array.
Returns:A matrix if the input is scalar, an array of matrices otherwise, with the shape of the input.
nmax

Cut-off time of exact calculations in units of tau.

nopen

Number of open-states.

nshut

Number of shut-states.

tau

Resolution or maximum length of the missed events.

tmax

Cut-off time of exact calculations tmax=(nmax1)tau.

For practical reasons, the minimum observation time has alreadybeen removed here.

«  Log10Likelihood   ::   Contents   ::   IdealG  »