From 97003e3b4f5fd007c77e00ab73f921e659716973 Mon Sep 17 00:00:00 2001 From: gac-alvra Date: Thu, 4 Sep 2025 11:40:41 +0200 Subject: [PATCH] Sep.2025 --- config/config.properties | 55 ++++++++++------ config/setup.properties | 22 ++++--- config/variables.properties | 6 +- devices/CamServer.properties | 0 devices/Camera Server.properties | 0 devices/CameraServer.properties | 25 +++++++ devices/CurrentCamera.properties | 26 ++++---- devices/Data pipeline.properties | 0 devices/Image Averager.properties | 0 devices/Time.properties | 3 +- devices/dispatcher.properties | 4 +- devices/dp1.properties | 0 devices/dummy_motor.properties | 3 +- devices/image.properties | 0 devices/m1.properties | 0 devices/m2.properties | 0 devices/motor_x1.properties | 3 +- devices/p1.properties | 0 devices/src1.properties | 0 devices/src2.properties | 0 plugins/CameraCalibrationDialog.java | 0 plugins/Correlation.java | 0 plugins/Inventory.java | 0 plugins/ScreenPanel5.java | 0 plugins/ScreenPanel6.form | 0 plugins/ScreenPanel6.java | 0 script/1D_EOscan.scan | 0 script/1D_HUber_jet_scan.scan | 0 script/1D_Huber_pinhole_sca.scan | 0 script/1D_Huber_pinhole_scan.scan | 0 script/1D_Huber_scan.scan | 0 script/1D_delayline_scan.scan | 0 script/2D_Huber_pinhole_scan.scan | 0 script/AlvraScanWait.py | 69 ++++++++++++++++++++ script/Bernina_MonoScan_PDIM110.scan | 0 script/CD.scan | 0 script/Correlation/Correlation2.py | 2 +- script/Huberscan_LaserXrays.scan | 0 script/Huberscan_PIPS.scan | 0 script/Huberscan_PIPS_2.scan | 0 script/Huberscan_PIPS_Continuous.scan | 0 script/Huberscan_PIPS_Continuous2.scan | 0 script/Huberscan_PIPS_Continuous_All_PIDs.py | 0 script/Huberscan_PIPS_PBPS.scan | 0 script/Huberscan_PIPS_PBPS_continuous.scan | 0 script/IZERO_scan.scan | 0 script/Io_correlation.scan | 0 script/Io_target.scan | 0 script/Io_target_calibrated.scan | 0 script/KnifeEdge_Ioxos.scan | 0 script/LaserSpectrum.scan | 0 script/Laser_mirror_scan.scan | 0 script/Laser_mirror_scan_1.scan | 0 script/MonoScan.scan | 0 script/MonoScan_Ioxos.scan | 0 script/MonoScan_PBPS122.scan | 0 script/MonoScan_PBPS122_PIPS.scan | 0 script/MonoScan_PPR110.scan | 0 script/MonoScan_Tune.scan | 0 script/PALM_drift.scan | 0 script/PALM_lens.scan | 0 script/PALM_no_steak_x.scan | 0 script/PALM_no_steak_y.scan | 0 script/PALM_no_steak_z.scan | 0 script/PALM_steak_x.scan | 0 script/PALM_steak_y.scan | 0 script/PALM_steak_z.scan | 0 script/PBPS117_trigger_delay | 1 + script/PBPS122-PIPS-Correlation.scan | 0 script/PBPS122-PIPS2-Correlation.scan | 0 script/PSEN knife edge.scan | 0 script/PSEN-timeseries.scan | 0 script/PhotonDiag/PALM_drift.scan | 0 script/PhotonDiag/PALM_t0.scan | 2 +- script/SARES11-SPEC125.scan | 0 script/Tablescan_PIPS.scan | 0 script/Test1.scan | 0 script/Test2.scan | 0 script/TestMonoScan.scan | 0 script/Thzscan.scan | 0 script/TimeScan.scan | 0 script/incoupling_laser_pinhole_scan.scan | 0 script/rotation_scan.scan | 0 script/scan_alvra.py | 61 +++++++++++++++++ script/t0 scan | 0 script/test/Loading.py | 0 script/test/TestBsreadCamera.py | 21 ++++++ script/test/TestLscanCamServer.scan | 0 script/testEdwinChris | 0 script/tgfrog.scan | 0 script/time zero.scan | 0 script/timing yag.scan | 0 script/undulators/K-calc2.py | 0 script/unknown_PALM | 0 script/unknown_PALM_2 | 0 95 files changed, 254 insertions(+), 49 deletions(-) mode change 100644 => 100755 config/variables.properties mode change 100644 => 100755 devices/CamServer.properties mode change 100644 => 100755 devices/Camera Server.properties create mode 100644 devices/CameraServer.properties mode change 100644 => 100755 devices/Data pipeline.properties mode change 100644 => 100755 devices/Image Averager.properties mode change 100644 => 100755 devices/Time.properties mode change 100644 => 100755 devices/dp1.properties mode change 100644 => 100755 devices/dummy_motor.properties mode change 100644 => 100755 devices/image.properties mode change 100644 => 100755 devices/m1.properties mode change 100644 => 100755 devices/m2.properties mode change 100644 => 100755 devices/motor_x1.properties mode change 100644 => 100755 devices/p1.properties mode change 100644 => 100755 devices/src1.properties mode change 100644 => 100755 devices/src2.properties mode change 100644 => 100755 plugins/CameraCalibrationDialog.java mode change 100644 => 100755 plugins/Correlation.java mode change 100644 => 100755 plugins/Inventory.java mode change 100644 => 100755 plugins/ScreenPanel5.java mode change 100644 => 100755 plugins/ScreenPanel6.form mode change 100644 => 100755 plugins/ScreenPanel6.java mode change 100644 => 100755 script/1D_EOscan.scan mode change 100644 => 100755 script/1D_HUber_jet_scan.scan mode change 100644 => 100755 script/1D_Huber_pinhole_sca.scan mode change 100644 => 100755 script/1D_Huber_pinhole_scan.scan mode change 100644 => 100755 script/1D_Huber_scan.scan mode change 100644 => 100755 script/1D_delayline_scan.scan mode change 100644 => 100755 script/2D_Huber_pinhole_scan.scan create mode 100644 script/AlvraScanWait.py mode change 100644 => 100755 script/Bernina_MonoScan_PDIM110.scan mode change 100644 => 100755 script/CD.scan mode change 100644 => 100755 script/Correlation/Correlation2.py mode change 100644 => 100755 script/Huberscan_LaserXrays.scan mode change 100644 => 100755 script/Huberscan_PIPS.scan mode change 100644 => 100755 script/Huberscan_PIPS_2.scan mode change 100644 => 100755 script/Huberscan_PIPS_Continuous.scan mode change 100644 => 100755 script/Huberscan_PIPS_Continuous2.scan mode change 100644 => 100755 script/Huberscan_PIPS_Continuous_All_PIDs.py mode change 100644 => 100755 script/Huberscan_PIPS_PBPS.scan mode change 100644 => 100755 script/Huberscan_PIPS_PBPS_continuous.scan mode change 100644 => 100755 script/IZERO_scan.scan mode change 100644 => 100755 script/Io_correlation.scan mode change 100644 => 100755 script/Io_target.scan mode change 100644 => 100755 script/Io_target_calibrated.scan mode change 100644 => 100755 script/KnifeEdge_Ioxos.scan mode change 100644 => 100755 script/LaserSpectrum.scan mode change 100644 => 100755 script/Laser_mirror_scan.scan mode change 100644 => 100755 script/Laser_mirror_scan_1.scan mode change 100644 => 100755 script/MonoScan.scan mode change 100644 => 100755 script/MonoScan_Ioxos.scan mode change 100644 => 100755 script/MonoScan_PBPS122.scan mode change 100644 => 100755 script/MonoScan_PBPS122_PIPS.scan mode change 100644 => 100755 script/MonoScan_PPR110.scan mode change 100644 => 100755 script/MonoScan_Tune.scan mode change 100644 => 100755 script/PALM_drift.scan mode change 100644 => 100755 script/PALM_lens.scan mode change 100644 => 100755 script/PALM_no_steak_x.scan mode change 100644 => 100755 script/PALM_no_steak_y.scan mode change 100644 => 100755 script/PALM_no_steak_z.scan mode change 100644 => 100755 script/PALM_steak_x.scan mode change 100644 => 100755 script/PALM_steak_y.scan mode change 100644 => 100755 script/PALM_steak_z.scan create mode 100644 script/PBPS117_trigger_delay mode change 100644 => 100755 script/PBPS122-PIPS-Correlation.scan mode change 100644 => 100755 script/PBPS122-PIPS2-Correlation.scan mode change 100644 => 100755 script/PSEN knife edge.scan mode change 100644 => 100755 script/PSEN-timeseries.scan mode change 100644 => 100755 script/PhotonDiag/PALM_drift.scan mode change 100644 => 100755 script/PhotonDiag/PALM_t0.scan mode change 100644 => 100755 script/SARES11-SPEC125.scan mode change 100644 => 100755 script/Tablescan_PIPS.scan mode change 100644 => 100755 script/Test1.scan mode change 100644 => 100755 script/Test2.scan mode change 100644 => 100755 script/TestMonoScan.scan mode change 100644 => 100755 script/Thzscan.scan mode change 100644 => 100755 script/TimeScan.scan mode change 100644 => 100755 script/incoupling_laser_pinhole_scan.scan mode change 100644 => 100755 script/rotation_scan.scan create mode 100755 script/scan_alvra.py mode change 100644 => 100755 script/t0 scan mode change 100644 => 100755 script/test/Loading.py create mode 100644 script/test/TestBsreadCamera.py mode change 100644 => 100755 script/test/TestLscanCamServer.scan mode change 100644 => 100755 script/testEdwinChris mode change 100644 => 100755 script/tgfrog.scan mode change 100644 => 100755 script/time zero.scan mode change 100644 => 100755 script/timing yag.scan mode change 100644 => 100755 script/undulators/K-calc2.py mode change 100644 => 100755 script/unknown_PALM mode change 100644 => 100755 script/unknown_PALM_2 diff --git a/config/config.properties b/config/config.properties index 50d0ed3..83c647d 100755 --- a/config/config.properties +++ b/config/config.properties @@ -1,45 +1,62 @@ -#Wed Apr 28 10:05:51 CEST 2021 +#Thu Sep 04 11:39:10 CEST 2025 autoSaveScanData=true simulation=false -commandExecutionEvents=false -logDaysToLive=50 +xscanCrlogicChannel=null dataScanSaveOutput=false userAuthenticator= -logLevelConsole=Off -scanStreamerPort=-1 dataScanSaveScript=false -dataScanSaveSetpoints=false notifiedTasks=null parallelInitialization=false +fdaSerialization=false dataTransferPath=null saveConsoleSessionFiles=false -versionTrackingManual=true -dataTransferMode=null +xscanAppendSuffix=true hostName=null -userManagement=false -instanceName=AL disableEmbeddedAttributes=false -dataServerPort=-1 -hideServerMessages=false serverPort=8080 versionTrackingEnabled=true dataPath={data}/{year}_{month}/{date}/{date}_{time}_{name} serverEnabled=false -dataScanReleaseRecords=false depthDimension=0 -dataScanPreserveTypes=false logLevel=Info -dataScanFlushRecords=false -logPath={logs}/{date}_{time} dataLayout=default disableDataFileLogs=false -sessionHandling=null +dataScanSaveTimestamps=false +sessionHandling=Off terminalEnabled=false notificationLevel=Off terminalPort=3579 dataTransferUser=null +xscanContinuousUpdate=false +versionTrackingLogin=auto +noBytecodeFiles=false +versionTrackingRemote=https\://gitea.psi.ch/pshell_config/saresa.git +dataScanLazyTableCreation=false +pythonHome= +xscanMoveTimeout=600 +commandExecutionEvents=false +logDaysToLive=50 +xscanCrlogicSimulated=false +logLevelConsole=Off +filePermissionsConfig=Default +scanStreamerPort=-1 +dataScanSaveSetpoints=false +versionTrackingManual=true +dataTransferMode=Off +userManagement=false +instanceName=AL +dataServerPort=-1 +hideServerMessages=false +dataScanReleaseRecords=false +dataScanPreserveTypes=false +dataScanFlushRecords=false +logPath={logs}/{date}_{time} +filePermissionsLogs=Default +filePermissionsScripts=Default +xscanCrlogicPrefix=null +filePermissionsData=Default +xscanCrlogicAbortable=true createSessionFiles=false -versionTrackingLogin={context}/svcusr-hlapp_robot -versionTrackingRemote=git@git.psi.ch\:pshell_config/saresa.git dataProvider=h5 +xscanCrlogicIoc=null saveCommandStatistics=false diff --git a/config/setup.properties b/config/setup.properties index a8677d8..e4b10c3 100755 --- a/config/setup.properties +++ b/config/setup.properties @@ -1,23 +1,25 @@ -#Fri Apr 09 17:22:14 CEST 2021 +#Tue Aug 16 17:02:14 CEST 2022 sessionsPath={outp}/sessions scriptPath={home}/script -pluginsPath={home}/plugins configFileDevices={config}/devices.properties -consoleSessionsPath={sessions}/console -libraryPath={script}; {script}/Lib -configFilePlugins={config}/plugins.properties -contextPath={outp}/context +xscanPath={script} +queuePath={script} extensionsPath={home}/extensions configPath={home}/config configFileSessions={config}/sessions.properties userSessionsPath={sessions}/user dataPath={outp}/data -devicesPath={home}/devices configFileVariables={config}/variables.properties -configFileSettings={config}/settings.properties logPath={outp}/log wwwPath={home}/www -imagesPath={outp}/images configFile={config}/config.properties -scriptType=py configFileTasks={config}/tasks.properties +pluginsPath={home}/plugins +consoleSessionsPath={sessions}/console +libraryPath={script}; {script}/Lib +configFilePlugins={config}/plugins.properties +contextPath={outp}/context +devicesPath={home}/devices +configFileSettings={config}/settings.properties +imagesPath={outp}/images +scriptType=py diff --git a/config/variables.properties b/config/variables.properties old mode 100644 new mode 100755 index 48713b8..05f639d --- a/config/variables.properties +++ b/config/variables.properties @@ -1,2 +1,4 @@ -#Tue Mar 23 17:21:24 CET 2021 -FileSequentialNumber=594 +#Thu May 08 18:44:31 CEST 2025 +LastRunDate=250508 +FileSequentialNumber=776 +DaySequentialNumber=4 diff --git a/devices/CamServer.properties b/devices/CamServer.properties old mode 100644 new mode 100755 diff --git a/devices/Camera Server.properties b/devices/Camera Server.properties old mode 100644 new mode 100755 diff --git a/devices/CameraServer.properties b/devices/CameraServer.properties new file mode 100644 index 0000000..a4f1ba1 --- /dev/null +++ b/devices/CameraServer.properties @@ -0,0 +1,25 @@ +#Thu Jan 19 10:50:45 CET 2023 +spatialCalOffsetY=NaN +spatialCalOffsetX=NaN +colormapLogarithmic=false +scale=1.0 +grayscale=false +spatialCalScaleX=NaN +spatialCalScaleY=NaN +colormapMax=NaN +rescaleOffset=0.0 +roiWidth=-1 +colormap=Grayscale +invert=false +colormapMin=NaN +rotation=0.0 +rotationCrop=false +rescaleFactor=1.0 +spatialCalUnits=mm +flipVertically=false +roiHeight=-1 +flipHorizontally=false +colormapAutomatic=false +roiY=0 +roiX=0 +transpose=false diff --git a/devices/CurrentCamera.properties b/devices/CurrentCamera.properties index 35288aa..6dc8d8b 100755 --- a/devices/CurrentCamera.properties +++ b/devices/CurrentCamera.properties @@ -1,30 +1,32 @@ -#Mon Apr 26 15:10:08 CEST 2021 -spatialCalOffsetY=0.0 -spatialCalOffsetX=0.0 +#Thu Aug 28 10:30:30 CEST 2025 +=250 +spatialCalOffsetY=-50.0 +spatialCalOffsetX=-50.0 colormapLogarithmic=false scale=1.0 grayscale=false -spatialCalScaleX=1.0 -spatialCalScaleY=1.0 +spatialCalScaleX=-1.0 +spatialCalScaleY=-1.0 +colormapMax=5035.0 serverURL=null -colormapMax=NaN rescaleOffset=0.0 roiWidth=-1 +50= colormap=Grayscale -imageWidth=1280 +imageWidth=750 invert=false -colormapMin=NaN +colormapMin=0.0 rotation=0.0 rotationCrop=false rescaleFactor=1.0 -imageHeight=1024 +imageHeight=776 spatialCalUnits=mm flipVertically=false roiHeight=-1 flipHorizontally=false -colormapAutomatic=false +colormapAutomatic=true roiY=0 roiX=0 transpose=false -regionStartX=0 -regionStartY=0 +regionStartX=300 +regionStartY=250 diff --git a/devices/Data pipeline.properties b/devices/Data pipeline.properties old mode 100644 new mode 100755 diff --git a/devices/Image Averager.properties b/devices/Image Averager.properties old mode 100644 new mode 100755 diff --git a/devices/Time.properties b/devices/Time.properties old mode 100644 new mode 100755 index f880b61..e759f30 --- a/devices/Time.properties +++ b/devices/Time.properties @@ -1,4 +1,4 @@ -#Mon Feb 03 15:08:35 CET 2020 +#Sat Mar 15 21:42:33 CET 2025 minValue=NaN unit=null offset=0.0 @@ -7,4 +7,5 @@ precision=-1 rotation=false sign_bit=0 scale=1.0 +description=null resolution=NaN diff --git a/devices/dispatcher.properties b/devices/dispatcher.properties index 2e8d6eb..6d2d336 100755 --- a/devices/dispatcher.properties +++ b/devices/dispatcher.properties @@ -1,11 +1,13 @@ -#Mon Nov 25 14:52:47 CET 2019 +#Wed Dec 13 10:51:53 CET 2023 sendStrategy=complete_all dropIncomplete=false keepListeningOnStop=false disableCompression=false parallelHandlerProcessing=true sendBuildChannelConfig=at_startup +analizeHeader=false sendAwaitFirstMessage=false +headerReservingAllocator=false socketType=DEFAULT validationInconsistency=keep_as_is byteBufferAllocator=false diff --git a/devices/dp1.properties b/devices/dp1.properties old mode 100644 new mode 100755 diff --git a/devices/dummy_motor.properties b/devices/dummy_motor.properties old mode 100644 new mode 100755 index 46d5432..e6d71bc --- a/devices/dummy_motor.properties +++ b/devices/dummy_motor.properties @@ -1,9 +1,10 @@ -#Tue Jun 16 19:34:40 CEST 2020 +#Tue Aug 16 17:02:17 CEST 2022 offset=0.0 maxValue=10.0 rotation=false precision=2 scale=1.0 +description=null estbilizationDelay=0 maxSpeed=10.0 resolution=NaN diff --git a/devices/image.properties b/devices/image.properties old mode 100644 new mode 100755 diff --git a/devices/m1.properties b/devices/m1.properties old mode 100644 new mode 100755 diff --git a/devices/m2.properties b/devices/m2.properties old mode 100644 new mode 100755 diff --git a/devices/motor_x1.properties b/devices/motor_x1.properties old mode 100644 new mode 100755 index 508a83c..8846114 --- a/devices/motor_x1.properties +++ b/devices/motor_x1.properties @@ -1,9 +1,10 @@ -#Wed Sep 18 18:04:41 CEST 2019 +#Tue Aug 16 17:02:17 CEST 2022 offset=0.0 maxValue=25.0 precision=4 rotation=false scale=1.0 +description=null estbilizationDelay=0 maxSpeed=3.0 resolution=0.001 diff --git a/devices/p1.properties b/devices/p1.properties old mode 100644 new mode 100755 diff --git a/devices/src1.properties b/devices/src1.properties old mode 100644 new mode 100755 diff --git a/devices/src2.properties b/devices/src2.properties old mode 100644 new mode 100755 diff --git a/plugins/CameraCalibrationDialog.java b/plugins/CameraCalibrationDialog.java old mode 100644 new mode 100755 diff --git a/plugins/Correlation.java b/plugins/Correlation.java old mode 100644 new mode 100755 diff --git a/plugins/Inventory.java b/plugins/Inventory.java old mode 100644 new mode 100755 diff --git a/plugins/ScreenPanel5.java b/plugins/ScreenPanel5.java old mode 100644 new mode 100755 diff --git a/plugins/ScreenPanel6.form b/plugins/ScreenPanel6.form old mode 100644 new mode 100755 diff --git a/plugins/ScreenPanel6.java b/plugins/ScreenPanel6.java old mode 100644 new mode 100755 diff --git a/script/1D_EOscan.scan b/script/1D_EOscan.scan old mode 100644 new mode 100755 diff --git a/script/1D_HUber_jet_scan.scan b/script/1D_HUber_jet_scan.scan old mode 100644 new mode 100755 diff --git a/script/1D_Huber_pinhole_sca.scan b/script/1D_Huber_pinhole_sca.scan old mode 100644 new mode 100755 diff --git a/script/1D_Huber_pinhole_scan.scan b/script/1D_Huber_pinhole_scan.scan old mode 100644 new mode 100755 diff --git a/script/1D_Huber_scan.scan b/script/1D_Huber_scan.scan old mode 100644 new mode 100755 diff --git a/script/1D_delayline_scan.scan b/script/1D_delayline_scan.scan old mode 100644 new mode 100755 diff --git a/script/2D_Huber_pinhole_scan.scan b/script/2D_Huber_pinhole_scan.scan old mode 100644 new mode 100755 diff --git a/script/AlvraScanWait.py b/script/AlvraScanWait.py new file mode 100644 index 0000000..4c876ef --- /dev/null +++ b/script/AlvraScanWait.py @@ -0,0 +1,69 @@ +IN_POSITION_BAND = 10.0 + + +#cam_server.start("SAROP21-PSRD103_sp", True) +#cam_server.start("SAROP21-PPRM102_sp", True) +#cam_server.start("SAROP21-PSRD103_sp", True) +#cam_server.start("SAROP11-PSCR106_sp", True) +#cam_server.start("SAROP11-PPRM122_sp", True) +#cam_server.start("SATOP21-PSCR162_sp", True) +#cam_server.stream.waitCacheChange(-1) +#i = cam_server.stream.getChild("intensity") +#iavg = create_averager(i, 20, interval = -1) + +#ycent = cam_server.stream.getChild("y_center_of_mass") +#ycentavg = create_averager(ycent, 20, interval = -1) +#xcent = cam_server.stream.getChild("x_center_of_mass") +#xcentavg = create_averager(xcent, 20, interval = -1) + + +#iode = Channel("SLAAR21-LSCP-DRS1FNS:CH2:BOXCAR.VALP") +#iavg = create_averager(diode, 30, interval = -1) + +Keithley = Channel("SATOP31-CSSU-PCEL1381:READOUT") +K_avg = create_averager(Keithley, 10, interval = -1) + +def beam_ok(): + return "Yes" + I0 = caget ("SATFE10-PEPG046:PHOTON-ENERGY-PER-PULSE-AVG") + + if I0 > 100: + return "Yes" + else : + return "No" + + +def before_sampling(rec): + while beam_ok() == "No": + time.sleep(0.1) + print(".") + +def after_sampling(rec): + if beam_ok() == "No": + rec.invalidate() + + +i0 = Channel("SATFE10-PEPG046:PHOTON-ENERGY-PER-PULSE-AVG") + +class DCM(RegisterBase): + def doWrite(self, value): + caput ("SAROP11-ARAMIS:ENERGY_SP", value) + time.sleep(0.5) + cawait('SAROP11-ODCM105:MOVING', 0, timeout = 20.0, type = 'i') + #cawait('SAROP11-ODCM105:DMOV', 1, timeout = 20.0, type = 'i') + #cawait('SFB_BEAM_ENERGY_ECOL:SUM-ERROR-OK', 1, timeout = 10.0, type = 'i') + if abs(value - self.read()) > IN_POSITION_BAND : + raise Exception("Cannot set mono") + def doRead(self): + return caget("SAROP11-ARAMIS:ENERGY") + +alvra = DCM() +alvra.initialize() +i0 = Channel("SARFE10-PBPG050:PHOTON-ENERGY-PER-PULSE-US") +#acc = Channel("SARCL02-MBND100:P-READ") +#k = Channel("SARUN-UIND-MOT:KALL.VAL") +Theta=Channel("SAROP11-ODCM105:RX12.RBV") +Gap =Channel("SAROP11-ODCM105:T2.RBV") + +#lscan( alvra, [Theta,Gap], 10000.0, 10001.0 ,0.002,0.2,setpoints=True) +lscan( alvra, [Theta,Gap], 2500.0, 3000.0 ,10.0 ,2 ,setpoints=True, passes=2,zigzag=True) diff --git a/script/Bernina_MonoScan_PDIM110.scan b/script/Bernina_MonoScan_PDIM110.scan old mode 100644 new mode 100755 diff --git a/script/CD.scan b/script/CD.scan old mode 100644 new mode 100755 diff --git a/script/Correlation/Correlation2.py b/script/Correlation/Correlation2.py old mode 100644 new mode 100755 index 10903a7..236de6b --- a/script/Correlation/Correlation2.py +++ b/script/Correlation/Correlation2.py @@ -119,7 +119,7 @@ try: _stream.initialize() _stream.start(True) if _camname != None: - shared = _camname.endswith("_sp1") + shared = _camname.endswith("_sp") print "Camera: " , _camname, " shared: ", shared cam_server.start(_camname, shared ) diff --git a/script/Huberscan_LaserXrays.scan b/script/Huberscan_LaserXrays.scan old mode 100644 new mode 100755 diff --git a/script/Huberscan_PIPS.scan b/script/Huberscan_PIPS.scan old mode 100644 new mode 100755 diff --git a/script/Huberscan_PIPS_2.scan b/script/Huberscan_PIPS_2.scan old mode 100644 new mode 100755 diff --git a/script/Huberscan_PIPS_Continuous.scan b/script/Huberscan_PIPS_Continuous.scan old mode 100644 new mode 100755 diff --git a/script/Huberscan_PIPS_Continuous2.scan b/script/Huberscan_PIPS_Continuous2.scan old mode 100644 new mode 100755 diff --git a/script/Huberscan_PIPS_Continuous_All_PIDs.py b/script/Huberscan_PIPS_Continuous_All_PIDs.py old mode 100644 new mode 100755 diff --git a/script/Huberscan_PIPS_PBPS.scan b/script/Huberscan_PIPS_PBPS.scan old mode 100644 new mode 100755 diff --git a/script/Huberscan_PIPS_PBPS_continuous.scan b/script/Huberscan_PIPS_PBPS_continuous.scan old mode 100644 new mode 100755 diff --git a/script/IZERO_scan.scan b/script/IZERO_scan.scan old mode 100644 new mode 100755 diff --git a/script/Io_correlation.scan b/script/Io_correlation.scan old mode 100644 new mode 100755 diff --git a/script/Io_target.scan b/script/Io_target.scan old mode 100644 new mode 100755 diff --git a/script/Io_target_calibrated.scan b/script/Io_target_calibrated.scan old mode 100644 new mode 100755 diff --git a/script/KnifeEdge_Ioxos.scan b/script/KnifeEdge_Ioxos.scan old mode 100644 new mode 100755 diff --git a/script/LaserSpectrum.scan b/script/LaserSpectrum.scan old mode 100644 new mode 100755 diff --git a/script/Laser_mirror_scan.scan b/script/Laser_mirror_scan.scan old mode 100644 new mode 100755 diff --git a/script/Laser_mirror_scan_1.scan b/script/Laser_mirror_scan_1.scan old mode 100644 new mode 100755 diff --git a/script/MonoScan.scan b/script/MonoScan.scan old mode 100644 new mode 100755 diff --git a/script/MonoScan_Ioxos.scan b/script/MonoScan_Ioxos.scan old mode 100644 new mode 100755 diff --git a/script/MonoScan_PBPS122.scan b/script/MonoScan_PBPS122.scan old mode 100644 new mode 100755 diff --git a/script/MonoScan_PBPS122_PIPS.scan b/script/MonoScan_PBPS122_PIPS.scan old mode 100644 new mode 100755 diff --git a/script/MonoScan_PPR110.scan b/script/MonoScan_PPR110.scan old mode 100644 new mode 100755 diff --git a/script/MonoScan_Tune.scan b/script/MonoScan_Tune.scan old mode 100644 new mode 100755 diff --git a/script/PALM_drift.scan b/script/PALM_drift.scan old mode 100644 new mode 100755 diff --git a/script/PALM_lens.scan b/script/PALM_lens.scan old mode 100644 new mode 100755 diff --git a/script/PALM_no_steak_x.scan b/script/PALM_no_steak_x.scan old mode 100644 new mode 100755 diff --git a/script/PALM_no_steak_y.scan b/script/PALM_no_steak_y.scan old mode 100644 new mode 100755 diff --git a/script/PALM_no_steak_z.scan b/script/PALM_no_steak_z.scan old mode 100644 new mode 100755 diff --git a/script/PALM_steak_x.scan b/script/PALM_steak_x.scan old mode 100644 new mode 100755 diff --git a/script/PALM_steak_y.scan b/script/PALM_steak_y.scan old mode 100644 new mode 100755 diff --git a/script/PALM_steak_z.scan b/script/PALM_steak_z.scan old mode 100644 new mode 100755 diff --git a/script/PBPS117_trigger_delay b/script/PBPS117_trigger_delay new file mode 100644 index 0000000..2d23d57 --- /dev/null +++ b/script/PBPS117_trigger_delay @@ -0,0 +1 @@ +[ "Linear", [ [ "Channel", "SAROP11-CVME-PBPS2:Lnk9Reg65", 1003.0, 1005.0, 0.1 ] ], [ [ "Channel", "SAROP11-CVME-PBPS2:Lnk9Ch13-DATA-SUM", 10, 0.1, "Enabled" ] ], false, [ ], "", 1, 1.0, 0.0, false, false, true, true, "", "", " ", "", 0, null, null, "Positioner", false, true ] \ No newline at end of file diff --git a/script/PBPS122-PIPS-Correlation.scan b/script/PBPS122-PIPS-Correlation.scan old mode 100644 new mode 100755 diff --git a/script/PBPS122-PIPS2-Correlation.scan b/script/PBPS122-PIPS2-Correlation.scan old mode 100644 new mode 100755 diff --git a/script/PSEN knife edge.scan b/script/PSEN knife edge.scan old mode 100644 new mode 100755 diff --git a/script/PSEN-timeseries.scan b/script/PSEN-timeseries.scan old mode 100644 new mode 100755 diff --git a/script/PhotonDiag/PALM_drift.scan b/script/PhotonDiag/PALM_drift.scan old mode 100644 new mode 100755 diff --git a/script/PhotonDiag/PALM_t0.scan b/script/PhotonDiag/PALM_t0.scan old mode 100644 new mode 100755 index 5920ae2..03ce867 --- a/script/PhotonDiag/PALM_t0.scan +++ b/script/PhotonDiag/PALM_t0.scan @@ -1 +1 @@ -[ "Linear", [ [ "Channel", "SLAAR11-LMOT-M423:MOT.VAL", 100.0, 110.0, 0.03 ] ], [ [ "Channel", "SAROP11-PALMK118:CH1_BUFFER", 5, 0.02, "Enabled" ], [ "Channel", "SAROP11-PALMK118:CH2_BUFFER", 5, 0.02, "Enabled" ] ], false, [ ], "", 1, 1.0, 0.0, false, false, true, true, "", "", "", "", 0, null, null, "Positioner", false, true ] \ No newline at end of file +[ "Linear", [ [ "Channel", "SLAAR11-LMOT-M423:MOT.VAL", 90.0, 120.0, 0.03 ] ], [ [ "Channel", "SAROP11-PALMK118:CH1_BUFFER", 10, 0.02, "Enabled" ], [ "Channel", "SAROP11-PALMK118:CH2_BUFFER", 10, 0.02, "Enabled" ] ], false, [ ], "", 1, 1.0, 0.0, false, false, true, true, "", "", "", "", 0, null, null, "Positioner", false, true ] \ No newline at end of file diff --git a/script/SARES11-SPEC125.scan b/script/SARES11-SPEC125.scan old mode 100644 new mode 100755 diff --git a/script/Tablescan_PIPS.scan b/script/Tablescan_PIPS.scan old mode 100644 new mode 100755 diff --git a/script/Test1.scan b/script/Test1.scan old mode 100644 new mode 100755 diff --git a/script/Test2.scan b/script/Test2.scan old mode 100644 new mode 100755 diff --git a/script/TestMonoScan.scan b/script/TestMonoScan.scan old mode 100644 new mode 100755 diff --git a/script/Thzscan.scan b/script/Thzscan.scan old mode 100644 new mode 100755 diff --git a/script/TimeScan.scan b/script/TimeScan.scan old mode 100644 new mode 100755 diff --git a/script/incoupling_laser_pinhole_scan.scan b/script/incoupling_laser_pinhole_scan.scan old mode 100644 new mode 100755 diff --git a/script/rotation_scan.scan b/script/rotation_scan.scan old mode 100644 new mode 100755 diff --git a/script/scan_alvra.py b/script/scan_alvra.py new file mode 100755 index 0000000..b5b4dd6 --- /dev/null +++ b/script/scan_alvra.py @@ -0,0 +1,61 @@ +IN_POSITION_BAND = 10.0 + + +#cam_server.start("SAROP21-PSRD103_sp", True) +#cam_server.start("SAROP21-PPRM102_sp", True) +#cam_server.start("SAROP21-PSRD103_sp", True) +#cam_server.start("SAROP11-PSCR106_sp", True) +#cam_server.start("SAROP11-PPRM122_sp", True) +cam_server.start("SATOP21-PSCR162_sp", True) +cam_server.stream.waitCacheChange(-1) +i = cam_server.stream.getChild("intensity") +iavg = create_averager(i, 20, interval = -1) + +#ycent = cam_server.stream.getChild("y_center_of_mass") +#ycentavg = create_averager(ycent, 20, interval = -1) +#xcent = cam_server.stream.getChild("x_center_of_mass") +#xcentavg = create_averager(xcent, 20, interval = -1) + + +#iode = Channel("SLAAR21-LSCP-DRS1FNS:CH2:BOXCAR.VALP") +#iavg = create_averager(diode, 30, interval = -1) + +def beam_ok(): + I0 = caget ("SATFE10-PEPG046:PHOTON-ENERGY-PER-PULSE-AVG") + if I0 > 100: + return "Yes" + else : + return "No" + + +def before_sampling(rec): + while beam_ok() == "No": + time.sleep(0.1) + print(".") + +def after_sampling(rec): + if beam_ok() == "No": + rec.invalidate() + + +i0 = Channel("SATFE10-PEPG046:PHOTON-ENERGY-PER-PULSE-AVG") + +class DCM(RegisterBase): + def doWrite(self, value): + caput ("ATHOS:SetEnergy", value) + time.sleep(0.5) + cawait('ATHOS:MOVING', 0, timeout = 10.0, type = 'i') + cawait('SFB_BEAM_ENERGY_ECOL:SUM-ERROR-OK', 1, timeout = 10.0, type = 'i') + if abs(value - self.read()) > IN_POSITION_BAND : + raise Exception("Cannot set mono") + def doRead(self): + return caget("SAROP11-ODCM105:ENERGY") + +alvra = DCM() +alvra.initialize() +i0 = Channel("SARFE10-PBPG050:PHOTON-ENERGY-PER-PULSE-US") +acc = Channel("SARCL02-MBND100:P-READ") +k = Channel("SARUN-UIND-MOT:KALL.VAL") +lscan( alvra, [iavg,i0,k,acc,ycentavg,xcentavg], 4930.0, 5030.0,1.0,0.2) + +#scan( (pitch2,alvra), [diode,i0], (5.0,2100.0),(8.0,2300.0),(0.1,1.0), latency= 0.2, before_read=before_sampling, after_read=after_ diff --git a/script/t0 scan b/script/t0 scan old mode 100644 new mode 100755 diff --git a/script/test/Loading.py b/script/test/Loading.py old mode 100644 new mode 100755 diff --git a/script/test/TestBsreadCamera.py b/script/test/TestBsreadCamera.py new file mode 100644 index 0000000..f662d2d --- /dev/null +++ b/script/test/TestBsreadCamera.py @@ -0,0 +1,21 @@ +import ch.psi.pshell.bs.ProviderConfig.SocketType as SocketType +CAMERA = "SARES11-XMI125-C4P1" +#CAMERA = "SARES11-SPEC125-M1" + +CAMERA_URL = caget(CAMERA + ":BSREADCONFIG").replace("tcp://daq", "tcp://") +#CAMERA_URL= "tcp://sf-sioc-cs-83:9020" +#CAMERA_URL= "tcp://sf-sioc-cs-64:9000" + +print CAMERA_URL +st1 = Stream("st1", CAMERA_URL, SocketType.PULL) +st1.initialize() +st1.start() +st1.waitCacheChange(3000) + +show_panel(st1) + +#try: +# r=bscan (st1, records=10, timeout=10.0, domain_axis="Time", save=False, enabled_plots=[st1,]) +# v= st1.getValues() +#finally: +# st1.close() diff --git a/script/test/TestLscanCamServer.scan b/script/test/TestLscanCamServer.scan old mode 100644 new mode 100755 diff --git a/script/testEdwinChris b/script/testEdwinChris old mode 100644 new mode 100755 diff --git a/script/tgfrog.scan b/script/tgfrog.scan old mode 100644 new mode 100755 diff --git a/script/time zero.scan b/script/time zero.scan old mode 100644 new mode 100755 diff --git a/script/timing yag.scan b/script/timing yag.scan old mode 100644 new mode 100755 diff --git a/script/undulators/K-calc2.py b/script/undulators/K-calc2.py old mode 100644 new mode 100755 diff --git a/script/unknown_PALM b/script/unknown_PALM old mode 100644 new mode 100755 diff --git a/script/unknown_PALM_2 b/script/unknown_PALM_2 old mode 100644 new mode 100755