05_2022
This commit is contained in:
+31
-26
@@ -1,45 +1,50 @@
|
||||
#Thu May 20 15:37:42 CEST 2021
|
||||
hostName=null
|
||||
userManagement=false
|
||||
instanceName=MicroXAS
|
||||
disableEmbeddedAttributes=true
|
||||
#Tue Oct 26 11:22:43 CEST 2021
|
||||
autoSaveScanData=true
|
||||
simulation=false
|
||||
dataServerPort=-1
|
||||
dataScanSaveOutput=false
|
||||
userAuthenticator=
|
||||
dataScanSaveScript=false
|
||||
notifiedTasks=null
|
||||
parallelInitialization=false
|
||||
dataTransferPath=
|
||||
saveConsoleSessionFiles=false
|
||||
hostName=null
|
||||
disableEmbeddedAttributes=true
|
||||
serverPort=8080
|
||||
hideServerMessages=false
|
||||
versionTrackingEnabled=true
|
||||
dataPath={data}/{year}_{month}/{date}/{date}{time}_{name}
|
||||
serverEnabled=false
|
||||
commandExecutionEvents=false
|
||||
logDaysToLive=7
|
||||
dataScanReleaseRecords=false
|
||||
depthDimension=0
|
||||
dataScanPreserveTypes=false
|
||||
dataScanSaveOutput=false
|
||||
logLevel=Info
|
||||
dataScanFlushRecords=true
|
||||
logPath={logs}/{date}_{time}
|
||||
dataLayout=fda
|
||||
disableDataFileLogs=false
|
||||
sessionHandling=On
|
||||
terminalEnabled=false
|
||||
notificationLevel=Off
|
||||
userAuthenticator=
|
||||
logLevelConsole=Off
|
||||
terminalPort=3579
|
||||
scanStreamerPort=-1
|
||||
dataScanSaveScript=false
|
||||
dataTransferUser=
|
||||
dataScanSaveSetpoints=false
|
||||
notifiedTasks=null
|
||||
parallelInitialization=false
|
||||
dataTransferPath=
|
||||
createSessionFiles=false
|
||||
saveConsoleSessionFiles=false
|
||||
versionTrackingLogin={context}/svcusr-hlapp_robot
|
||||
versionTrackingManual=true
|
||||
noBytecodeFiles=false
|
||||
versionTrackingRemote=git@git.psi.ch\:pshell_config/x05la.git
|
||||
dataProvider=fda
|
||||
commandExecutionEvents=false
|
||||
logDaysToLive=7
|
||||
logLevelConsole=Off
|
||||
filePermissionsConfig=Default
|
||||
scanStreamerPort=-1
|
||||
dataScanSaveSetpoints=false
|
||||
versionTrackingManual=true
|
||||
dataTransferMode=Off
|
||||
userManagement=false
|
||||
instanceName=MicroXAS
|
||||
dataServerPort=-1
|
||||
hideServerMessages=false
|
||||
dataScanReleaseRecords=false
|
||||
dataScanPreserveTypes=false
|
||||
dataScanFlushRecords=true
|
||||
logPath={logs}/{date}_{time}
|
||||
filePermissionsLogs=Default
|
||||
filePermissionsScripts=Default
|
||||
filePermissionsData=Default
|
||||
createSessionFiles=false
|
||||
dataProvider=fda
|
||||
saveCommandStatistics=false
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#Thu May 20 14:49:07 CEST 2021
|
||||
#Thu Jun 24 11:56:30 CEST 2021
|
||||
environment=prod
|
||||
testParameters=-testenv -user slssim\:slssim
|
||||
sourceFolder=.
|
||||
prodParameters=\ -user slssim\:slssim
|
||||
devParameters=-devenv -user slssim\:slssim
|
||||
ownerGroup=
|
||||
ownerGroup=Dario Ferreira Sanchez
|
||||
type=raw
|
||||
parameters=-ingest -allowexistingsource -noninteractive -autoarchive
|
||||
creationLocation=/PSI
|
||||
principalInvestigator=
|
||||
principalInvestigator=Dario Ferreira Sanchez
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#Thu May 20 15:32:22 CEST 2021
|
||||
Energy=Double
|
||||
Sample=String
|
||||
#Fri May 28 14:21:16 CEST 2021
|
||||
Energy=Double;U L3 edge
|
||||
Sample=String;Daphnia mangna exposed to U
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
#Thu May 20 14:45:31 CEST 2021
|
||||
SessionCounter=1
|
||||
CurrentSession=1
|
||||
#Fri Aug 13 15:09:49 CEST 2021
|
||||
SessionCounter=8
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#Thu May 20 14:45:13 CEST 2021
|
||||
#Mon May 23 10:04:41 CEST 2022
|
||||
FdaBrowser=true
|
||||
|
||||
@@ -1 +1 @@
|
||||
Tasks/DetectorsCheck=10.0
|
||||
#Tasks/DetectorsCheck=-1.0;1.0
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#Thu May 20 15:37:42 CEST 2021
|
||||
FileSequentialNumber=24
|
||||
#Sun May 22 02:36:31 CEST 2022
|
||||
LastRunDate=220414
|
||||
FileSequentialNumber=34
|
||||
DaySequentialNumber=0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#print "Detectors Check"
|
||||
|
||||
|
||||
|
||||
"""
|
||||
for name, info in DETECTORS.items():
|
||||
path = info["path"]
|
||||
try:
|
||||
@@ -12,5 +12,22 @@ for name, info in DETECTORS.items():
|
||||
info["enabled"] = False
|
||||
#print " error"
|
||||
|
||||
"""
|
||||
|
||||
|
||||
def check_dev(name):
|
||||
info = DETECTORS[name]
|
||||
path = info["path"]
|
||||
try:
|
||||
caget_str(path)
|
||||
info["enabled"] = True
|
||||
return name + " ok"
|
||||
except:
|
||||
info["enabled"] = False
|
||||
return name + " error"
|
||||
|
||||
functions = []
|
||||
for name, info in DETECTORS.items():
|
||||
functions.append((check_dev,(name,)))
|
||||
parallelize(*functions)
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
def on_change_data_path(path):
|
||||
if path is not None:
|
||||
print "Data path: " + str(path)
|
||||
raw_data_folder = path + "/raw_data"
|
||||
os.makedirs(raw_data_folder)
|
||||
#with open(raw_data_folder + "/test.txt", "w") as f:
|
||||
# f.write("Success")
|
||||
for name, info in DETECTORS.items():
|
||||
log(name + " enabled = " + str(info["enabled"]))
|
||||
if info["enabled"]:
|
||||
channel_path = info["path"]
|
||||
caput_str(channel_path, raw_data_folder + "/" + name)
|
||||
|
||||
def check_detector(name, raw_data_folder):
|
||||
info = DETECTORS[name]
|
||||
dev_path = raw_data_folder + "/" + name
|
||||
channel_path = info["path"]
|
||||
try:
|
||||
caget_str(channel_path)
|
||||
print "OK: ", name
|
||||
info["enabled"] = True
|
||||
channel_path = info["path"]
|
||||
caput_str(channel_path, dev_path)
|
||||
return name + " ok"
|
||||
except:
|
||||
print "ERROR: ", name
|
||||
info["enabled"] = False
|
||||
return name + " error"
|
||||
finally:
|
||||
log(name + " enabled = " + str(info["enabled"])+ " folder = " + str(dev_path))
|
||||
|
||||
def check_detectors(raw_data_folder, timeout = 0.5):
|
||||
functions = []
|
||||
for name, info in DETECTORS.items():
|
||||
functions.append((check_detector,(name,raw_data_folder)))
|
||||
r = fork(*functions)
|
||||
|
||||
chrono = Chrono()
|
||||
while True:
|
||||
if not False in [f.isDone() for f in r]:
|
||||
break
|
||||
if timeout >0:
|
||||
if chrono.isTimeout(int(timeout*1000)):
|
||||
break
|
||||
time.sleep(0.01)
|
||||
|
||||
|
||||
r = check_detectors("/sls/X05LA/Data1/x05laop/2022_04/20220411/")
|
||||
log("QUit", False)
|
||||
+58
-4
@@ -22,7 +22,8 @@ crlogic_config["class"] = "ch.psi.pshell.crlogic.CrlogicScan"
|
||||
run("CPython/wrapper")
|
||||
|
||||
DETECTORS={ \
|
||||
'Eiger4m': {"path":"X05LA-ES1-EIGER1:cam1:FilePath", "enabled": False}, \
|
||||
'Eiger4m/scan': {"path":"X05LA-ES1-EIGER1:cam1:FilePath", "enabled": False}, \
|
||||
'FalconX/scan': {"path":"X05LA-SITORO:HDF1:FilePath", "enabled": False}, \
|
||||
'XRayEye': {"path":"X05LA-ES2-GIGE01:TIFF1:FilePath", "enabled": False} \
|
||||
}
|
||||
|
||||
@@ -62,19 +63,60 @@ def on_command_started(info):
|
||||
|
||||
def on_command_finished(info):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
def check_detector_raw_data_folder(name, raw_data_folder):
|
||||
info = DETECTORS[name]
|
||||
dev_path = raw_data_folder + "/" + name
|
||||
channel_path = info["path"]
|
||||
try:
|
||||
caget_str(channel_path)
|
||||
info["enabled"] = True
|
||||
channel_path = info["path"]
|
||||
caput_str(channel_path, dev_path)
|
||||
return name + " ok"
|
||||
except:
|
||||
info["enabled"] = False
|
||||
return name + " error"
|
||||
finally:
|
||||
log(name + " enabled = " + str(info["enabled"])+ " folder = " + str(dev_path))
|
||||
|
||||
_detector_check_futures = None
|
||||
|
||||
def check_detectors_raw_data_folders(raw_data_folder, timeout = 0.5):
|
||||
global _detector_check_futures
|
||||
if _detector_check_futures is not None:
|
||||
join(_detector_check_futures)
|
||||
|
||||
functions = []
|
||||
for name, info in DETECTORS.items():
|
||||
functions.append((check_detector_raw_data_folder,(name,raw_data_folder)))
|
||||
_detector_check_futures = fork(*functions)
|
||||
|
||||
chrono = Chrono()
|
||||
while True:
|
||||
if not False in [f.isDone() for f in _detector_check_futures]:
|
||||
break
|
||||
if timeout >0:
|
||||
if chrono.isTimeout(int(timeout*1000)):
|
||||
break
|
||||
time.sleep(0.01)
|
||||
|
||||
def on_change_data_path(path):
|
||||
if path is not None:
|
||||
print "Data path: " + str(path)
|
||||
raw_data_folder = path + "/raw_data"
|
||||
os.makedirs(raw_data_folder)
|
||||
#with open(raw_data_folder + "/test.txt", "w") as f:
|
||||
# f.write("Success")
|
||||
|
||||
"""
|
||||
for name, info in DETECTORS.items():
|
||||
log(name + " enabled = " + str(info["enabled"]))
|
||||
if info["enabled"]:
|
||||
channel_path = info["path"]
|
||||
caput_str(channel_path, raw_data_folder + "/" + name)
|
||||
"""
|
||||
check_detectors_raw_data_folders(raw_data_folder)
|
||||
|
||||
|
||||
def on_session_started(id):
|
||||
@@ -82,3 +124,15 @@ def on_session_started(id):
|
||||
|
||||
def on_session_finished(id):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
###################################################################################################
|
||||
# System utiomities
|
||||
###################################################################################################
|
||||
|
||||
def memory():
|
||||
import java.lang.Runtime as Runtime
|
||||
r=Runtime.getRuntime()
|
||||
print "Used: ", r.totalMemory()
|
||||
print "Max : ", r.maxMemory()
|
||||
@@ -0,0 +1 @@
|
||||
[ [ [ false, "/sls/X05LA/Data1/x05laop/2021_08/20210825/noXRD_XRF_otf_8400eV_200ms_XY_F8Bte5_zoom1.xml", "", "Resume", "Disabled" ], [ false, "/sls/X05LA/Data1/x05laop/2021_08/20210825/noXRD_XRF_otf_8400eV_200ms_XY_F8Bte5_zoom2.xml", "", "Resume", "Disabled" ], [ false, "/sls/X05LA/Data1/x05laop/2021_08/20210825/noXRD_XRF_otf_8400eV_200ms_XY_F8Bte5_zoom2.xml", "", "Resume", "Disabled" ], [ true, "/sls/X05LA/Data1/x05laop/2021_08/20210825/noXRD_XRF_otf_8400eV_200ms_XY_F2BteSti_zoom1.xml", "", "Resume", "Success" ], [ true, "/sls/X05LA/Data1/x05laop/2021_08/20210825/noXRD_XRF_otf_8400eV_200ms_XY_F2BteSti_zoom2.xml", "", "Resume", "Success" ], [ true, "/sls/X05LA/Data1/x05laop/2021_08/20210825/noXRD_XRF_otf_8400eV_200ms_XY_F2BteSti_zoom4.xml", "", "Resume", "Success" ], [ true, "/sls/X05LA/Data1/x05laop/2021_08/20210825/noXRD_XRF_otf_8400eV_200ms_XY_F2BteSti_zoom3.xml", "", "Resume", "Success" ] ] ]
|
||||
Reference in New Issue
Block a user