Calculating responses to concentration jumps

Library of routines for calculating responses to concentration jumps.

rcj.coefficient_calc(k, A, p_occup)

Calculate weighted components for relaxation for each state p * An.

Parameters :

k : int

Number of states in mechanism.

A : array-like, shape (k, k, k)

Spectral matrices of Q matrix.

p_occup : array-like, shape (k, 1)

Occupancies of mechanism states.

Returns :

w : ndarray, shape (k, k)

rcj.compose_rcj_out(cjump, relax, kA, offset=1.2, output_option=2)

Write output to text file as lines of t,j,p0,p1,p2....pn,pOpen with option to omit arguments.

Parameters :

cjump : dictionary

Time sample point (microsec)- concentration (Molar) pairs.

relax : dictionary

Time sample point (microsec)- P pairs. P is numpy array (k, 1) which elements are state occupancies.

kA : int

Number of open states in mechanism.

offset : float

Offset the jump from the response.

output_option : int

2 : give occupancies and Popen; 1 : Popen only; 0 : occupancies only.

Returns :

lines : a list of strings

rcj.convert_to_arrays(cjump, relax, kA)

Convert concentration profile and relaxation dictionaries into arrays.

Parameters :

cjump : dictionary

Time sample point (microsec)- concentration (Molar) pairs.

relax : dictionary

Time sample point (microsec)- P pairs. P is numpy array (k, 1) which elements are state occupancies.

kA : int

Number of open states in mechanism.

Returns :

t : ndarray, shape(dict length, 1)

Time points in microsec.

cj : ndarray, shape(dict length, 1)

Concentration profile in Molar.

rl : ndarray, shape(dict length, 1)

Open probaility relaxation.

rcj.erf(x)

Accurate, fast approximation of the error function from http://www.johndcook.com/blog/2009/01/19/stand-alone-error-function-erf/

Parameters :x : float
Returns :float :
rcj.erf_pulse(pulse_width, pulse_conc, rise_t, pulse_centre, t_step)

Construct a “top-hat” pulse with rise and fall from error function.

Parameters :

pulse_width : int

Approximate FWHM in microseconds.

pulse_conc : float

Ligand concentration during jump in Molar.

rise_t : float

Desired 10 - 90% rise time (can use 0. for square pulse).

centre : int

Position of pulse in simulation trace.

time_step : int

Sampling interval in microseconds.

Returns :

z : dictionary (key- float, value- float)

Dictionary keys- time points in microseconds. Dictionary values- concentration in moles.

rcj.make_family()

testing - make a family of pulses to examine properties alternate main() no arguments returns nothing

rcj.make_jump(pa)

Generate a dictionary containing concentration jump profile.

Parameters :

pa : dictionary

Parameters describing concentration pulse.

Returns :

cjump : dictionary

Time sample point (microsec)- concentration (Molar) pairs.

rcj.printout(mec, jpar, output=<open file '<stdout>', mode 'w' at 0x2b971dd501e0>, eff='c')
rcj.rcj_calc(cjump, mec, paras, eff='c')
Parameters :

cjump : dictionary

Time sample point (microsec)- concentration (Molar) pairs.

mec : dcpyps.Mechanism

The mechanism to be analysed.

paras : dictionary

Parameters describing concentration pulse.

Returns :

relax : dictionary

Time sample point (microsec)- P pairs. P is numpy array (k, 1) which elements are state occupancies.

rcj.rcj_single(mec, parameters)

Calculate a single concentration jump and a single relaxation.

Parameters :

mec : dcpyps.Mechanism

The mechanism to be analysed.

parameters : dictionary

Dictioanry contains parameters describing the concentration jump.

Returns :

cjump : dictionary

Contains time sample point (microsec) - concentration (M) pairs.

relax : dictionary

Previous topic

Q-Matrix library

Next topic

Single-channel calculations

This Page