Closedown
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user