forked from jstklein/lrm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
image_one_beta.py
55 lines (41 loc) · 1.3 KB
/
image_one_beta.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
'''image_cells.py
Protocol for designed for long duration brightfield and beta imaging of living cells
The protocol loops numberCaptures times
During each loop it:
captures 1 brightfield image
captures 1 beta image of betaSecondsPerImage total duration time
rev 2
Justin Klein
Stanford University
Department of Radiation Oncology
2018
'''
from lrm import LRM
import time
import matplotlib.pyplot as plt
# File-related Settings
logFileName='logfile.txt'
baseDir = './data/'
experimentDir='test'
experimentDataPath = baseDir + experimentDir
bfFileName = 'beta'
# Capture settings
betaGain = 2.5
betaShutterS = 10
betaSecondsPerImage = 60*1
betaShutterUs = betaShutterS * 1000 * 1000
numImagesToSum = int(betaSecondsPerImage/betaShutterS)
# Initialize LRM class
LRM = LRM()
# Get exposure settings for brightfield images and lock them in
bfGain,bfShutter = LRM.get_brightfield_exposure()
# Override brightfield settings
bfShutter = 6000
bfGain = 1
threshold=3
print("Starting acquisition of one " + str(betaSecondsPerImage) + "s beta image")
# Capture brightfield
LRM.capture_brightfield(experimentDataPath, 'bf-0', 1, bfGain, bfShutter)
# Capture multiple beta images and integrate into one file
LRM.capture_beta(experimentDataPath, 'beta-0', numImagesToSum, betaGain, betaShutterUs, threshold)
LRM.preview_last(True)