GitLab will be upgraded on June 23rd evening. During the upgrade the service will be unavailable, sorry for the inconvenience.

Commit 803d864b authored by bliss administrator's avatar bliss administrator

Added useful functions for ID19 users (imported in bliss sessions)

parent d801f677
from bliss.setup_globals import *
from bliss.shell.cli.user_dialog import *
from bliss.shell.cli.pt_widgets import BlissDialog
TOMO = None
def init_tomo(tomo):
global TOMO
TOMO = tomo
def select_tomo():
dlg_tomo = UserInput(label="Enter name of tomo object you want to use (ex: hrtomo)")
ret = BlissDialog( [[dlg_tomo]] , title='Tomo Setup').show()
if ret != False:
tomo = get_config().get(ret[dlg_tomo])
init_tomo(tomo)
def mvct(motor, position, exposure_time=None):
mv(motor, position)
cts(exposure_time)
def umvct(motor, position, exposure_time=None):
umv(motor, position)
cts(exposure_time)
def mvrct(motor, position, exposure_time=None):
mvr(motor, position)
cts(exposure_time)
def umvrct(motor, position, exposure_time=None):
umvr(motor, position)
cts(exposure_time)
def cts(exposure_time=None):
global TOMO
if TOMO is not None:
if TOMO.parameters.exposure_time != 0:
ct(TOMO.parameters.exposure_time)
else:
print(f"WARNING TOMO.parameters.exposure_time is 0")
else:
print('No tomo exists in the session. Please use select_tomo() to define one')
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