Files
JFCalibration/CuFluo_exposure.sh

120 lines
2.8 KiB
Bash

#!/bin/bash
# to run do: bash CuFluo_exposure.sh
# prerequisites:
# - 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
# - xray tube is on and ramped for 40 kV, 60 mA, set to Cu
sls_detector_put powerchip 1
# set ADCINVERSionreg (by trial and error)
sls_detector_put reg 0x43 0x453b2a9c
sls_detector_put period 0.002
sls_detector_put exptime 0.000010
sls_detector_put vhighvoltage 200
# configure for receiver on mpc2012
sls_detector_put rx_udpport 32410
sls_detector_put rx_udpip 10.1.3.105
sls_detector_put rx_udpmac 3C:FD:FE:A2:14:D9
sls_detector_put detectorip 10.1.3.9
sls_detector_put detectormac 00:ab:be:cc:dd:e2
sls_detector_put configuremac 0
CLI=/afs/psi.ch/project/sls_det_software/bin/xrayClient64_sl6
$CLI setv 40
$CLI setc 60
echo "The receiver should be waiting for data (G0 pede file)"
echo "Please check and press any key to continue, or press q to exit this script"
read -n 1 -s input
if [[ $input = "q" ]]; then
echo "Exiting script"
exit 1
fi
sls_detector_put frames 1000
echo "recording G0 pede"
sls_detector_put status start
sleep 3
# 1000 frames at 500 frames per second takes 2s
echo "recording G1 pede"
sls_detector_put setbit 0x5d 12
sls_detector_put status start
sleep 3
echo "recording G2 pede"
sls_detector_put setbit 0x5d 13
sls_detector_put status start
sleep 3
sls_detector_put clearbit 0x5d 12
sls_detector_put clearbit 0x5d 13
echo "Please close the G0 pede file and open the G0 CuFluo file"
echo "Please check and press any key to continue, or press q to exit this script"
read -n 1 -s input
if [[ $input = "q" ]]; then
echo "Exiting script"
exit 1
fi
sls_detector_put frames 200000
$CLI shutter 1 on
sleep 1
sls_detector_put status start
sleep 410
# 200k frames at 500 frames per second takes 400s
$CLI shutter 1 off
echo "Please close the G0 CuFluo file and open HG0 pede file"
echo "Please check and press any key to continue, or press q to exit this script"
read -n 1 -s input
if [[ $input = "q" ]]; then
echo "Exiting script"
exit 1
fi
sls_detector_put setbit 0x5d 0
sls_detector_put frames 1000
echo "recording HG0 pede"
sls_detector_put status start
sleep 3
# 1000 frames at 500 frames per second takes 2s
echo "Please close the HG0 pede file and open the HG0 CuFluo file"
echo "Please check and press any key to continue, or press q to exit this script"
read -n 1 -s input
if [[ $input = "q" ]]; then
echo "Exiting script"
exit 1
fi
sls_detector_put frames 200000
$CLI shutter 1 on
sleep 1
sls_detector_put status start
sleep 410
# 200k frames at 500 frames per second takes 400s
$CLI shutter 1 off
echo "You can close the HG0 CuFluo file"
echo "Script finished"