@@ -75,7 +75,6 @@ def __init__(self, view, parent_controller):
7575 "Z-Stack" : "z-stack" ,
7676 "Single Acquisition" : "single" ,
7777 "Customized" : "customized" ,
78- "Constant Velocity Acquisition" : "ConstantVelocityAcquisition" ,
7978 }
8079
8180 self .view .pull_down ["values" ] = list (self .mode_dict .keys ())
@@ -136,10 +135,10 @@ def progress_bar(self, images_received, microscope_state, mode, stop=False):
136135
137136 if mode == "single" :
138137 number_of_slices = 1
139- elif mode == "live" or mode == "customized" :
140- number_of_slices = 1
141- elif mode == "z-stack" or "ConstantVelocityAcquisition" :
138+ elif mode == "z-stack" :
142139 number_of_slices = microscope_state ["number_z_steps" ]
140+ else :
141+ number_of_slices = 1
143142
144143 top_anticipated_images = number_of_slices
145144 bottom_anticipated_images = (
@@ -152,12 +151,7 @@ def progress_bar(self, images_received, microscope_state, mode, stop=False):
152151 if images_received > 0 :
153152 # Update progress bars according to imaging mode.
154153 if stop is False :
155- if mode == "live" or mode == "customized" :
156- self .view .CurAcq .start ()
157- self .view .OvrAcq .start ()
158- self .view .total_acquisition_label .config (text = "--:--:--" )
159-
160- else :
154+ if mode == "z-stack" or mode == "single" :
161155 # Calculate the number of images remaining.
162156 # Time is estimated from the framerate, which includes stage
163157 # movement time inherently.
@@ -167,8 +161,12 @@ def progress_bar(self, images_received, microscope_state, mode, stop=False):
167161 self .update_progress_label (seconds_left )
168162 except ZeroDivisionError :
169163 pass
164+ else :
165+ self .view .CurAcq .start ()
166+ self .view .OvrAcq .start ()
167+ self .view .total_acquisition_label .config (text = "--:--:--" )
170168
171- if mode == "z-stack" or mode == "ConstantVelocityAcquisition" :
169+ if mode == "z-stack" :
172170 top_percent_complete = 100 * (
173171 images_received / top_anticipated_images
174172 )
0 commit comments