This commit is contained in:
gobbo_a
2026-02-09 15:06:52 +01:00
parent 4f6a49c538
commit f841fbc0ea
163 changed files with 576 additions and 49654 deletions

View File

@@ -1,4 +1,4 @@
import ch.psi.utils.DataAPI as DataAPI
import ch.psi.pshell.utils.DataAPI as DataAPI
#da = DataAPI("https://data-api.psi.ch/sf")
da = DataAPI("https://data-api.psi.ch/sf-databuffer")

View File

@@ -4,7 +4,7 @@ import ch.psi.pshell.epics.ControlledVariable as ControlledVariable
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.config.deadband = 0.5
#st = Stream("ICTstream", dispatcher)

View File

@@ -55,7 +55,7 @@ message.append("Camera: ").append(cameraName).append(" (").
append((server != null) ? "server" : "direct").append(")").append("\n");
message.append("Screen: ").append(String.valueOf(valueScreen.getLabel().getText())).append("\n");
message.append("Filter: ").append(String.valueOf(valueFilter.getLabel().getText())).append("\n");
message.append("Data file: ").append(getContext().getExecutionPars().getPath()).append("\n");
message.append("Data file: ").append(get_sequencer().getExecutionPars().getPath()).append("\n");
message.append("Comment: ").append(textComment.getText()).append("\n");
if ((fitOv != null) && (fitOv.length > 5)) {
Overlays.Text text = (Overlays.Text) fitOv[5];

View File

@@ -49,7 +49,7 @@ bph.config.minValue = -360.0
bph.config.maxValue = 360.0
bph.config.precision = 3
bph.config.rotation = True
bph.config.resolution = 0.1
bph.config.deadband = 0.1
bph.config.save()
bph.initialize()
rph.initialize()
@@ -122,7 +122,7 @@ if do_elog:
attachments = []
if plt is not None:
sleep(0.1) #Give some time to plot to be finished - it is not sync with acquisition
file_name = os.path.abspath(get_context().setup.getContextPath() + "/SchottkyScanPlot.png")
file_name = os.path.abspath(Setup.getContextPath() + "/SchottkyScanPlot.png")
plt.saveSnapshot(file_name , "png")
attachments = [file_name]
elog("Schottky scan", log_msg, attachments)

View File

@@ -20,7 +20,7 @@ if do_elog:
attachments = []
if plt is not None:
sleep(0.1) #Give some time to plot to be finished - it is not sync with acquisition
file_name = os.path.abspath(get_context().setup.getContextPath() + "/SchottkyScanSetPlot.png")
file_name = os.path.abspath(Setup.getContextPath() + "/SchottkyScanSetPlot.png")
plt.saveSnapshot(file_name , "png")
attachments = [file_name]
elog("Set gun phase", log_msg, attachments)

View File

@@ -49,7 +49,7 @@ bph.config.minValue = -360.0
bph.config.maxValue = 360.0
bph.config.precision = 3
bph.config.rotation = False
bph.config.resolution = 0.01
bph.config.deadband = 0.01
bph.config.save()
bph.initialize()
rph.initialize()
@@ -116,7 +116,7 @@ if do_elog:
attachments = []
if plt is not None:
sleep(0.1) #Give some time to plot to be finished - it is not sync with acquisition
file_name = os.path.abspath(get_context().setup.getContextPath() + "/SchottkyScanPlot.png")
file_name = os.path.abspath(Setup.getContextPath() + "/SchottkyScanPlot.png")
plt.saveSnapshot(file_name , "png")
attachments = [file_name]
elog("Schottky scan", log_msg, attachments)

View File

@@ -9,7 +9,6 @@
# look at the centroid position (BPM or screen) downstream of the gun.
import datetime
import ch.psi.utils.Chrono as Chrono
mode = "server" # "server", "camtool", "bpm" or "direct"
camera_name = "simulation"

View File

@@ -33,7 +33,7 @@ camera_name = "simulation"
phase.config.minValue = -90.0
phase.config.maxValue = 360.0
phase.config.precision = 4
phase.config.resolution = 0.5
phase.config.deadband = 0.5
phase.config.rotation = True
phase.config.save()
phase.initialize()

View File

@@ -100,7 +100,7 @@ def check_end_scan(record, scan):
position = record[0]
if record[3] != cur_cycle:
cur_cycle = record[3]
get_context().dataManager.splitScanData(scan)
get_data_manager().splitScanData(scan)
#if plt is not None: for s in plt.getAllSeries(): s.clear()
if plt is not None:
for i in range (len(blms)):

8
script/test/bs.py Executable file → Normal file
View File

@@ -1,12 +1,12 @@
st1 = Stream("st1", dispatcher)
#st1.addScalar("X1", "SINEG01-DBPM340:X1", 10, 0)
st1.addScalar("X1", "SINEG01-DBPM340:X1", 10, 0)
#st1.addScalar("Y1", "SINEG01-DBPM340:Y1", 10, 0)
#st1.addScalar("Q1", "SINEG01-DBPM340:Q1", 10, 0)
#w,h = caget("SLG-LCAM-C103:WIDTH", 'i'), caget("SLG-LCAM-C103:HEIGHT", 'i')
#st1.addMatrix("VC", "SLG-LCAM-C103:FPICTURE", 10, 0, w,h)
st1.addScalar("i", "SINBC02-DSRM310:intensity", 1, 0)
st1.addWaveform("x", "SINBC02-DSRM310:x_profile", 1, 0,2048)
st1.addWaveform("y", "SINBC02-DSRM310:y_profile", 1, 0,2048)
#st1.addScalar("i", "SINBC02-DSRM310:intensity", 1, 0)
#st1.addWaveform("x", "SINBC02-DSRM310:x_profile", 1, 0,2048)
#st1.addWaveform("y", "SINBC02-DSRM310:y_profile", 1, 0,2048)
st1.initialize()
try:

View File

@@ -19,7 +19,7 @@ phase = Positioner("Phase", station + "-RSYS:SET-VSUM-PHASE", station + "-RSYS:
phase.config.minValue = -90.0
phase.config.maxValue = 360.0
phase.config.precision = 4
phase.config.resolution = 0.3
phase.config.deadband = 0.3
phase.config.rotation = True
phase.initialize()
show_panel(phase)