Skip to content
Snippets Groups Projects
Commit 324fbd24 authored by Your Name's avatar Your Name
Browse files

debug

parent e0227269
No related branches found
No related tags found
1 merge request!11Main merge jmcchesn-main-patch branch with main
......@@ -530,6 +530,9 @@ class Scienta:
# writing scan parameters
else:
#put the analzer at inital value so calcuations are correct
self.put(KElist[0],PassEnergy,"Angular")
time.sleep(2)
if len(EAlist)==7: #Swept Mode
scanType="Sweep"
self._spectra_Swept(KElist[0],KElist[1],KElist[2],PassEnergy)
......
......@@ -888,7 +888,7 @@ class ScanRecord:
det_num=(str(i).zfill(2))
det_pv=caget(scan_pv+".D"+det_num+"PV")
if det_pv !='':
det=PV(det_pv); time.sleep(0.1)#smallest sleep to allow for PV traffic
det=PV(det_pv); time.sleep(0.25)#sleep to allow for PV traffic
if not det.connected:
print("Detector "+det_num+" has a bad PV: "+det.pvname+" not connected")
det_ok = False
......@@ -899,7 +899,7 @@ class ScanRecord:
pos_num=str(i)
pos_pv=caget(scan_pv+".P"+pos_num+"PV")
if pos_pv != '':
pos=PV(pos_pv); time.sleep(0.1)#smallest sleep to allow for PV traffic
pos=PV(pos_pv); time.sleep(0.25)#increased from .1
if not pos.connected:
print("Positioner "+pos_num+" has a BAD PV: "+pos.pvname+" not connected")
pos_ok = False
......
......@@ -315,8 +315,13 @@ def scanID(ID_sp_start,ID_sp_stop,ID_sp_step,**kwargs):
"""
scan the ID set point
"""
kwargs.setdefault('execute',True)
kwargs.setdefault('scan_dim',1)
val_pv,rbv_pv = ID_scan_pvs()
scan_fillin(val_pv,rbv_pv,ID_sp_start,ID_sp_stop,ID_sp_step,**kwargs)
#Scanning
if kwargs['execute']:
scan_go(scan_dim=kwargs['scan_dim'])
def mvmono(val):
......
......@@ -285,13 +285,13 @@ def sotw_slit_positions(**kwargs):
grt = grating_get()
detDiode= kwargs['detDiode']
list_position = [grt,0,0,0,0]
for slit_name in kwargs['slit_list']:
message={'slit2B': 'M1 alignment and slit center','slit1A':'slit center'}
print('\n---------- Scanning '+slit_name+':\n')
message[slit_name]
list_position = [grt,0,0,0,0]
flag = 2
while flag >1:
#scanning
......@@ -325,6 +325,7 @@ def sotw_slit_positions(**kwargs):
if slit_name == 'slit2B':
list_position[2] = v
list_position[1] = h
print(slit_name,list_position) #JM debugging
elif slit_name == 'slit1A':
list_position[4] = v
list_position[3] = h
......@@ -461,8 +462,8 @@ def sotw_check_flux(**kwargs):
#plotting
scanNum = last_mda()
plt.plot(scanNum,detDiode,flux=3)
plt.show()
plot_mda(scanNum,detDiode,flux=3)
def sotw(grt,branch,wait=False,**kwargs):
"""
......
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