File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -298,13 +298,23 @@ def stage(self):
298298 raise RuntimeError (
299299 "File capture must be off to stage the detector, otherwise the file will be corrupted"
300300 )
301+
302+ # Must be in standby to start
301303 if self .state .get (as_string = True ) == "RUNNING" :
302304 self .acquire .set (0 ).wait (3.0 )
305+
306+ # Must be live monitoring to start
307+ if self .live_monitoring .get (as_string = True ) == "Off" :
308+ self .live_monitoring .set ("On" ).wait (3.0 )
309+
310+ # File capture must be on and then turned off at unstage
303311 self .stage_sigs .update (
304312 [
305313 (self .file_capture , 1 ),
306314 ]
307315 )
316+
317+ # Frame rate can't be faster than 200ms in any mode except swept
308318 if self .frames .get () < 200 and self .acq_mode .get (as_string = True ) != "Swept" :
309319 self .stage_sigs .update (
310320 [(self .frames , 200 )],
@@ -316,6 +326,8 @@ def stage(self):
316326 self ._index = 0
317327 self ._last_emitted_index = 0
318328
329+ # Subscribe to state and live max count exceeded to
330+ # handle the acquisition status
319331 self .state .subscribe (self ._state_changed , run = False )
320332 self .live_max_count_exceeded .subscribe (
321333 self ._live_max_count_exceeded_monitor , run = False
You can’t perform that action at this time.
0 commit comments