From c069ae9f4fc2f9417142f1a0b6e1d8c625c5eb41 Mon Sep 17 00:00:00 2001 From: sfop Date: Wed, 12 Apr 2017 15:55:14 +0200 Subject: [PATCH] Closedown --- devices/CurrentCamera.properties | 14 +++++++------- devices/camtool.properties | 10 +++++----- plugins/GunScan.java | 7 +++++++ script/Diagnostics/WireScan.py | 10 +++++++++- script/RFscan/SchottkyScan.py | 4 ++-- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/devices/CurrentCamera.properties b/devices/CurrentCamera.properties index 417599d..3846713 100644 --- a/devices/CurrentCamera.properties +++ b/devices/CurrentCamera.properties @@ -1,10 +1,10 @@ -#Wed Apr 12 14:54:29 CEST 2017 +#Wed Apr 12 14:57:03 CEST 2017 colormap=Flame colormapAutomatic=false -colormapMax=2000.0 +colormapMax=4000.0 colormapMin=0.0 flipHorizontally=false -flipVertically=true +flipVertically=false grayscale=false imageHeight=1680 imageWidth=1744 @@ -21,9 +21,9 @@ rotation=0.0 rotationCrop=false scale=1.0 serverURL=localhost\:10000 -spatialCalOffsetX=-861.0 -spatialCalOffsetY=-820.0 -spatialCalScaleX=-18.90359168241966 -spatialCalScaleY=-19.37984496124031 +spatialCalOffsetX=-861.4939970777481 +spatialCalOffsetY=-820.4883730911062 +spatialCalScaleX=-18.90359092620482 +spatialCalScaleY=-19.37984500632817 spatialCalUnits=mm transpose=false diff --git a/devices/camtool.properties b/devices/camtool.properties index 0b4355a..2062a38 100644 --- a/devices/camtool.properties +++ b/devices/camtool.properties @@ -1,4 +1,4 @@ -#Wed Apr 05 17:08:38 CEST 2017 +#Wed Apr 12 15:36:21 CEST 2017 colormap=Flame colormapAutomatic=true colormapMax=578.797 @@ -18,9 +18,9 @@ roiY=0 rotation=0.0 rotationCrop=false scale=1.0 -spatialCalOffsetX=269.4151234567901 -spatialCalOffsetY=269.5964523281596 -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/plugins/GunScan.java b/plugins/GunScan.java index 04a40a7..ccacbd0 100644 --- a/plugins/GunScan.java +++ b/plugins/GunScan.java @@ -11,6 +11,7 @@ import ch.psi.pshell.plot.Plot; import ch.psi.pshell.scan.Scan; import ch.psi.pshell.scan.ScanListener; import ch.psi.pshell.scan.ScanRecord; +import ch.psi.pshell.ui.App; import ch.psi.pshell.ui.Panel; import ch.psi.utils.State; import ch.psi.utils.swing.SwingUtils; @@ -70,9 +71,15 @@ public class GunScan extends Panel { super.onStart(); getContext().addScanListener(scanListener); try { + if (App.isDetached()){ + Epics.create(); + } spinnerDispersion.setValue(Epics.get("SINBD01-DSCR010:DISPERSION-SIM", Double.class)); spinnerEnergy.setValue(Epics.get("SINBD01-DSCR010:ENERGY-SIM", Double.class)); + //spinnerDispersion.setValue(eval("caget('SINBD01-DSCR010:DISPERSION-SIM')", true)); + //spinnerEnergy.setValue(eval("caget('SINBD01-DSCR010:ENERGY-SIM')", true)); } catch (Exception ex) { + ex.printStackTrace(); showException(ex); } } diff --git a/script/Diagnostics/WireScan.py b/script/Diagnostics/WireScan.py index 8855ca4..be8d561 100644 --- a/script/Diagnostics/WireScan.py +++ b/script/Diagnostics/WireScan.py @@ -63,13 +63,21 @@ scanner.waitState(State.Busy, 60000) #End of scan checking scan_complete=False +cur_cycle = scanner.curr_cycl.get() def check_end_scan(record, scan): global scan_complete + global cur_cycle #print record[1] ,scanner.readback if record[3]<1: print "Data aquisition completed" scan_complete=True scan.abort() + elif record[2] != cur_cycle: + print "New step" + print cur_cycle, record[2] + cur_cycle = record[2] + scan.abort() + scan.start() #Metadata def write_metadata(path): @@ -83,7 +91,7 @@ def write_metadata(path): pass #Scan try: - mscan (st, st.getReadables(), -1, -1, after_read =check_end_scan) + mscan (st, st.getReadables(), -1, -1, after_read = check_end_scan) except: if not scanner.isReady(): print "Aborting Wire Scan" diff --git a/script/RFscan/SchottkyScan.py b/script/RFscan/SchottkyScan.py index 84afccd..f48c624 100644 --- a/script/RFscan/SchottkyScan.py +++ b/script/RFscan/SchottkyScan.py @@ -14,7 +14,7 @@ else: lat = args[4] -phase = ControlledVariable("Phase", "SINEG01-RSYS:SET-VSUM-PHASE", "SINEG01-RSYS:SET-VSUM-PHASE") +phase = ControlledVariable("Phase", "SINEG01-RSYS:SET-VSUM-PHASE", "SINEG01-RSYS:GET-VSUM-PHASE") phase.config.minValue =-180.0 phase.config.maxValue = 180.0 phase.config.resolution = 0.5 @@ -43,6 +43,6 @@ x = rf_phase index_max = y.index(max(y)) phase_ref = x[index_max] - 80 phase_offset = - phase_ref -caput("SINEG01-RSYS:CALC-VSUM-PHASE-OFFSET", phase_offset) +caput("SINEG01-RSYS:SET-VSUM-PHASE-OFFSET-BASE", phase_offset) set_return(phase_ref) \ No newline at end of file