First commit of the original current source scan script.
This commit is contained in:
186
CS_scan.sh
Normal file
186
CS_scan.sh
Normal file
@ -0,0 +1,186 @@
|
||||
#!/bin/bash
|
||||
frames=640
|
||||
sls_detector_put clearbit 0x5d 16
|
||||
sls_detector_put clearbit 0x5d 17
|
||||
|
||||
#source set_quarter_speed_NF.sh 0 # aldo says this line is wrong
|
||||
|
||||
sls_detector_put status stop
|
||||
sls_detector_put period 0.005
|
||||
sls_detector_put frames $frames
|
||||
sls_detector_put vhighvoltage 200
|
||||
sls_detector_put exptime 0.000010
|
||||
sls_detector_put reg 0x5c 0
|
||||
|
||||
|
||||
echo "setting to G0"
|
||||
sls_detector_put clearbit 0x5d 0
|
||||
sls_detector_put clearbit 0x5d 1
|
||||
sls_detector_put clearbit 0x5d 12
|
||||
sls_detector_put clearbit 0x5d 13
|
||||
|
||||
sls_detector_put status start
|
||||
#sleep 5
|
||||
sleep 4
|
||||
|
||||
|
||||
echo "setting to G1"
|
||||
sls_detector_put setbit 0x5d 12
|
||||
|
||||
sls_detector_put status start
|
||||
#sleep 5
|
||||
sleep 4
|
||||
|
||||
|
||||
echo "setting to G2"
|
||||
sls_detector_put setbit 0x5d 13
|
||||
|
||||
sls_detector_put status start
|
||||
#sleep 5
|
||||
sleep 4
|
||||
|
||||
|
||||
|
||||
sls_detector_put clearbit 0x5d 12
|
||||
sls_detector_put clearbit 0x5d 13
|
||||
|
||||
|
||||
# this line enables current source
|
||||
sls_detector_put setbit 0x5d 16
|
||||
#bit 16 high bit 17 low = automatic cal col sweep
|
||||
#bit 16 high bit 17 high = cal col selected with bits 26-20
|
||||
#sleep 5
|
||||
sleep 1
|
||||
|
||||
|
||||
# loop 1
|
||||
for tint in {50..450..50} # 25 is too small here, 50 min
|
||||
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_get reg 0x68
|
||||
#sleep 1
|
||||
sls_detector_put status start
|
||||
#sleep 5
|
||||
sleep 4
|
||||
done
|
||||
|
||||
|
||||
|
||||
# loop 2a
|
||||
for tint in {50..100..5}
|
||||
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_get reg 0x68
|
||||
#sleep 1
|
||||
sls_detector_put status start
|
||||
#sleep 5
|
||||
sleep 4
|
||||
done
|
||||
|
||||
# loop 2b
|
||||
for tint in {110..200..10}
|
||||
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_get reg 0x68
|
||||
#sleep 1
|
||||
sls_detector_put status start
|
||||
#sleep 5
|
||||
sleep 4
|
||||
done
|
||||
|
||||
# loop 2c
|
||||
for tint in {225..450..25}
|
||||
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_get reg 0x68
|
||||
#sleep 1
|
||||
sls_detector_put status start
|
||||
#sleep 5
|
||||
sleep 4
|
||||
done
|
||||
|
||||
|
||||
|
||||
# loop 3a
|
||||
for tint in {50..100..5}
|
||||
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_get reg 0x68
|
||||
#sleep 1
|
||||
sls_detector_put status start
|
||||
#sleep 5
|
||||
sleep 4
|
||||
done
|
||||
|
||||
# loop 3b
|
||||
for tint in {110..200..10}
|
||||
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_get reg 0x68
|
||||
#sleep 1
|
||||
sls_detector_put status start
|
||||
#sleep 5
|
||||
sleep 4
|
||||
done
|
||||
|
||||
# loop 3c
|
||||
for tint in {225..450..25}
|
||||
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_get reg 0x68
|
||||
#sleep 1
|
||||
sls_detector_put status start
|
||||
#sleep 5
|
||||
sleep 4
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
# loop 4a
|
||||
for tint in {50..100..5}
|
||||
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_get reg 0x68
|
||||
#sleep 1
|
||||
sls_detector_put status start
|
||||
#sleep 5
|
||||
sleep 4
|
||||
done
|
||||
|
||||
# loop 4b
|
||||
for tint in {110..250..10}
|
||||
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_get reg 0x68
|
||||
#sleep 1
|
||||
sls_detector_put status start
|
||||
#sleep 5
|
||||
sleep 4
|
||||
done
|
||||
|
||||
|
||||
|
||||
echo "DONE!"
|
||||
sls_detector_put exptime 0.000010
|
||||
sls_detector_put period 0.002
|
||||
sls_detector_put frames 1000000
|
||||
sls_detector_put clearbit 0x5d 16
|
Reference in New Issue
Block a user