Single-channel calculations

A collection of functions for dwell time ideal, asymptotic and exact probabulity density function calculations.

Notes

DC_PyPs project are pure Python implementations of Q-Matrix formalisms for ion channel research. To learn more about kinetic analysis of ion channels see the references below.

References

CH82: Colquhoun D, Hawkes AG (1982) On the stochastic properties of bursts of single ion channel openings and of clusters of bursts. Phil Trans R Soc Lond B 300, 1-59.

HJC92: Hawkes AG, Jalali A, Colquhoun D (1992) Asymptotic distributions of apparent open times and shut times in a single channel record allowing for the omission of brief events. Phil Trans R Soc Lond B 337, 383-404.

CH95a: Colquhoun D, Hawkes AG (1995a) The principles of the stochastic interpretation of ion channel mechanisms. In: Single-channel recording. 2nd ed. (Eds: Sakmann B, Neher E) Plenum Press, New York, pp. 397-482.

CH95b: Colquhoun D, Hawkes AG (1995b) A Q-Matrix Cookbook. In: Single-channel recording. 2nd ed. (Eds: Sakmann B, Neher E) Plenum Press, New York, pp. 589-633.

scalcslib.asymptotic_areas(tres, roots, QAA, QFF, QAF, QFA, kA, kF, GAF, GFA)

Find the areas of the asymptotic pdf (Eq. 58, HJC92).

Parameters :

tres : float

Time resolution (dead time).

roots : array_like, shape (1,kA)

Roots of the asymptotic pdf.

QAA : array_like, shape (kA, kA)

QFF : array_like, shape (kF, kF)

QAF : array_like, shape (kA, kF)

QFA : array_like, shape (kF, kA)

QAA, QFF, QAF, QFA - submatrices of Q.

kA : int

A number of open states in kinetic scheme.

kF : int

A number of shut states in kinetic scheme.

GAF : array_like, shape (kA, kB)

GFA : array_like, shape (kB, kA)

GAF, GFA- transition probabilities

Returns :

areas : ndarray, shape (1, kA)

scalcslib.asymptotic_roots(tres, QAA, QFF, QAF, QFA, kA, kF)

Find roots for the asymptotic probability density function (Eqs. 52-58, HJC92).

Parameters :

tres : float

Time resolution (dead time).

QAA : array_like, shape (kA, kA)

QFF : array_like, shape (kF, kF)

QAF : array_like, shape (kA, kF)

QFA : array_like, shape (kF, kA)

QAA, QFF, QAF, QFA - submatrices of Q.

kA : int

A number of open states in kinetic scheme.

kF : int

A number of shut states in kinetic scheme.

Returns :

roots : array_like, shape (1, kA)

scalcslib.exact_GAMAxx(mec, tres, open)

Calculate gama coeficients for the exact open time pdf (Eq. 3.22, HJC90).

Parameters :

tres : float

mec : dcpyps.Mechanism

The mechanism to be analysed.

open : bool

True for open time pdf and False for shut time pdf.

Returns :

eigen : array_like, shape (k,)

Eigenvalues of -Q matrix.

gama00, gama10, gama11 : lists of floats

Constants for the exact open/shut time pdf.

scalcslib.exact_mean_time(tres, QAA, QFF, QAF, kA, kF, GAF, GFA)

Calculate exact mean open or shut time from HJC probability density function.

Parameters :

tres : float

Time resolution (dead time).

QAA : array_like, shape (kA, kA)

QFF : array_like, shape (kF, kF)

QAF : array_like, shape (kA, kF)

QAA, QFF, QAF - submatrices of Q.

kA : int

A number of open states in kinetic scheme.

kF : int

A number of shut states in kinetic scheme.

GAF : array_like, shape (kA, kB)

GFA : array_like, shape (kB, kA)

GAF, GFA- transition probabilities

Returns :

mean : float

Apparent mean open/shut time.

scalcslib.exact_pdf(t, tres, roots, areas, eigvals, gamma00, gamma10, gamma11)

Calculate exponential probabolity density function with exact solution for missed events correction (Eq. 21, HJC92).

\begin{align*}
f(t) =
\begin{cases}
f_0(t)                          & \text{for}\; 0 \leq t \leq t_\text{res} \\
f_0(t) - f_1(t - t_\text{res})  & \text{for}\; t_\text{res} \leq t \leq 2 t_\text{res}
\end{cases}
\end{align*}

Parameters :

t : float

Time.

tres : float

Time resolution (dead time).

roots : array_like, shape (k,)

areas : array_like, shape (k,)

eigvals : array_like, shape (k,)

Eigenvalues of -Q matrix.

gama00, gama10, gama11 : lists of floats

Coeficients for the exact open/shut time pdf.

Returns :

f : float

scalcslib.ideal_dwell_time_pdf(t, QAA, phiA)

Probability density function of the open time. f(t) = phiOp * exp(-QAA * t) * (-QAA) * uA For shut time pdf A by F in function call.

Parameters :

t : float

Time (sec).

QAA : array_like, shape (kA, kA)

Submatrix of Q.

phiA : array_like, shape (1, kA)

Initial vector for openings

Returns :

f : float

scalcslib.ideal_dwell_time_pdf_components(QAA, phiA)

Calculate time constants and areas for an ideal (no missed events) exponential open time probability density function. For shut time pdf A by F in function call.

Parameters :

t : float

Time (sec).

QAA : array_like, shape (kA, kA)

Submatrix of Q.

phiA : array_like, shape (1, kA)

Initial vector for openings

Returns :

taus : ndarray, shape(k, 1)

Time constants.

areas : ndarray, shape(k, 1)

Component relative areas.

scalcslib.ideal_mean_latency_given_start_state(mec, state)

Calculate mean latency to next opening (shutting), given starting in specified shut (open) state.

mean latency given starting state = pF(0) * inv(-QFF) * uF

F- all shut states (change to A for mean latency to next shutting calculation), p(0) = [0 0 0 ..1.. 0] - a row vector with 1 for state in question and 0 for all other states.

Parameters :

mec : instance of type Mechanism

state : int

State number (counting origin 1)

Returns :

mean : float

Mean latency.

scalcslib.ideal_subset_mean_life_time(Q, state1, state2)

Calculate mean life time in a specified subset. Add all rates out of subset to get total rate out. Skip rates within subset.

Parameters :

mec : instance of type Mechanism

state1,state2 : int

State numbers (counting origin 1)

Returns :

mean : float

Mean life time.

scalcslib.ideal_subset_time_pdf(Q, k1, k2, t)
scalcslib.printout_distributions(mec, tres, output=<open file '<stdout>', mode 'w' at 0x2b971dd501e0>, eff='c')
scalcslib.printout_occupancies(mec, output=<open file '<stdout>', mode 'w' at 0x2b971dd501e0>)

Table Of Contents

Previous topic

Calculating responses to concentration jumps

Next topic

Single channel burst calculations

This Page