def cancel(): timing_sequencer.acquisition_cancel() def collect():
def finish(): from time import sleep while timing_sequencer.image_number < max(save_image_numbers): sleep(dt) timing_sequencer.acquisition_cancel()