forked from ecell/scopyon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmr_tirfm_script.py
executable file
·60 lines (44 loc) · 1.84 KB
/
tmr_tirfm_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
import sys
import os
import numpy
from tirfm_handler import TIRFMConfigs, TIRFMVisualizer
from effects_handler import PhysicalEffects
def test_tirfm(t0, t1) :
# create TIRF Microscopy
tirfm = TIRFMConfigs()
tirfm.set_LightSource(source_type='LASER', wave_length=532, flux_density=50, angle=65.7)
tirfm.set_Fluorophore(fluorophore_type='Tetramethylrhodamine(TRITC)')
#tirfm.set_Fluorophore(fluorophore_type='EGFP')
#tirfm.set_Fluorophore(fluorophore_type='Gaussian', wave_length=532, intensity=0.55, width=(200,400))
tirfm.set_DichroicMirror('FF562-Di03-25x36')
tirfm.set_EmissionFilter('FF01-593_40-25')
#tirfm.set_Magnification(Mag=250)
#tirfm.set_Magnification(Mag=100)
tirfm.set_Magnification(Mag=198)
#tirfm.set_Magnification(Mag=80)
# # Detector : CMOS Camera
# tirfm.set_Detector(detector='CMOS', image_size=(600,600), pixel_length=6.5e-6, \
# focal_point=(0.0,0.5,0.5), exposure_time=30e-3, QE=0.73)
# tirfm.set_ADConverter(bit=16, offset=100, fullwell=30000)
# Detector : EMCCD Camera
tirfm.set_Detector(detector='EMCCD', image_size=(512,512), pixel_length=16e-6, \
focal_point=(0.0,0.5,0.5), exposure_time=30e-3, QE=0.92, readout_noise=100, emgain=300)
tirfm.set_ADConverter(bit=16, offset=2000, fullwell=370000)
### Output data
tirfm.set_OutputData(image_file_dir='./images_tmr_tirfm')
### Input data
tirfm.set_InputData('./data/tmr_tirfm', start=t0, end=t1, observable="A")
# create physical effects
physics = PhysicalEffects()
physics.set_Conversion(ratio=1e-6)
#physics.set_DetectorCrosstalk(width=0.1)
physics.set_Background(mean=2.0)
# create image and movie
create = TIRFMVisualizer(configs=tirfm, effects=physics)
create.output_frames(num_div=16)
if __name__ == "__main__":
t0 = float(sys.argv[1])
t1 = float(sys.argv[2])
#index = int(sys.argv[3])
test_tirfm(t0, t1)
#test_tirfm(t0, t1, index)