/usr/lib/python2.7/dist-packages/pycorrfit/models/MODEL_classic_gaussian_TT3D3D.py is in pycorrfit 0.9.5+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | # -*- coding: utf-8 -*-
"""
This file contains a T+T+3D+3D model for confocal FCS.
"""
from __future__ import division
import numpy as np
# 3D + 3D + Triplet Gauß
# Model 6043
def CF_Gxyz_gauss_3D3DTT(parms, tau):
u""" Two-component three-dimensional free diffusion
with a Gaussian laser profile, including two triplet components.
The triplet factor takes into account a blinking term.
Set *T* or *τ_trip* to 0, if no triplet component is wanted.
particle1 = F₁/( (1+τ/τ₁) * sqrt(1+τ/(τ₁*SP²)))
particle2 = α*(1-F₁)/( (1+τ/τ₂) * sqrt(1+τ/(τ₂*SP²)))
triplet1 = 1 + T₁/(1-T₁)*exp(-τ/τ_trip₁)
triplet2 = 1 + T₂/(1-T₂)*exp(-τ/τ_trip₂)
norm = (F₁ + α*(1-F₁))²
G = 1/n*(particle1 + particle2)*triplet1*triplet2/norm + offset
*parms* - a list of parameters.
Parameters (parms[i]):
[0] n Effective number of particles in confocal volume
(n = n₁+n₂)
[1] τ₁ Diffusion time of particle species 1
[2] τ₂ Diffusion time of particle species 2
[3] F₁ Fraction of molecules of species 1 (n₁ = n*F₁)
0 <= F₁ <= 1
[4] SP SP=z₀/r₀, Structural parameter,
describes elongation of the confocal volume
[5] α Relative molecular brightness of particle
2 compared to particle 1 (α = q₂/q₁)
[6] τ_trip₁ Characteristic residence time in triplet state
[7] T₁ Fraction of particles in triplet (non-fluorescent) state
0 <= T < 1
[8] τ_trip₂ Characteristic residence time in triplet state
[9] T₂ Fraction of particles in triplet (non-fluorescent) state
0 <= T < 1
[10] offset
*tau* - lag time
"""
n=parms[0]
taud1=parms[1]
taud2=parms[2]
F=parms[3]
SP=parms[4]
alpha=parms[5]
tautrip1=parms[6]
T1=parms[7]
tautrip2=parms[8]
T2=parms[9]
off=parms[10]
particle1 = F/( (1+tau/taud1) * np.sqrt(1+tau/(taud1*SP**2)))
particle2 = alpha**2*(1-F)/( (1+tau/taud2) * np.sqrt(1+tau/(taud2*SP**2)))
# If the fraction of dark molecules is zero.
if tautrip1 == 0 or T1 == 0:
triplet1 = 1
else:
triplet1 = 1 + T1/(1-T1) * np.exp(-tau/tautrip1)
if tautrip2 == 0 or T2 == 0:
triplet2 = 1
else:
triplet2 = 1 + T2/(1-T2) * np.exp(-tau/tautrip2)
# For alpha == 1, *norm* becomes one
norm = (F + alpha*(1-F))**2
G = 1/n*(particle1 + particle2)*triplet1*triplet2/norm + off
return G
def get_boundaries_3D3DTT(parms):
# strictly positive
boundaries = [[0, np.inf]]*len(parms)
# F
boundaries[3] = [0,.9999999999999]
# T
boundaries[7] = [0,.9999999999999]
boundaries[9] = [0,.9999999999999]
boundaries[-1] = [-np.inf, np.inf]
return boundaries
m_gauss_3d_3d_t_t_mix_6043 = [6043, "T+T+3D+3D",
u"Separate 3D diffusion + two triplet, Gauß",
CF_Gxyz_gauss_3D3DTT]
labels_6043 = [u"n",
u"τ"+u"\u2081"+" [ms]",
u"τ"+u"\u2082"+" [ms]",
u"F"+u"\u2081",
u"SP",
u"\u03b1"+" (q"+u"\u2082"+"/q"+u"\u2081"+")",
u"τ_trip₁ [ms]",
u"T₁",
u"τ_trip₂ [ms]",
u"T₂",
u"offset"
]
labels_human_readable_6043 = [
u"n",
u"τ₁ [ms]",
u"τ₂ [ms]",
u"F₁",
u"SP",
u"\u03b1"+u" (q₂/q₁)",
u"τ_trip₁ [µs]",
u"T₁",
u"τ_trip₂ [µs]",
u"T₂",
u"offset"
]
values_6043 = [
25, # n
5, # taud1
1000, # taud2
0.5, # F
5, # SP
1.0, # alpha
0.002, # tautrip1
0.01, # T1
0.001, # tautrip2
0.01, # T2
0.0 # offset
]
values_factor_human_readable_6043 = [
1., # n
1., # taud1
1., # taud2
1., # F
1., # SP
1., # alpha
1000., # tautrip1 [µs]
1., # T1
1000., # tautrip2 [µs]
1., # T2
1. # offset
]
valuestofit_6043 = [True, True, True, True, False, False, False, False, False, False, False]
parms_6043 = [labels_6043, values_6043, valuestofit_6043,
labels_human_readable_6043, values_factor_human_readable_6043]
def MoreInfo_6043(parms, countrate=None):
u"""Supplementary parameters:
[9] n₁ = n*F₁ Particle number of species 1
[10] n₂ = n*(1-F₁) Particle number of species 2
"""
# We can only give you the effective particle number
n = parms[0]
F1 = parms[3]
Info = list()
# The enumeration of these parameters is very important for
# plotting the normalized curve. Countrate must come out last!
Info.append([u"n\u2081", n*F1])
Info.append([u"n\u2082", n*(1.-F1)])
if countrate is not None:
# CPP
cpp = countrate/n
Info.append(["cpp [kHz]", cpp])
return Info
model = dict()
model["Parameters"] = parms_6043
model["Definitions"] = m_gauss_3d_3d_t_t_mix_6043
model["Supplements"] = MoreInfo_6043
model["Boundaries"] = get_boundaries_3D3DTT(values_6043)
model["Constraints"] = [[2, ">", 1], [6, "<", 1], [8, "<", 6]]
Modelarray = [model]
|