Skip to content
Snippets Groups Projects
Commit 704ab844 authored by jmcchesn's avatar jmcchesn
Browse files

rebuild

parent dcabe802
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,7 @@ def ID_calc_SP(mono_grating,ID_mode,hv_eV): # Mode = state (0=RCP,1=LCP,2=V,3 ...@@ -28,7 +28,7 @@ def ID_calc_SP(mono_grating,ID_mode,hv_eV): # Mode = state (0=RCP,1=LCP,2=V,3
if type(ID_mode)== str: if type(ID_mode)== str:
ID_state=ID_state_mode(ID_mode) ID_state=ID_state_mode(ID_mode)
try: try:
K=ID_Coef(mono_grating,ID_mode,hv_eV) K=ID_coef(mono_grating,ID_state,hv_eV)
ID=poly.polyval(hv_eV,K) ID=poly.polyval(hv_eV,K)
except KeyError: except KeyError:
message_string='Not a valid ID mode!'+"\nValid Modes: "+str(ID_mode_list()) message_string='Not a valid ID mode!'+"\nValid Modes: "+str(ID_mode_list())
...@@ -398,7 +398,7 @@ def ID_QP_mode_set(ID_mode,QP_ratio): ...@@ -398,7 +398,7 @@ def ID_QP_mode_set(ID_mode,QP_ratio):
print("QP RBV =", ratio_RBV,"%") print("QP RBV =", ratio_RBV,"%")
sleep(15) sleep(15)
def ID_Coef(grt,ID_mode,hv_eV): # Mode = state (0=RCP,1=LCP,2=V,3=H); def ID_coef(grt,ID_state,hv_eV): # Mode = state (0=RCP,1=LCP,2=V,3=H);
"""Return the ID coeff for a given polarization mode and energy; """Return the ID coeff for a given polarization mode and energy;
with Mode = 0 (RCP),1 (LCP), 2 (V), 3 (H). with Mode = 0 (RCP),1 (LCP), 2 (V), 3 (H).
...@@ -408,9 +408,9 @@ def ID_Coef(grt,ID_mode,hv_eV): # Mode = state (0=RCP,1=LCP,2=V,3=H); ...@@ -408,9 +408,9 @@ def ID_Coef(grt,ID_mode,hv_eV): # Mode = state (0=RCP,1=LCP,2=V,3=H);
Previously: ID_Coef Previously: ID_Coef
""" """
def ListRange(grt,ID_mode,IDdict): # extract the list of break pts for a given mode/grt def ListRange(grt,ID_state,IDdict): # extract the list of break pts for a given mode/grt
tmp_list=[] tmp_list=[]
for item in (IDdict[grt][ID_mode]): for item in (IDdict[grt][ID_state]):
tmp_list.append(item[0]) tmp_list.append(item[0])
return tmp_list return tmp_list
...@@ -429,9 +429,9 @@ def ID_Coef(grt,ID_mode,hv_eV): # Mode = state (0=RCP,1=LCP,2=V,3=H); ...@@ -429,9 +429,9 @@ def ID_Coef(grt,ID_mode,hv_eV): # Mode = state (0=RCP,1=LCP,2=V,3=H);
print("Unable to read dictionary") print("Unable to read dictionary")
try: try:
Lrange = ListRange(grt,ID_mode,ID_function) Lrange = ListRange(grt,ID_state,ID_function)
Erange = FindRange(hv_eV,Lrange) Erange = FindRange(hv_eV,Lrange)
K = ID_function[grt][ID_mode][Erange][1] K = ID_function[grt][ID_state][Erange][1]
return K return K
except KeyError: except KeyError:
......
...@@ -19,6 +19,7 @@ iexcode/instruments/Kappa.py ...@@ -19,6 +19,7 @@ iexcode/instruments/Kappa.py
iexcode/instruments/Kappa_Euler.py iexcode/instruments/Kappa_Euler.py
iexcode/instruments/Kappa_det.py iexcode/instruments/Kappa_det.py
iexcode/instruments/Lakeshore_335.py iexcode/instruments/Lakeshore_335.py
iexcode/instruments/MPA.py
iexcode/instruments/Motors.py iexcode/instruments/Motors.py
iexcode/instruments/Scienta.py iexcode/instruments/Scienta.py
iexcode/instruments/VLS_PGM.py iexcode/instruments/VLS_PGM.py
...@@ -36,7 +37,6 @@ iexcode/instruments/gate_valves.py ...@@ -36,7 +37,6 @@ iexcode/instruments/gate_valves.py
iexcode/instruments/hxp_mirrors.py iexcode/instruments/hxp_mirrors.py
iexcode/instruments/logfile.py iexcode/instruments/logfile.py
iexcode/instruments/m3r.py iexcode/instruments/m3r.py
iexcode/instruments/mpa.py
iexcode/instruments/remote_controlers.py iexcode/instruments/remote_controlers.py
iexcode/instruments/resolution.py iexcode/instruments/resolution.py
iexcode/instruments/s29_temp_cntl.py iexcode/instruments/s29_temp_cntl.py
......
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