diff --git a/plugins/ShottkyScan.form b/plugins/SchottkyScan.form similarity index 100% rename from plugins/ShottkyScan.form rename to plugins/SchottkyScan.form diff --git a/plugins/ShottkyScan.java b/plugins/SchottkyScan.java similarity index 95% rename from plugins/ShottkyScan.java rename to plugins/SchottkyScan.java index eaddbe8..ecf15b4 100644 --- a/plugins/ShottkyScan.java +++ b/plugins/SchottkyScan.java @@ -20,10 +20,10 @@ import java.util.ArrayList; /** * */ -public class ShottkyScan extends Panel { +public class SchottkyScan extends Panel { LinePlotErrorSeries series = new LinePlotErrorSeries("Values"); - public ShottkyScan() { + public SchottkyScan() { initComponents(); plot.setStyle(LinePlotJFree.Style.ErrorY); plot.addSeries(series); @@ -73,13 +73,13 @@ public class ShottkyScan extends Panel { ScanListener scanListener = new ScanListener() { @Override public void onScanStarted(Scan scan, String plotTitle) { - if ("ShottkyScan".equals(getContext().getExecutionPars().getName())){ + if ("SchottkyScan".equals(getContext().getExecutionPars().getName())){ series.clear(); } } @Override public void onNewRecord(Scan scan, ScanRecord record) { - if ("ShottkyScan".equals(getContext().getExecutionPars().getName())){ + if ("SchottkyScan".equals(getContext().getExecutionPars().getName())){ series.appendData((Double)record.getPositions()[0], ((DescStatsDouble)record.getValues()[0]).getMean(), ((DescStatsDouble)record.getValues()[0]).getStdev()); } @@ -313,7 +313,7 @@ public class ShottkyScan extends Panel { parameters.add(spinnerLatency.getValue()); try { //How to get a callback on the end of execution - runAsync("RFscan/ShottkyScan", parameters).handle((ret, ex) -> { + runAsync("RFscan/SchottkyScan", parameters).handle((ret, ex) -> { if (ex != null){ getLogger().info("Exception executing scan: " + ex); } else { @@ -321,7 +321,7 @@ public class ShottkyScan extends Panel { } return ret; }); - //runAsync("RFscan/ShottkyScan", parameters); + //runAsync("RFscan/SchottkyScan", parameters); } catch (Exception ex) { showException(ex); } diff --git a/script/RFscan/ShottkyScan.py b/script/RFscan/ShottkyScan.py deleted file mode 100644 index b58acc4..0000000 --- a/script/RFscan/ShottkyScan.py +++ /dev/null @@ -1,49 +0,0 @@ -import ch.psi.pshell.epics.ControlledVariable as ControlledVariable - -if get_exec_pars().source == CommandSource.ui: - start = 50.0 - stop = 230.0 - step = 5.0 - nb = 1 - lat = 0.100 -else: - start = args[0] - stop = args[1] - step = args[2] - nb = int(args[3]) - lat = args[4] - - -phase = ControlledVariable("Phase", "SINEG01-RSYS:SET-VSUM-PHASE-SIM", "SINEG01-RSYS:GET-VSUM-PHASE-SIM") -phase.config.minValue =-45.0 -phase.config.maxValue = 360.0 -phase.config.resolution = 0.5 -phase.initialize() - -#st = Stream("ICTstream", dispatcher) -#q = st.addScalar("Charge", "SINEG01-DICT215:B1_CHARGE-SIM", 1, 0) -#st.initialize() -#st.start(True) -q = Channel("SINEG01-DICT215:B1_CHARGE-SIM", type = 'd', alias='ICT-Q') - -try: - qb = create_averager(q, nb, 0.100) - r = lscan(phase, (qb), start, stop, step, latency=lat) - rf_phase = r.getPositions(0) - charge = [val.mean for val in r.getReadable(0)] - chargerms = [val.stdev for val in r.getReadable(0)] -finally: - phase.close() - q.close() - #st.close() - -#Setting the return value -#set_return(50.0) -y = charge -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) - -set_return(phase_ref) \ No newline at end of file