forked from ecell/scopyon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pten_lscm_script.py
executable file
·80 lines (56 loc) · 2.44 KB
/
pten_lscm_script.py
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
import sys
import os
from pointscan_confm_handler import PointScanConfocalConfigs, PointScanConfocalVisualizer
from effects_handler import PhysicalEffects
def pten_confm(t0, t1) :
# create Point-scanning Confocal Microscopy
confm = PointScanConfocalConfigs()
confm.set_LightSource(source_type='LASER', wave_length=561, flux=100e-6, radius=200e-9)
confm.set_Fluorophore(fluorophore_type='Tetramethylrhodamine(TRITC)')
confm.set_Pinhole(radius=20.0e-6)
confm.set_Magnification(Mag=60)
# PMT : Anlalog mode
confm.set_Detector(detector='PMT', mode="Analog", image_size=(512,512), focal_point=(0.4,0.5,0.5),
pixel_length=414.3e-9, scan_time=5.00, gain=1e+6, dyn_stages=11, pair_pulses=18e-9)
confm.set_ADConverter(bit=12, offset=0, fullwell=4096)
confm.set_OutputData(image_file_dir='./images_pten')
# Input data : EGF model file
confm.set_InputData('./data/csv/pten', start=t0, end=t1, observable="PTEN")
# create physical effects
physics = PhysicalEffects()
physics.set_Conversion(ratio=1e-6)
#physics.set_Background(mean=20)
#physics.set_DetectorCrosstalk(width=1.00)
# create image and movie
create = PointScanConfocalVisualizer(configs=confm, effects=physics)
create.output_frames(num_div=16)
def pip3_confm(t0, t1) :
# create Point-scanning Confocal Microscopy
confm = PointScanConfocalConfigs()
confm.set_LightSource(source_type='LASER', wave_length=488, flux=100e-6, radius=200e-9)
confm.set_Fluorophore(fluorophore_type='EGFP')
confm.set_Pinhole(radius=20e-6)
confm.set_Magnification(Mag=60)
# PMT : Anlalog mode
confm.set_Detector(detector='PMT', mode="Analog", image_size=(512,512), focal_point=(0.4,0.5,0.5),
pixel_length=414.3e-9, scan_time=5.00, gain=1e+6, dyn_stages=11, pair_pulses=18e-9)
confm.set_ADConverter(bit=12, offset=0, fullwell=4096)
confm.set_OutputData(image_file_dir='./images_pip3')
# Input data : EGF model file
confm.set_InputData('./data/pten', start=t0, end=t1, observable="PIP3")
# create physical effects
physics = PhysicalEffects()
physics.set_Conversion(ratio=1e-6)
#physics.set_Background(mean=20)
#physics.set_DetectorCrosstalk(width=1.00)
# create image and movie
create = PointScanConfocalVisualizer(configs=confm, effects=physics)
create.output_frames(num_div=16)
if __name__ == "__main__":
index = sys.argv[1]
t0 = float(sys.argv[2])
t1 = float(sys.argv[3])
if (index == "PTEN") :
pten_confm(t0, t1)
elif (index == "PIP3") :
pip3_confm(t0, t1)