Skip to content

Commit 16cb436

Browse files
Merge pull request #294 from TheDeanLab/initial_stage_position
Initial stage position
2 parents e8e25f6 + f6809b6 commit 16cb436

12 files changed

+396
-358
lines changed

src/aslm/config/configuration.yaml

-38
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,7 @@ microscopes:
132132
type: PI
133133
serial_number: 119060508
134134
axes: [x, y, z, theta, f]
135-
y_unload_position: 10000
136-
y_load_position: 90000
137135

138-
startfocus: 75000
139136
x_max: 33500
140137
x_min: 16000
141138
y_max: 100000
@@ -147,29 +144,13 @@ microscopes:
147144
theta_max: 360
148145
theta_min: 0
149146

150-
x_rot_position: 2000
151-
y_rot_position: 2000
152-
z_rot_position: 2000
153-
154147
x_step: 500
155148
y_step: 500
156149
z_step: 500
157150
theta_step: 30
158151
f_step: 500
159-
160-
position:
161-
x_pos: 25250
162-
y_pos: 40000
163-
z_pos: 40000
164-
f_pos: 70000
165-
theta_pos: 0
166152
velocity: 1000
167153

168-
x_offset: 0
169-
y_offset: 0
170-
z_offset: 0
171-
f_offset: 0
172-
theta_offset: 0
173154
zoom:
174155
hardware:
175156
name: zoom
@@ -360,10 +341,7 @@ microscopes:
360341
type: Thorlabs
361342
serial_number: 74000375
362343
axes: [f]
363-
y_unload_position: 10000
364-
y_load_position: 90000
365344

366-
startfocus: 75000
367345
x_max: 33500
368346
x_min: 16000
369347
y_max: 100000
@@ -375,29 +353,13 @@ microscopes:
375353
theta_max: 360
376354
theta_min: 0
377355

378-
x_rot_position: 2000
379-
y_rot_position: 2000
380-
z_rot_position: 2000
381-
382356
x_step: 500
383357
y_step: 500
384358
z_step: 500
385359
theta_step: 30
386360
f_step: 500
387-
388-
position:
389-
x_pos: 25250
390-
y_pos: 40000
391-
z_pos: 40000
392-
f_pos: 0
393-
theta_pos: 0
394361
velocity: 1000
395362

396-
x_offset: 1500
397-
y_offset: 1720
398-
z_offset: -14311
399-
f_offset: 0
400-
theta_offset: 0
401363
zoom:
402364
position:
403365
N/A: 0

src/aslm/model/device_startup_functions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def load_camera_connection(configuration,
129129
# Locally Import Hamamatsu API and Initialize Camera Controller
130130
HamamatsuController = importlib.import_module('aslm.model.devices.APIs.hamamatsu.HamamatsuAPI')
131131
return auto_redial(HamamatsuController.DCAM, (camera_id,), exception=Exception)
132-
elif cam_type.lower() == 'syntheticcamera' or device_type.lower() == 'synthetic':
132+
elif cam_type.lower() == 'syntheticcamera' or cam_type.lower() == 'synthetic':
133133
from aslm.model.devices.camera.camera_synthetic import SyntheticCameraController
134134
return SyntheticCameraController()
135135
else:
@@ -169,7 +169,7 @@ def start_camera(microscope_name,
169169
if cam_type == 'HamamatsuOrca':
170170
from aslm.model.devices.camera.camera_hamamatsu import HamamatsuOrca
171171
return HamamatsuOrca(microscope_name, device_connection, configuration)
172-
elif cam_type.lower() == 'syntheticcamera' or device_type.lower() == 'synthetic':
172+
elif cam_type.lower() == 'syntheticcamera' or cam_type.lower() == 'synthetic':
173173
from aslm.model.devices.camera.camera_synthetic import SyntheticCamera
174174
return SyntheticCamera(microscope_name, device_connection, configuration)
175175
else:

src/aslm/model/devices/camera/camera_synthetic.py

+15
Original file line numberDiff line numberDiff line change
@@ -266,4 +266,19 @@ def get_minimum_waiting_time(self):
266266
"""
267267
return 0.01
268268

269+
def calculate_readout_time(self):
270+
r""" Calculate duration of time needed to readout an image.
271+
Calculates the readout time and maximum frame rate according to the camera configuration settings.
269272
273+
Returns
274+
-------
275+
readout_time : float
276+
Duration of time needed to readout an image.
277+
max_frame_rate : float
278+
Maximum framerate for a given camera acquisition mode.
279+
280+
"""
281+
exposure_time = self.camera_controller.get_property_value('exposure_time')
282+
readout_time = 0.01 # 10 milliseconds.
283+
max_frame_rate = 1 / (exposure_time + readout_time)
284+
return readout_time, max_frame_rate

0 commit comments

Comments
 (0)