Skip to content
Snippets Groups Projects
Commit dfdf2372 authored by 29iduser's avatar 29iduser
Browse files

fixed mono and ID messages

parent 0647ee91
No related branches found
No related tags found
1 merge request!11Main merge jmcchesn-main-patch branch with main
......@@ -413,7 +413,10 @@ def ID_energy_set(keV,verbose=True):
if QP_ratio[1] == None:
#ID_off() #JM look here
#ID_on()
print_warning_message('check QP')
if ID_get() > 3.7:
message = 'ID off'
else:
print_warning_message('check QP')
eV = keV*1000.0
keV = ID_calc_eV(mono_grating,ID_mode,eV,QP_ratio[0])/1000.0
ID_set(keV,verbose=verbose)
......
......@@ -225,14 +225,15 @@ def mono_energy_set(hv_eV,verbose=True):
caput(pv,hv_eV,wait=True,timeout=60)
time.sleep(2.5)
mono_status = mono_status_get()
while True:
if mono_status > 1:
if mono_status_get() > 1:
mono_resest_pitch()
caput(pv,hv_eV,wait=True,timeout=60)
time.sleep(2.5)
else:
break
if verbose:
print("Mono set to",str(round(hv_eV,3)),"eV")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment