diff --git a/BP_scan.sh b/BP_scan.sh index 828cea7..6de549f 100644 --- a/BP_scan.sh +++ b/BP_scan.sh @@ -3,22 +3,19 @@ # to run do: bash BP_scan.sh # prerequisites: +# - setup_env.sh souced # - the hostname is set -# - export PATH=/afs/psi.ch/project/sls_det_software/latest_slsDetectorPackage/build/bin:$PATH -# - export LD_LIBRARY_PATH=/afs/psi.ch/project/sls_det_software/latest_slsDetectorPackage/build/bin:$LD_LIBRARY_PATH # - detector is on # - waveform generator is on -# - amplifier board is powered +35 V -5 V +# - amplifier board is powered and unconnected. sls_detector_put powerchip 1 -# set ADCINVERSionreg (by trial and error) -sls_detector_put reg 0x43 0x453b2a9c sls_detector_put delay 0 sls_detector_put cycles 1 sls_detector_put frames 100 -sls_detector_put period 0.002 +sls_detector_put period 0.005 sls_detector_put exptime 0.000020 sls_detector_put vhighvoltage 0 @@ -29,49 +26,51 @@ sls_detector_put rx_udpip 10.1.4.105 sls_detector_put rx_udpmac 3C:FD:FE:A2:14:D8 sls_detector_put detectorip 10.1.4.9 sls_detector_put detectormac 00:ab:be:cc:dd:e2 -sls_detector_put configuremac 0 +#sls_detector_put configuremac 0 +sls_detector_put speed 1 + # prepare the AGILENT 33250A /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay OUTP OFF -sleep 1 +sleep 0.2 # pulse /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay FUNC PULS -sleep 1 +sleep 0.2 # frequency 1kHz /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay FREQ 1000 -sleep 1 +sleep 0.2 # width 40 us /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay PULS:WIDT 0.000040 -sleep 1 +sleep 0.2 # amplitude 0.1 V /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay VOLT 0.1 -sleep 1 +sleep 0.2 # offset 0 V /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay VOLT:OFFS 0 -sleep 1 +sleep 0.2 # edge 50 ns /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay PULS:TRAN 0.000000050 -sleep 1 +sleep 0.2 # triggered burst /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay BURS:MODE TRIG -sleep 1 +sleep 0.2 # cycles 1 /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay BURS:NCYC 1 -sleep 1 +sleep 0.2 # external trigger source /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay TRIG:SOUR EXT -sleep 1 +sleep 0.2 # delay 1 us /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay TRIG:DEL 0.000001 -sleep 1 +sleep 0.2 # slope positive /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay TRIG:SLOP POS -sleep 1 +sleep 0.2 # turn on burst mode /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay BURS:STAT ON -sleep 1 +sleep 0.2 echo "It is now safe to connect the cable between the amplifier board and the readout board" @@ -86,7 +85,7 @@ fi sls_detector_put vhighvoltage 200 # output on /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay OUTP ON -sleep 1 +sleep 0.2 echo "The current on the amplifier board should be ~0.035 A" echo "Please check and press any key to continue, or press q to exit this script" @@ -112,7 +111,7 @@ do vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l)) /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay VOLT $vpulse sleep 1 -sls_detector_put status start +sls_detector_put start sleep 1 done @@ -121,7 +120,7 @@ do vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l)) /afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay VOLT $vpulse sleep 1 -sls_detector_put status start +sls_detector_put start sleep 1 done diff --git a/CS_scan.sh b/CS_scan.sh index 0f9300b..15ea318 100644 --- a/CS_scan.sh +++ b/CS_scan.sh @@ -3,15 +3,13 @@ # to run do: bash CS_scan.sh # prerequisites: +# - setup_env.sh souced # - the hostname is set -# - export PATH=/afs/psi.ch/project/sls_det_software/latest_slsDetectorPackage/build/bin:$PATH -# - export LD_LIBRARY_PATH=/afs/psi.ch/project/sls_det_software/latest_slsDetectorPackage/build/bin:$LD_LIBRARY_PATH # - detector is on sls_detector_put powerchip 1 -# set ADCINVERSionreg (by trial and error) -sls_detector_put reg 0x43 0x453b2a9c + sls_detector_put frames 640 sls_detector_put period 0.005 @@ -24,7 +22,7 @@ sls_detector_put rx_udpip 10.1.4.105 sls_detector_put rx_udpmac 3C:FD:FE:A2:14:D8 sls_detector_put detectorip 10.1.4.9 sls_detector_put detectormac 00:ab:be:cc:dd:e2 -sls_detector_put configuremac 0 + echo "The receiver should be waiting for data" @@ -37,19 +35,19 @@ fi echo "recording G0 pede" -sls_detector_put status start +sls_detector_put start sleep 4 echo "recording G1 pede" sls_detector_put setbit 0x5d 12 -sls_detector_put status start +sls_detector_put start sleep 4 echo "recording G2 pede" sls_detector_put setbit 0x5d 13 -sls_detector_put status start +sls_detector_put start sleep 4 @@ -70,7 +68,7 @@ do tint_sec=$(printf %.9f $(echo "$tint/1000000000" | bc -l)) echo "setting integration time to (s) " $tint_sec sls_detector_put exptime $tint_sec -sls_detector_put status start +sls_detector_put start sleep 4 done @@ -81,7 +79,7 @@ do tint_sec=$(printf %.8f $(echo "$tint/100000000" | bc -l)) echo "setting integration time to (s) " $tint_sec sls_detector_put exptime $tint_sec -sls_detector_put status start +sls_detector_put start sleep 4 done @@ -92,7 +90,7 @@ do tint_sec=$(printf %.8f $(echo "$tint/100000000" | bc -l)) echo "setting integration time to (s) " $tint_sec sls_detector_put exptime $tint_sec -sls_detector_put status start +sls_detector_put start sleep 4 done @@ -103,7 +101,7 @@ do tint_sec=$(printf %.8f $(echo "$tint/100000000" | bc -l)) echo "setting integration time to (s) " $tint_sec sls_detector_put exptime $tint_sec -sls_detector_put status start +sls_detector_put start sleep 4 done @@ -114,7 +112,7 @@ do tint_sec=$(printf %.7f $(echo "$tint/10000000" | bc -l)) echo "setting integration time to (s) " $tint_sec sls_detector_put exptime $tint_sec -sls_detector_put status start +sls_detector_put start sleep 4 done @@ -125,7 +123,7 @@ do tint_sec=$(printf %.7f $(echo "$tint/10000000" | bc -l)) echo "setting integration time to (s) " $tint_sec sls_detector_put exptime $tint_sec -sls_detector_put status start +sls_detector_put start sleep 4 done @@ -136,7 +134,7 @@ do tint_sec=$(printf %.7f $(echo "$tint/10000000" | bc -l)) echo "setting integration time to (s) " $tint_sec sls_detector_put exptime $tint_sec -sls_detector_put status start +sls_detector_put start sleep 4 done @@ -147,7 +145,7 @@ do tint_sec=$(printf %.7f $(echo "$tint/1000000" | bc -l)) echo "setting integration time to (s) " $tint_sec sls_detector_put exptime $tint_sec -sls_detector_put status start +sls_detector_put start sleep 4 done @@ -158,7 +156,7 @@ do tint_sec=$(printf %.7f $(echo "$tint/1000000" | bc -l)) echo "setting integration time to (s) " $tint_sec sls_detector_put exptime $tint_sec -sls_detector_put status start +sls_detector_put start sleep 4 done diff --git a/datafilenameexample.txt b/datafilenameexample.txt new file mode 100644 index 0000000..7563fc2 --- /dev/null +++ b/datafilenameexample.txt @@ -0,0 +1,8 @@ +-rw-rw-r--. 1 l_msdetect l_msdetect 10485920000 Feb 14 2019 BP_M242_2019-02-14_000000.dat +-rw-rw-r--. 1 l_msdetect l_msdetect 10485920000 Feb 14 2019 CS_M242_2019-02-14_000000.dat +-rw-rw-r--. 1 l_msdetect l_msdetect 10485920000 Feb 15 2019 CuFluoG0_M242_2019-02-15_000000.dat +-rw-rw-r--. 1 l_msdetect l_msdetect 10485920000 Feb 15 2019 CuFluoHG0_M242_2019-02-15_000000.dat +-rw-rw-r--. 1 l_msdetect l_msdetect 3145776000 Feb 15 2019 pedeG0_M242_2019-02-15_000000.dat +-rw-rw-r--. 1 l_msdetect l_msdetect 1048592000 Feb 15 2019 pedeHG0_M242_2019-02-15_000000.dat +[l_mozzanica@mpc2012 data ]$ pwd +/mnt/pcmoench_jungfrau_calib/data diff --git a/filename_creator.sh b/filename_creator.sh new file mode 100644 index 0000000..eb9999b --- /dev/null +++ b/filename_creator.sh @@ -0,0 +1,35 @@ +#!/bin/bash +echo "printing filenames for module " $1 +echo "copy paste to execute " +datafolder="/mnt/pcmoench_jungfrau_calib/data/Module_"$1"_Calib/" +datestring=$(date +%F) +echo "mkdir "$datafolder + +echo "./ju_udp_receiver_3threads_2_0 S "$datafolder"BP_M"$1"_"$datestring"_ 10.1.4.105" +echo "./ju_udp_receiver_3threads_2_0 S "$datafolder"CS_M"$1"_"$datestring"_ 10.1.4.105" +echo "./ju_udp_receiver_3threads_2_0 S "$datafolder"CuFluoG0_M"$1"_"$datestring"_ 10.1.4.105" +echo "./ju_udp_receiver_3threads_2_0 S "$datafolder"CuFluoHG0_M"$1"_"$datestring"_ 10.1.4.105" +echo "./ju_udp_receiver_3threads_2_0 S "$datafolder"pedeG0_M"$1"_"$datestring"_ 10.1.4.105" +echo "./ju_udp_receiver_3threads_2_0 S "$datafolder"pedeHG0_M"$1"_"$datestring"_ 10.1.4.105" + +echo "creating the output folders? Y for yes " +read -n 1 -s input +if [[ $input = "Y" ]]; then + echo "creating the output folders." + plotbasefolder="/afs/psi.ch/project/mythen/sophie/JFCalibration/plot/M"$1 + mkdir -v $plotbasefolder + mkdir -v $plotbasefolder"/BackplanePulsing" + mkdir -v $plotbasefolder"/Calib_"$datestring + mkdir -v $plotbasefolder"/CuFluo" + mkdir -v $plotbasefolder"/CuFluo/G0" + mkdir -v $plotbasefolder"/CuFluo/HG0" + mkdir -v $plotbasefolder"/CurrentSource" + outdatabasefolder="/afs/psi.ch/project/mythen/sophie/JFCalibration/data/M"$1 + mkdir -v $outdatabasefolder + echo "Output folders created" + +else + echo "Exiting script" + +fi + diff --git a/setup_env.sh b/setup_env.sh new file mode 100644 index 0000000..18f23bc --- /dev/null +++ b/setup_env.sh @@ -0,0 +1,4 @@ +#!/bin/bash +export PATH=$PWD/slsDetector_bin:$PATH +export LD_LIBRARY_PATH=$PWD/slsDetector_bin:$LD_LIBRARY_PATH +export SLSDETNAME=slscalib diff --git a/slsDetector_bin/g b/slsDetector_bin/g new file mode 100755 index 0000000..06cecae Binary files /dev/null and b/slsDetector_bin/g differ diff --git a/slsDetector_bin/libSlsDetector.so b/slsDetector_bin/libSlsDetector.so new file mode 100755 index 0000000..9a931bd Binary files /dev/null and b/slsDetector_bin/libSlsDetector.so differ diff --git a/slsDetector_bin/libSlsReceiver.so b/slsDetector_bin/libSlsReceiver.so new file mode 100755 index 0000000..0d47205 Binary files /dev/null and b/slsDetector_bin/libSlsReceiver.so differ diff --git a/slsDetector_bin/libSlsSupport.so b/slsDetector_bin/libSlsSupport.so new file mode 100755 index 0000000..6c72353 Binary files /dev/null and b/slsDetector_bin/libSlsSupport.so differ diff --git a/slsDetector_bin/libzmq.so.5 b/slsDetector_bin/libzmq.so.5 new file mode 100755 index 0000000..4880544 Binary files /dev/null and b/slsDetector_bin/libzmq.so.5 differ diff --git a/slsDetector_bin/p b/slsDetector_bin/p new file mode 100755 index 0000000..5c130b1 Binary files /dev/null and b/slsDetector_bin/p differ diff --git a/slsDetector_bin/slsDetectorGui b/slsDetector_bin/slsDetectorGui new file mode 100755 index 0000000..2e65367 Binary files /dev/null and b/slsDetector_bin/slsDetectorGui differ diff --git a/slsDetector_bin/slsMultiReceiver b/slsDetector_bin/slsMultiReceiver new file mode 100755 index 0000000..57546e2 Binary files /dev/null and b/slsDetector_bin/slsMultiReceiver differ diff --git a/slsDetector_bin/slsReceiver b/slsDetector_bin/slsReceiver new file mode 100755 index 0000000..3cbb310 Binary files /dev/null and b/slsDetector_bin/slsReceiver differ diff --git a/slsDetector_bin/sls_detector_acquire b/slsDetector_bin/sls_detector_acquire new file mode 100755 index 0000000..894d6aa Binary files /dev/null and b/slsDetector_bin/sls_detector_acquire differ diff --git a/slsDetector_bin/sls_detector_get b/slsDetector_bin/sls_detector_get new file mode 100755 index 0000000..06cecae Binary files /dev/null and b/slsDetector_bin/sls_detector_get differ diff --git a/slsDetector_bin/sls_detector_help b/slsDetector_bin/sls_detector_help new file mode 100755 index 0000000..2c36dd7 Binary files /dev/null and b/slsDetector_bin/sls_detector_help differ diff --git a/slsDetector_bin/sls_detector_put b/slsDetector_bin/sls_detector_put new file mode 100755 index 0000000..5c130b1 Binary files /dev/null and b/slsDetector_bin/sls_detector_put differ