Image Measurements
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
from collections import OrderedDict
|
||||
|
||||
diag_channels = { \
|
||||
#"photon energy": "X11MA-PGM:rbkenergy", \
|
||||
#"grating number": "X11MA-PGM:grating", \
|
||||
#"cff value": "X11MA-PGM:rbkcff", \
|
||||
"diffraction order": "X11MA-PGM:difforder0", \
|
||||
#"exit slit size":"X11MA-OP2-SL:TRY.VAL", \
|
||||
"front end size":"X11MA-FE-DSAPER", \
|
||||
"status fast shutter":"X11MA-VME-ES1:FAST-SHTR", \
|
||||
"girder x": "X11MA-HG:X1", \
|
||||
"girder y": "X11MA-HG:Y1", \
|
||||
"girder z": "X11MA-HG:Z1", \
|
||||
"girder pitch": "X11MA-HG:PITCH1", \
|
||||
"girder yaw": "X11MA-HG:YAW1", \
|
||||
"girder roll set": "X11MA-HG:ROLL_SET", \
|
||||
"CMU ox": "X11MA-OP-CM:ox", \
|
||||
"CMU oy": "X11MA-OP-CM:oy", \
|
||||
"CMU oz": "X11MA-OP-CM:oz", \
|
||||
"CMU oRx": "X11MA-OP-CM:oRx", \
|
||||
"CMU oRy": "X11MA-OP-CM:oRy", \
|
||||
"CMU oRz": "X11MA-OP-CM:oRz", \
|
||||
"CMU TRB": "X11MA-OP2-CM:TRB.RBV", \
|
||||
#"mode": "X11PHS-E:OPT", \
|
||||
#"id1 mode": "X11MA-ID1:MODE", \
|
||||
#"id1 offset": "X11MA-ID1:ENERGY-OFFS", \
|
||||
#"id1 alpha": "X11MA-ID1:ALPHA", \
|
||||
#"id1 harmonic": "X11MA-ID1:HARMONIC", \
|
||||
"id1 gap": "X11MA-ID1-GAP:READ", \
|
||||
"id1 shift": "X11MA-ID1-SHIFT:READ", \
|
||||
#"id2 mode": "X11MA-ID2:MODE", \
|
||||
#"id2 offset": "X11MA-ID2:ENERGY-OFFS", \
|
||||
#"id2 alpha": "X11MA-ID2:ALPHA", \
|
||||
#"id2 harmonic": "X11MA-ID2:HARMONIC", \
|
||||
"id2 gap": "X11MA-ID2-GAP:READ", \
|
||||
"id2 shift": "X11MA-ID2-SHIFT:READ", \
|
||||
"keithley 10 IO": "X11Keithley1-read", \
|
||||
#"ring current": "ARIDI-PCT:CURRENT", \
|
||||
"PEEM high voltage": "X11MA-ES1-PEEM:UMON", \
|
||||
"PEEM leakage current": "X11MA-ES1-PEEM:IMON", \
|
||||
"Pressure in PEEM": "X11MA-ES1-MAIN:PRESSURE", \
|
||||
"Pressure in Column": "X11MA-ES1-COLU:PRESSURE", \
|
||||
"Sample temperature": "X11MA-ES1-SW:Pt100-T", \
|
||||
"Pt100 resistance": "X11MA-ES1-SW:Pt100-R", \
|
||||
"high voltage": "X11MA-ES1-SD1:cam1:HighVoltage_RBV", \
|
||||
}
|
||||
|
||||
diag_devices = {
|
||||
"photon energy": energy_rbk, \
|
||||
"grating number": Grating, \
|
||||
"cff value": cff, \
|
||||
"exit slit size": ES, \
|
||||
"mode": energy_opt, \
|
||||
"id1 mode": id1_mode, \
|
||||
"id1 offset": id1_offset, \
|
||||
"id1 alpha": id1_alpha, \
|
||||
"id1 harmonic": id1_harmonic, \
|
||||
"id2 mode": id2_mode, \
|
||||
"id2 offset": id2_offset, \
|
||||
"id2 alpha": id2_alpha, \
|
||||
"id2 harmonic": id2_harmonic, \
|
||||
"ring current": machine_cur, \
|
||||
}
|
||||
|
||||
|
||||
def get_diags():
|
||||
ret = {}
|
||||
for k,v in diag_devices.items():
|
||||
try:
|
||||
ret[k]=str(v.read())
|
||||
except:
|
||||
ret[k]="Error: " + sys.exc_info()[1]
|
||||
for k,v in diag_channels.items():
|
||||
try:
|
||||
ret[k]=caget(v,'s')
|
||||
except:
|
||||
ret[k]="Error: " + sys.exc_info()[1]
|
||||
ret["exposure time"] = str(eiger.getExposure())
|
||||
return OrderedDict(sorted(ret.items(), key=lambda i: i[0].lower()))
|
||||
|
||||
def print_diags():
|
||||
diags = get_diags()
|
||||
for k in diags.keys():
|
||||
print k + ": " + diags[k]
|
||||
|
||||
|
||||
#- exposure time
|
||||
#- mode: normal or tune/detune
|
||||
|
||||
Reference in New Issue
Block a user