diff --git a/devices/CurrentCamera.properties b/devices/CurrentCamera.properties index 10a5c50..ca05c61 100644 --- a/devices/CurrentCamera.properties +++ b/devices/CurrentCamera.properties @@ -1,8 +1,8 @@ -#Fri Jul 14 10:44:20 CEST 2017 -colormap=Grayscale +#Fri Jul 14 13:24:34 CEST 2017 +colormap=Flame colormapAutomatic=true -colormapMax=520.0 -colormapMin=204.0 +colormapMax=3054.0 +colormapMin=0.0 flipHorizontally=false flipVertically=false grayscale=false @@ -21,9 +21,9 @@ rotation=0.0 rotationCrop=false scale=1.0 serverURL=localhost\:10000 -spatialCalOffsetX=-606.4867444313851 -spatialCalOffsetY=-602.502078032311 -spatialCalScaleX=-26.714158979668674 -spatialCalScaleY=-27.100271547904505 +spatialCalOffsetX=-283.5983027819687 +spatialCalOffsetY=-226.5368173595303 +spatialCalScaleX=-26.714159330404335 +spatialCalScaleY=-27.10027046837886 spatialCalUnits=mm transpose=false diff --git a/devices/camtool.properties b/devices/camtool.properties index c8459be..9d83b93 100644 --- a/devices/camtool.properties +++ b/devices/camtool.properties @@ -1,4 +1,4 @@ -#Thu Jul 13 15:35:44 CEST 2017 +#Fri Jul 14 12:20:10 CEST 2017 colormap=Flame colormapAutomatic=true colormapMax=578.797 @@ -18,9 +18,9 @@ roiY=0 rotation=0.0 rotationCrop=false scale=1.0 -spatialCalOffsetX=542.4551282051282 -spatialCalOffsetY=422.17999999999995 -spatialCalScaleX=1.0 -spatialCalScaleY=1.0 +spatialCalOffsetX=-861.4939970777481 +spatialCalOffsetY=-820.4883730911062 +spatialCalScaleX=-18.90359092620482 +spatialCalScaleY=-19.37984500632817 spatialCalUnits=mm transpose=false diff --git a/devices/dispatcher.properties b/devices/dispatcher.properties index 7418e4f..8275407 100644 --- a/devices/dispatcher.properties +++ b/devices/dispatcher.properties @@ -1,4 +1,4 @@ -#Tue Jul 04 10:20:09 CEST 2017 +#Fri Jul 14 11:47:17 CEST 2017 alignmentRetries=20 disableCompression=false dropIncomplete=false diff --git a/script/Diagnostics/DLACScan.py b/script/Diagnostics/DLACScan.py index c81c6f1..c959175 100644 --- a/script/Diagnostics/DLACScan.py +++ b/script/Diagnostics/DLACScan.py @@ -47,6 +47,7 @@ if dry_run: motor.config.maxValue = 1000.0 else: motor = ch.psi.pshell.epics.Motor("DLAC motor", prefix + ":MOTOR_Y1") + motor.config.resolution = 0.001 #In-position band motor.monitored = True motor.initialize() add_device(motor, True) @@ -97,16 +98,16 @@ scan_complete, cur_cycle = False, 0 destination = None def check_end_scan(record, scan): global scan_complete, start, destination - #if motor.ready: - if motor.isInPosition(destination): + if motor.ready: + #if motor.isInPosition(destination): print "Data aquisition completed" scan_complete=True scan.abort() record.cancel() #So it won't be saved else: - position = float( rec[0].timestamp - start ) + position = float( record[1].timestamp - start ) for i in range (len(blms)): - plt.getSeries(i).appendData(position, record[1 + i]) + plt.getSeries(i).appendData(position, record[2 + i]) @@ -153,7 +154,7 @@ try: #else: # motor.moveAsync(center_pos + scan_range[0]) start = st.take().timestamp - mscan (st, st.getReadables() , -1, -1, take_initial = True, after_read = check_end_scan) + mscan ( st, [motor.readback,] + st.getReadables(), -1, -1, take_initial = True, after_read = check_end_scan) except: print "Quit scan" if not scan_complete: @@ -171,7 +172,8 @@ try: finally: print "Closing stream" - st.close() + st.close() + motor.setSpeed(TRAVEL_SPEED) print msg diff --git a/script/RFscan/SchottkyScanSet.py b/script/RFscan/SchottkyScanSet.py index 1b17037..dc9a544 100644 --- a/script/RFscan/SchottkyScanSet.py +++ b/script/RFscan/SchottkyScanSet.py @@ -16,7 +16,7 @@ if do_elog: log_msg = "SINEG01-RSYS:SET-VSUM-PHASE-OFFSET-BASE \n" log_msg = log_msg + "Old: %0.1f" % phaseOffset_old + "deg \n" log_msg = log_msg + "New: %0.1f" % phaseOffset_new + "deg \n" - log_msg = log_msg + "RF phase at charge on-set %0.1f" % -phaseOffset_new + "deg \n" + log_msg = log_msg + "Charge on-set at %0.1f" % -phaseOffset_new + "deg RF phase (0.0 deg beam phase)\n" attachments = [] if plt is not None: sleep(0.1) #Give some time to plot to be finished - it is not sync with acquisition diff --git a/script/RFscan/phase_scan_caqtdm.py b/script/RFscan/phase_scan_caqtdm.py index 5d1aa79..9cfcb2f 100644 --- a/script/RFscan/phase_scan_caqtdm.py +++ b/script/RFscan/phase_scan_caqtdm.py @@ -1,7 +1,7 @@ import ch.psi.pshell.epics.Positioner as Positioner import ch.psi.pshell.epics.ChannelDouble as ChannelDouble -dry_run = False +dry_run = True do_elog = True if get_exec_pars().source == CommandSource.ui: @@ -111,9 +111,10 @@ caput(station + "-RSYS:SET-VOLT-POWER-SCALE-CALC", power_scale) if do_elog: title = "Phase scan" + station log_msg = "Data file: " + get_exec_pars().path + "\n" - log_msg = log_msg + "Energy Gain: %0.3f" % fit_amplitude + "MeV\n" - log_msg = log_msg + "Phase Offset: %0.2f" % phase_offset + "deg\n" - log_msg = log_msg + "Amplitude Scale: %0.3f" % amplitude_scale + "MV\n" - log_msg = log_msg + "Power Scale: %0.3f" % power_scale + "MW/MV^2" + log_msg = log_msg + "On-crest VS phase: %0.2f" % ph_crest + " deg \n" + log_msg = log_msg + "Energy Gain: %0.3f" % fit_amplitude + " MeV \n" + log_msg = log_msg + "VS -phase Offset: %0.2f" % phase_offset + " deg \n" + log_msg = log_msg + "Amplitude Scale: %0.3f" % amplitude_scale + " MV \n" + log_msg = log_msg + "Power Scale: %0.3f" % power_scale + " MW/MV^2" attachments = get_plot_snapshots() elog(title, log_msg, attachments)