mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
examples directory with config files and scripts added
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorsPackage@33 08cae9ef-cb74-4d14-b03a-d7ea46f178d7
This commit is contained in:
36
examples/scripts/.parab
Normal file
36
examples/scripts/.parab
Normal file
@ -0,0 +1,36 @@
|
||||
header before
|
||||
Thu May 31 11:28:55 CEST 2012
|
||||
run=-1
|
||||
acquisition time = 1.000000 second(s)
|
||||
mythen gain mode = standard
|
||||
threshold energy = 6255 eV
|
||||
bad channel list = /sls/X04SA/data/x04sa/newMythenSoftware/cal/bad_both.chans
|
||||
angle calibration conversion = /sls/X04SA/data/x04sa/newMythenSoftware/cal/ang_both_20120422_good2.off
|
||||
beamline offset = 5.088000 deg
|
||||
fine offset = 0.000000 deg
|
||||
Flat field corrections = 0.000000
|
||||
Dead time corrections tau = 0 ns
|
||||
X04SA-ES2-TH2:RO.RBV 11.99985 deg
|
||||
X04SA-OP-MOX2:ROX.RBV 9.17041130 deg
|
||||
X04SA-OP-MOX1:ROX.RBV 9.17683938 deg
|
||||
X04SA-DCM:E2 12.4054 keV
|
||||
X04SA-ID-GAP:READ 5.015 mm
|
||||
ARIDI-PCT:CURRENT 401 mA
|
||||
X04SA-ES2-OVEN:TEMP_RBV 1768.00 C
|
||||
X04SA-ES2-SAM:TR3 0.00000 mm
|
||||
X04SA-ES2-SAM:TR2 0.00000 mm
|
||||
X04SA-ES2-SAM:TR1 0.00000 mm
|
||||
X04SA-ES2-LT1:TR2.RBV 1213.25000 mm
|
||||
X04SA-ES2-SV1:t2.D 0.090
|
||||
X04SA-ES2-SV1:t2.C 1.800
|
||||
X04SA-ES2-SH1:t2.D 0.150
|
||||
X04SA-ES2-SH1:t2.C 8.300
|
||||
X04SA-ES2-FI8:SET "Out" (SEVR:INVALID STAT:UDF)
|
||||
X04SA-ES2-SC:CH6 46071870
|
||||
Thu May 31 11:29:01 CEST 2012
|
||||
header after
|
||||
X04SA-ES2-SC:CH6 46177281
|
||||
X04SA-ES2-TH2:RO.RBV 11.99985 deg
|
||||
X04SA-ID-GAP:READ 5.015 mm
|
||||
ARIDI-PCT:CURRENT 401 mA
|
||||
X04SA-ES2-OVEN:TEMP_RBV 1768.00 C
|
142
examples/scripts/HeaderBeforeAfter.awk
Executable file
142
examples/scripts/HeaderBeforeAfter.awk
Executable file
@ -0,0 +1,142 @@
|
||||
#! /bin/awk -f
|
||||
|
||||
# this is an awk script to start a run
|
||||
# you first need to run inimodule.awk to initialize
|
||||
# the pattern, set Vc and set the trimbits
|
||||
#
|
||||
|
||||
#####################################################################
|
||||
# revision history #
|
||||
#####################################################################
|
||||
# 31.10.2001 first version #
|
||||
#####################################################################
|
||||
# #
|
||||
# Bernd Schmitt #
|
||||
# #
|
||||
# bernd.schmitt@psi.ch #
|
||||
# #
|
||||
#####################################################################
|
||||
# #
|
||||
# modifications: #
|
||||
# #
|
||||
# 1.3.2002 BS adapted for use with DCB #
|
||||
# #
|
||||
# 25.5.2002 BS adapted to new convert program #
|
||||
# #
|
||||
# 29.5.2002 sleep -> usleep for meas. time , TS #
|
||||
# #
|
||||
#####################################################################
|
||||
|
||||
BEGIN {
|
||||
|
||||
# initialize variables
|
||||
NPAR=3
|
||||
|
||||
PAR[1]="nrun"
|
||||
PAR[2]="fn"
|
||||
PAR[3]="par"
|
||||
|
||||
# initialize default values
|
||||
|
||||
|
||||
|
||||
PARVAL[1] = 100
|
||||
PARVAL[2] = "microstrip_july2007"
|
||||
PARVAL[3]=0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
printf("\n\nnumber of command line arguments: %i (incl. command)\n\n", ARGC);
|
||||
|
||||
# read command line defined variables
|
||||
if (ARGC>1) {
|
||||
printf("\n\nnumber of command line arguments: %i (incl. command)\n\n", ARGC);
|
||||
for (i=1; i<=ARGC; i++) {
|
||||
printf("%s \n", ARGV[i]);
|
||||
nsplit=split(ARGV[i],array,"=")
|
||||
VAR = array[1];
|
||||
VAL = array[2];
|
||||
|
||||
for (j=1; j<=NPAR; j++) {
|
||||
if ( VAR==PAR[j] ) {
|
||||
PARVAL[j] = VAL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
run=PARVAL[1]
|
||||
fn=PARVAL[2]
|
||||
par=PARVAL[3]
|
||||
|
||||
|
||||
# print command line arguments
|
||||
for (i=1; i<=NPAR; i++){
|
||||
printf("\t... %2i.\t%7s = %s\n", i, PAR[i], PARVAL[i] );
|
||||
}
|
||||
printf("\n\n");
|
||||
|
||||
# generate parameter file
|
||||
|
||||
fnamep=fn".parab"
|
||||
printf("header before\n")>> fnamep
|
||||
system("date >>"fnamep)
|
||||
printf("run=%i \n", run ) >> fnamep
|
||||
|
||||
#print detector parameters to file
|
||||
if (par==1) {
|
||||
|
||||
command="sls_detector_get exptime| awk -F \" \" '{print $2}'"
|
||||
command | getline var
|
||||
printf("acquisition time = %11.6f second(s)\n", var) >> fnamep
|
||||
|
||||
command="sls_detector_get settings| awk -F \" \" '{print $2}'"
|
||||
command | getline var
|
||||
printf("settings = %s\n", var) >> fnamep;
|
||||
|
||||
command="sls_detector_get threshold| awk -F \" \" '{print $2}'"
|
||||
command | getline var
|
||||
printf("threshold energy = %d eV\n", var) >> fnamep;
|
||||
|
||||
command="sls_detector_get badchannels| awk -F \" \" '{print $2}'"
|
||||
command | getline var
|
||||
printf("bad channel list = %s\n",var) >> fnamep;
|
||||
|
||||
|
||||
command="sls_detector_get angconv| awk -F \" \" '{print $2}'"
|
||||
command | getline var
|
||||
printf("angle calibration conversion = %s\n",var) >> fnamep;
|
||||
|
||||
|
||||
command="sls_detector_get globaloff| awk -F \" \" '{print $2}'"
|
||||
command | getline var
|
||||
printf("beamline offset = %f deg\n", var) >> fnamep;
|
||||
|
||||
command="sls_detector_get fineoff| awk -F \" \" '{print $2}'"
|
||||
command | getline var
|
||||
printf("fine offset = %f deg\n", var) >> fnamep;
|
||||
|
||||
command="sls_detector_get flatfield| awk -F \" \" '{print $2}'"
|
||||
command | getline var
|
||||
printf("Flat field corrections = %s\n",var) >> fnamep;
|
||||
|
||||
command="sls_detector_get ratecorr| awk -F \" \" '{print $2}'"
|
||||
command | getline var
|
||||
printf("Dead time corrections tau = %d ns\n",var) >> fnamep;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#print beamline parameters to file
|
||||
|
||||
#read detector position
|
||||
system("caget X04SA-ES2-TH2:RO.RBV >>"fnamep)
|
||||
#read I0
|
||||
system("caget X04SA-ES2-SC:CH6>>"fnamep)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
87
examples/scripts/ScanScript.awk
Executable file
87
examples/scripts/ScanScript.awk
Executable file
@ -0,0 +1,87 @@
|
||||
#! /bin/awk -f
|
||||
|
||||
# this is an awk script to start a run
|
||||
# you first need to run inimodule.awk to initialize
|
||||
# the pattern, set Vc and set the trimbits
|
||||
#
|
||||
|
||||
#####################################################################
|
||||
# revision history #
|
||||
#####################################################################
|
||||
# 31.10.2001 first version #
|
||||
#####################################################################
|
||||
# #
|
||||
# Bernd Schmitt #
|
||||
# #
|
||||
# bernd.schmitt@psi.ch #
|
||||
# #
|
||||
#####################################################################
|
||||
# #
|
||||
# modifications: #
|
||||
# #
|
||||
# 1.3.2002 BS adapted for use with DCB #
|
||||
# #
|
||||
# 25.5.2002 BS adapted to new convert program #
|
||||
# #
|
||||
# 29.5.2002 sleep -> usleep for meas. time , TS #
|
||||
# #
|
||||
#####################################################################
|
||||
|
||||
BEGIN {
|
||||
|
||||
# initialize variables
|
||||
NPAR=4
|
||||
|
||||
PAR[1]="nrun"
|
||||
PAR[2]="fn"
|
||||
PAR[3]="var"
|
||||
PAR[4]="par"
|
||||
|
||||
|
||||
# initialize default values
|
||||
PARVAL[1] = 100
|
||||
PARVAL[2] = "myfname"
|
||||
PARVAL[3] = 0
|
||||
PARVAL[2] = "none"
|
||||
|
||||
|
||||
|
||||
# read command line defined variables
|
||||
if (ARGC>1) {
|
||||
printf("\n\nnumber of command line arguments: %i (incl. command)\n\n", ARGC);
|
||||
for (i=1; i<=ARGC; i++) {
|
||||
|
||||
nsplit=split(ARGV[i],array,"=")
|
||||
VAR = array[1];
|
||||
VAL = array[2];
|
||||
|
||||
for (j=1; j<=NPAR; j++) {
|
||||
if ( VAR==PAR[j] ) {
|
||||
PARVAL[j] = VAL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
run=PARVAL[1]
|
||||
fn=PARVAL[2]
|
||||
var=PARVAL[3]
|
||||
par=PARVAL[4]
|
||||
|
||||
|
||||
|
||||
|
||||
# print command line arguments
|
||||
for (i=1; i<=NPAR; i++){
|
||||
printf("\t... %2i.\t%7s = %s\n", i, PAR[i], PARVAL[i] );
|
||||
}
|
||||
|
||||
#execute you command hereafter e.g. change temperature etc.
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
100
examples/scripts/ScriptBeforeAfter.awk
Executable file
100
examples/scripts/ScriptBeforeAfter.awk
Executable file
@ -0,0 +1,100 @@
|
||||
#! /bin/awk -f
|
||||
|
||||
# this is an awk script to start a run
|
||||
# you first need to run inimodule.awk to initialize
|
||||
# the pattern, set Vc and set the trimbits
|
||||
#
|
||||
|
||||
#####################################################################
|
||||
# revision history #
|
||||
#####################################################################
|
||||
# 31.10.2001 first version #
|
||||
#####################################################################
|
||||
# #
|
||||
# Bernd Schmitt #
|
||||
# #
|
||||
# bernd.schmitt@psi.ch #
|
||||
# #
|
||||
#####################################################################
|
||||
# #
|
||||
# modifications: #
|
||||
# #
|
||||
# 1.3.2002 BS adapted for use with DCB #
|
||||
# #
|
||||
# 25.5.2002 BS adapted to new convert program #
|
||||
# #
|
||||
# 29.5.2002 sleep -> usleep for meas. time , TS #
|
||||
# #
|
||||
#####################################################################
|
||||
|
||||
BEGIN {
|
||||
|
||||
# initialize variables
|
||||
NPAR=7
|
||||
|
||||
PAR[1]="nrun"
|
||||
PAR[2]="fn"
|
||||
PAR[3]="par"
|
||||
PAR[4]="sv0"
|
||||
PAR[5]="sv1"
|
||||
PAR[6]="p0"
|
||||
PAR[7]="p1"
|
||||
|
||||
# initialize default values
|
||||
PARVAL[1] = 100
|
||||
PARVAL[2] = "myfname"
|
||||
PARVAL[3] = 1
|
||||
PARVAL[4] = 0
|
||||
PARVAL[5] = 0
|
||||
PARVAL[6] = "none"
|
||||
PARVAL[7] = "none"
|
||||
|
||||
|
||||
|
||||
# read command line defined variables
|
||||
if (ARGC>1) {
|
||||
printf("\n\nnumber of command line arguments: %i (incl. command)\n\n", ARGC);
|
||||
for (i=1; i<=ARGC; i++) {
|
||||
|
||||
nsplit=split(ARGV[i],array,"=")
|
||||
VAR = array[1];
|
||||
VAL = array[2];
|
||||
|
||||
for (j=1; j<=NPAR; j++) {
|
||||
if ( VAR==PAR[j] ) {
|
||||
PARVAL[j] = VAL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
run=PARVAL[1]
|
||||
fn=PARVAL[2]
|
||||
"par"PAR[3]=
|
||||
sv0=PAR[4]
|
||||
sv1=PAR[5]
|
||||
p0=PAR[6]
|
||||
p1=PAR[7]
|
||||
|
||||
|
||||
|
||||
# print command line arguments
|
||||
for (i=1; i<=NPAR; i++){
|
||||
printf("\t... %2i.\t%7s = %s\n", i, PAR[i], PARVAL[i] );
|
||||
}
|
||||
# printf("\n\n");
|
||||
# system("close_shutter_g95")
|
||||
|
||||
# execute your actions hereafter
|
||||
if (par==1) {
|
||||
#open shutter
|
||||
} else {
|
||||
#close shutter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
79
examples/scripts/StartStopScript.awk
Executable file
79
examples/scripts/StartStopScript.awk
Executable file
@ -0,0 +1,79 @@
|
||||
#! /bin/awk -f
|
||||
|
||||
# this is an awk script to start a run
|
||||
# you first need to run inimodule.awk to initialize
|
||||
# the pattern, set Vc and set the trimbits
|
||||
#
|
||||
|
||||
#####################################################################
|
||||
# revision history #
|
||||
#####################################################################
|
||||
# 31.10.2001 first version #
|
||||
#####################################################################
|
||||
# #
|
||||
# Bernd Schmitt #
|
||||
# #
|
||||
# bernd.schmitt@psi.ch #
|
||||
# #
|
||||
#####################################################################
|
||||
# #
|
||||
# modifications: #
|
||||
# #
|
||||
# 1.3.2002 BS adapted for use with DCB #
|
||||
# #
|
||||
# 25.5.2002 BS adapted to new convert program #
|
||||
# #
|
||||
# 29.5.2002 sleep -> usleep for meas. time , TS #
|
||||
# #
|
||||
#####################################################################
|
||||
|
||||
BEGIN {
|
||||
|
||||
# initialize variables
|
||||
NPAR=2
|
||||
|
||||
PAR[1]="nrun"
|
||||
PAR[2]="par"
|
||||
|
||||
|
||||
# initialize default values
|
||||
PARVAL[1] = 100
|
||||
PARVAL[2] = "none"
|
||||
|
||||
|
||||
|
||||
# read command line defined variables
|
||||
if (ARGC>1) {
|
||||
printf("\n\nnumber of command line arguments: %i (incl. command)\n\n", ARGC);
|
||||
for (i=1; i<=ARGC; i++) {
|
||||
|
||||
nsplit=split(ARGV[i],array,"=")
|
||||
VAR = array[1];
|
||||
VAL = array[2];
|
||||
|
||||
for (j=1; j<=NPAR; j++) {
|
||||
if ( VAR==PAR[j] ) {
|
||||
PARVAL[j] = VAL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
run=PARVAL[1]
|
||||
par=PARVAL[2]
|
||||
|
||||
|
||||
|
||||
|
||||
# print command line arguments
|
||||
for (i=1; i<=NPAR; i++){
|
||||
printf("\t... %2i.\t%7s = %s\n", i, PAR[i], PARVAL[i] );
|
||||
}
|
||||
#execute action hereafter
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user