Commit 6ca85f02 authored by bliss administrator's avatar bliss administrator
Browse files

Changes for accumulation

parent da1e88ab
......@@ -41,3 +41,26 @@ def cts(exposure_time=None):
print(f"WARNING TOMO.parameters.exposure_time is 0")
else:
print('No tomo exists in the session. Please use select_tomo() to define one')
def set_accumulation(detector, max_acc_expo_time):
DEFAULT_CHAIN.set_settings(default_acq_chain_acc['chain_config'])
det_def_chain = DEFAULT_CHAIN._settings.get(detector)
if det_def_chain is not None:
acq_settings = det_def_chain.get('acquisition_settings')
acq_settings.update({'acc_max_expo_time':max_acc_expo_time})
detector.acquisition.mode = 'ACCUMULATION'
detector.accumulation.max_expo_time = max_acc_expo_time
else:
DEFAULT_CHAIN.set_settings(default_acq_chain['chain_config'])
raise Exception(f'{detector.name} is not configured in default chain for accumulation')
def unset_accumulation(detector):
DEFAULT_CHAIN.set_settings(default_acq_chain['chain_config'])
det_def_chain = DEFAULT_CHAIN._settings.get(detector)
detector.acquisition.mode = 'SINGLE'
if det_def_chain is None:
raise Exception(f'{detector.name} is not configured in default chain')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment