cleaned up spreadsheet line a bit
This commit is contained in:
28
maloja.py
28
maloja.py
@ -142,21 +142,17 @@ overview = SimpleDevice("Maloja Overview",
|
||||
pulse_energy = PVAdjustable("SATFE10-PEPG046:PHOTON-ENERGY-PER-PULSE-AVG", internal=True),
|
||||
timeStamp = PVAdjustable("SF-CPCL-TIM:TIME", internal=True),
|
||||
|
||||
chicane_current = PVAdjustable("SATUN14-MBND100:I-READ", internal=True),
|
||||
chicane_set_current = PVAdjustable("SATUN14-MBND100:I-SET", internal=True),
|
||||
chicane_current_rb = PVAdjustable("SATUN14-MBND100:I-READ", internal=True),
|
||||
chicane_current_sv = PVAdjustable("SATUN14-MBND100:I-SET", internal=True),
|
||||
|
||||
att64 = PVStringAdjustable("SATFE10-OATT064:MOT2TRANS.VALD", internal=True),
|
||||
att65 = PVStringAdjustable("SATFE10-OATT065:MOT2TRANS.VALD", internal=True),
|
||||
|
||||
**undulator_info
|
||||
)
|
||||
|
||||
@as_shortcut
|
||||
def print_overview():
|
||||
print(overview)
|
||||
|
||||
@as_shortcut
|
||||
def print_line_for_spreadsheet():
|
||||
line = [
|
||||
spreadsheet_line = [
|
||||
"timeStamp", "File name",
|
||||
"Gas cell / TOF",
|
||||
"standa","Sample",
|
||||
@ -165,7 +161,7 @@ def print_line_for_spreadsheet():
|
||||
"polarisation10", "energy2",
|
||||
"polarisation19",
|
||||
"pulse_energy",
|
||||
"chicane_current",
|
||||
"chicane_current_rb",
|
||||
"FELrepRate",
|
||||
"att64",
|
||||
"att65", "Grating", "order", "Slit", "Detector position X", "Detector position Y", "Detector position (angle)","Ek", "Ep", "Slit", "Mode",
|
||||
@ -199,13 +195,23 @@ def print_line_for_spreadsheet():
|
||||
"energy20",
|
||||
"energy21",
|
||||
"energy22",
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
@as_shortcut
|
||||
def print_overview():
|
||||
print(overview)
|
||||
|
||||
@as_shortcut
|
||||
def print_line_for_spreadsheet():
|
||||
ov = overview.__dict__
|
||||
def get(i):
|
||||
if i in ov:
|
||||
return str(ov[i].get())
|
||||
return ""
|
||||
res = [get(i) for i in line]
|
||||
res = [get(i) for i in spreadsheet_line]
|
||||
res = ",".join(res)
|
||||
print(res)
|
||||
|
||||
|
Reference in New Issue
Block a user