This commit is contained in:
voulot_d
2017-01-17 09:20:40 +01:00
parent e305893417
commit 4f3f64474a
3 changed files with 14 additions and 19 deletions

View File

@@ -125,7 +125,3 @@ if do_elog:
_ = [r, hx, hy]
set_return([r, hx, hy])

View File

@@ -49,7 +49,6 @@ try:
r = lscan(phase, [Vb, xb], start, stop, step , latency=lat, after_read = after)
rf_phase = r.getPositions(0)
energy = [val.mean/1000.0/disp*energy0 for val in r.getReadable(1)]
print r.getReadable(1)[0].mean
caput(station + "-RSYS:GET-ENERGY-ARRAY", to_array(energy, 'd'))
caput(station + "-RSYS:GET-PHASE-ARRAY", to_array(rf_phase,'d'))
phase_fit_max = None
@@ -89,8 +88,8 @@ caput(station + "-RSYS:CALC-VSUM-AMPLT-SCALE" , amplitude_scale)
caput(station + "-RSYS:CALC-VOLT-POWER-SCALE" , power_scale)
#title="Phase scan "+str(station)
#message=("Energy Gain: %0.3f" % energy_gain + "\n" +
# "Phase Offset: %0.2f" % phase_offset + "\n" +
# "Amplitude Scale: %0.3f" % amplitude_scale + "\n" +
# "Power Scale: %0.3f" % power_scale)
#message=("Energy Gain: %0.3f" % energy_gain + "MeV\n" +
# "Phase Offset: %0.2f" % phase_offset + "deg\n" +
# "Amplitude Scale: %0.3f" % amplitude_scale + "MV\n" +
# "Power Scale: %0.3f" % power_scale) + "1/ohm"
#elog(title, message)

View File

@@ -135,17 +135,17 @@ def elog(title, message, attachments = [], author = None, category = "Info", dom
typ = "pshell"
entry = ""
cmd = 'G_CS_ELOG_add -l "' + logbook+ '" '
cmd = cmd + '-a "Author=' + author + '" '
cmd = cmd + '-a "Type=' + typ + '" '
cmd = cmd + '-a "Entry=' + entry + '" '
cmd = cmd + '-a "Title=' + title + '" '
cmd = cmd + '-a "Category=' + category + '" '
cmd = cmd + '-a "Domain=' + domain + '" '
cmd = 'G_CS_ELOG_add -l "' + logbook + '" '
cmd = cmd + '-a "Author=' + author + '" '
cmd = cmd + '-a "Type=' + typ + '" '
cmd = cmd + '-a "Entry=' + entry + '" '
cmd = cmd + '-a "Title=' + title + '" '
cmd = cmd + '-a "Category=' + category + '" '
cmd = cmd + '-a "Domain=' + domain + '" '
for attachment in attachments:
cmd = cmd + '-f "' + attachment + '" '
cmd = cmd + '-n ' + str(encoding)
cmd = cmd + ' "' + message + '"'
cmd = cmd + '-f "' + attachment + '" '
cmd = cmd + '-n ' + str(encoding)
cmd = cmd + ' "' + message + '"'
#print cmd
#os.system (cmd)
#print os.popen(cmd).read()