main #1

Merged
carulla_m merged 5 commits from main into master 2026-02-23 15:31:16 +01:00
32 changed files with 6250 additions and 497 deletions

View File

@@ -131,8 +131,8 @@ int main(int argc, char* argv[]) {
mapcanvas->cd();
TH1F* g0_grad_hist = 0;
if (module_str == "351" ||
TH1F* g0_grad_hist = 0;
if (module_str == "351" || // List of 450um modules
module_str == "351_fullspeed" ||
module_str == "352" ||
module_str == "352_fullspeed" ||
@@ -149,7 +149,11 @@ int main(int argc, char* argv[]) {
module_str == "307" ||
module_str == "307_fullspeed" ||
module_str == "272_halfspeedtest" ||
module_str == "272_fullspeedtest") {
module_str == "272_fullspeedtest" ||
module_str == "668" ||
module_str == "668_200V" ||
module_str == "668_180V" ||
module_str == "668_fullspeedtest") {
g0_grad_hist = new TH1F("g0_grad_hist","",100,3,8);
} else {
g0_grad_hist = new TH1F("g0_grad_hist","",100,5,10);
@@ -174,7 +178,11 @@ int main(int argc, char* argv[]) {
module_str == "307" ||
module_str == "307_fullspeed" ||
module_str == "272_halfspeedtest" ||
module_str == "272_fullspeedtest") {
module_str == "272_fullspeedtest" ||
module_str == "668" ||
module_str == "668_200V" ||
module_str == "668_180V" ||
module_str == "668_fullspeedtest") {
g1_grad_hist = new TH1F("g1_grad_hist","",100,-0.25,-0.1);
} else {
g1_grad_hist = new TH1F("g1_grad_hist","",100,-0.3,-0.15);
@@ -788,12 +796,35 @@ int main(int argc, char* argv[]) {
mapcanvas->SetRightMargin(0.13);
c1->cd();
g0_grad_hist->GetXaxis()->SetTitle("G0 gradient");
g0_grad_hist->Draw();
sprintf(savename,"plots/M%s/%s/g0_grad_hist_M%s.png", module_str.c_str(), plotfolder_str.c_str(), module_str.c_str());
c1->SaveAs((const char *)(savename));
TPaveText *pave1 = new TPaveText(0.6,0.8,0.94,0.94,"blNDC");
pave1->SetBorderSize(0);
pave1->SetFillStyle(0);
pave1->SetTextSize(0.04);
pave1->SetTextAlign(32);
g0_grad_hist->Fit("gaus");
g0_grad_hist->Draw();
c1->Update();
TF1* g0_grad_hist_gaus = g0_grad_hist->GetFunction("gaus");
if (g0_grad_hist_gaus) {
sprintf(savename,"Mean %0.4f #pm %0.4f", g0_grad_hist_gaus->GetParameter(1), g0_grad_hist_gaus->GetParError(1));
pave1->AddText((const char *)(savename));
sprintf(savename,"Sigma %0.4f #pm %0.4f", g0_grad_hist_gaus->GetParameter(2), g0_grad_hist_gaus->GetParError(2));
pave1->AddText((const char *)(savename));
pave1->Draw();
}
g0_grad_hist->SetStats(kFALSE);
sprintf(savename,"plots/M%s/%s/g0_grad_histfit_M%s.png", module_str.c_str(), plotfolder_str.c_str(),module_str.c_str());
c1->SaveAs((const char *)(savename));
g0_grader_hist->GetXaxis()->SetTitle("#sigma_{G0 gradient}");
g0_grader_hist->Draw();
sprintf(savename,"plots/M%s/%s/g0_grader_hist_M%s.png", module_str.c_str(), plotfolder_str.c_str(), module_str.c_str());
@@ -804,6 +835,31 @@ int main(int argc, char* argv[]) {
sprintf(savename,"plots/M%s/%s/g1_grad_hist_M%s.png", module_str.c_str(), plotfolder_str.c_str(), module_str.c_str());
c1->SaveAs((const char *)(savename));
TPaveText *pave3 = new TPaveText(0.6,0.8,0.94,0.94,"blNDC");
pave3->SetBorderSize(0);
pave3->SetFillStyle(0);
pave3->SetTextSize(0.04);
pave3->SetTextAlign(32);
g1_grad_hist->Fit("gaus");
g1_grad_hist->Draw();
c1->Update();
TF1* g1_grad_hist_gaus = g1_grad_hist->GetFunction("gaus");
if (g1_grad_hist_gaus) {
sprintf(savename,"Mean %0.4f #pm %0.4f", g1_grad_hist_gaus->GetParameter(1), g1_grad_hist_gaus->GetParError(1));
pave3->AddText((const char *)(savename));
sprintf(savename,"Sigma %0.4f #pm %0.4f", g1_grad_hist_gaus->GetParameter(2), g1_grad_hist_gaus->GetParError(2));
pave3->AddText((const char *)(savename));
pave3->Draw();
}
g1_grad_hist->SetStats(kFALSE);
sprintf(savename,"plots/M%s/%s/g1_grad_histfit_M%s.png", module_str.c_str(), plotfolder_str.c_str(),module_str.c_str());
c1->SaveAs((const char *)(savename));
g1_grader_hist->GetXaxis()->SetTitle("#sigma_{G1 gradient}");
g1_grader_hist->Draw();
sprintf(savename,"plots/M%s/%s/g1_grader_hist_M%s.png", module_str.c_str(), plotfolder_str.c_str(), module_str.c_str());
@@ -843,7 +899,7 @@ int main(int argc, char* argv[]) {
g0_grad_map->Draw("colz");
pave->AddText("G0 [ADU/mV]");
pave->Draw();
if (module_str == "351" ||
if (module_str == "351" || // List 450um modules
module_str == "351_fullspeed" ||
module_str == "352" ||
module_str == "352_fullspeed" ||
@@ -860,8 +916,12 @@ int main(int argc, char* argv[]) {
module_str == "307" ||
module_str == "307_fullspeed" ||
module_str == "272_halfspeedtest" ||
module_str == "272_fullspeedtest") {
g0_grad_map->GetZaxis()->SetRangeUser(3,4);
module_str == "272_fullspeedtest"||
module_str == "668" ||
module_str == "668_200V" ||
module_str == "668_180V" ||
module_str == "668_fullspeedtest") {
g0_grad_map->GetZaxis()->SetRangeUser(3.5,6.5);
} else {
g0_grad_map->GetZaxis()->SetRangeUser(5,10);
}
@@ -894,7 +954,7 @@ int main(int argc, char* argv[]) {
} else if (module_str == "021" || module_str == "022" || module_str == "044") {
g1_grad_map->GetZaxis()->SetRangeUser(-0.3,-0.23);
} else if (module_str == "351" ||
module_str == "351_fullspeed" ||
module_str == "351_fullspeed" || // List modules 450um
module_str == "352" ||
module_str == "352_fullspeed" ||
module_str == "261" ||
@@ -910,8 +970,12 @@ int main(int argc, char* argv[]) {
module_str == "307" ||
module_str == "307_fullspeed" ||
module_str == "272_halfspeedtest" ||
module_str == "272_fullspeedtest") {
g1_grad_map->GetZaxis()->SetRangeUser(-0.15,-0.1);
module_str == "272_fullspeedtest" ||
module_str == "668" ||
module_str == "668_200V" ||
module_str == "668_180V" ||
module_str == "668_fullspeedtest") {
g1_grad_map->GetZaxis()->SetRangeUser(-0.2,-0.15);
} else {
g1_grad_map->GetZaxis()->SetRangeUser(-0.25,-0.2);
}

BIN
BP_analysis_M431 Executable file

Binary file not shown.

View File

@@ -1,5 +1,5 @@
// to analyse the backplane pulsing data per module
// changes by VH 210906: to eliminate hardcoded absolute paths, uses location of the analysis root files as additional input argument (accordingly changed in filename_creator.sh)
// to analyse the backplane pulsing data per module
// works for single chip only (chip 5)
#include "sls_detector_calibration/jungfrauCommonHeader.h"
@@ -288,11 +288,6 @@ int main(int argc, char* argv[]) {
}
for (int i = 0; i < NCH; i++) {
if((i/NC<256 || i/NC>511) || (i%NC<256 || i%NC>511)){
continue;
}
avg_adcG0_map[framecounter/100]->SetBinContent((i%NC)+1,(i/NC)+1,pedestalObjectG0->pedestalOfChannel(i));
avg_adcG0er_map[framecounter/100]->SetBinContent((i%NC)+1,(i/NC)+1,pedestalObjectG0->semOfChannel(i));
@@ -382,10 +377,6 @@ int main(int argc, char* argv[]) {
mapcanvas->SetRightMargin(0.05);
for (int i = 0; i < NCH; i++) {
if((i/NC<256 || i/NC>511) || (i%NC<256 || i%NC>511)){
continue;
}
vector<double> r0_adc;
vector<double> r0_filter;

BIN
BP_analysis_thin Executable file

Binary file not shown.

BIN
BP_fit Executable file

Binary file not shown.

BIN
BP_fit_M431 Executable file

Binary file not shown.

BIN
BP_fit_thin Executable file

Binary file not shown.

218
BP_linearity_scan_JF11.sh Normal file
View File

@@ -0,0 +1,218 @@
#!/bin/bash
# to run do: bash BP_scan.sh 0/1
# arg 1 specify if normal or HG0G1G2 setting
# 1.1 needs file in the blackfin
# prerequisites:
# - setup_env.sh souced
# - the hostname is set
# - detector is on
# - waveform generator is on
# - amplifier board is powered and unconnected.
# connect to pc8830 (or any RH7 machine connected to the pulser and, after klog, run the command
# nc -k -n -v -l -p 5555 -e /bin/bash
KILLRCV="killall ju_udp_receiver_3threads_2_0"
$KILLRCV
if [ "$1" == "" ] || [ $# -gt 1 ]; then
echo "Parameter 1 is empty specify G0 for normal, HG0 for HG0G1G2"
return 0
fi
sls_detector_put stop;
sls_detector_put powerchip 0
sleep 3
#sls_detector_put setbit 0x5d 7
sls_detector_put powerchip 1
CLI=/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay
#sls_detector_put setbit 0x5d 0
sls_detector_put delay 0
sls_detector_put triggers 1
sls_detector_put frames 100
sls_detector_put period 0.005
sls_detector_put exptime 0.000040
sls_detector_put highvoltage 0
# configure for receiver on mpc2012
sls_detector_put udp_dstport 32410
sls_detector_put udp_dstip $DSTIP #10.1.4.105
sls_detector_put udp_dstmac $DSTMAC #3C:FD:FE:A2:14:D8
sls_detector_put udp_srcip 10.1.5.9 #wrong on purpose, so we send some packets to nowhere
sls_detector_put udp_srcmac 00:ab:be:cc:dd:e2
#sls_detector_put configuremac 0
sls_detector_put readoutspeed 1
sls_detector_put start # this puts the chip in a known state. packets to nowhere
sls_detector_put stop
sls_detector_put udp_srcip $SRCIP #10.1.4.9 #now the right one.
sleep 3
if [ "$1" == 'HG0' ]; then
sls_detector_put settings highgain0
RCVON=$TKBPHG0
echo $RCVON
#sls_detector_put reg 0x58 0x00800f ; sls_detector_put setbit 0x58 31 ; sls_detector_put clearbit 0x58 31;
echo "HG0G1G2 mode"
else
sls_detector_put settings gain0
RCVON=$TKBPG0
echo $RCVON
#sls_detector_put reg 0x58 0x10800f ; sls_detector_put setbit 0x58 31 ; sls_detector_put clearbit 0x58 31;
echo "normal mode"
fi
sls_detector_put reg 0x7f 0xff1f
#sls_detector_put reg 0x59 0x1110
sleep 1
#sls_detector_put reg 0x5b 0xffffffff
#sls_detector_put reg 0x5a 0xffffffff
sleep 1
#sls_detector_put setbit 0x58 30 ; sleep 1 ;sls_detector_put clearbit 0x58 30;
sleep 1
#sls_detector_put reg 0x5b 0xffffffff
#sls_detector_put reg 0x5a 0xffffffff
#sls_detector_put setbit 0x5d 16
#sls_detector_put start;
#sls_detector_put stop;
#sls_detector_put clearbit 0x5d 16
# prepare the AGILENT 33250A
echo $CLI" OUTP OFF " | nc pc10773 5555
sleep 0.2
#remember to put High-Z load!
#Change load to Infinity
echo $CLI" OUTP:LOAD INF " | nc pc10773 5555
# Polarity normal
echo $CLI" OUTP:POL NORM" | nc pc10773 5555
# pulse
echo $CLI" FUNC PULS" | nc pc10773 5555
sleep 0.2
# frequency 1kHz
echo $CLI" FREQ 1000" | nc pc10773 5555
sleep 0.2
# width 40 us
echo $CLI" PULS:WIDT 0.000040" | nc pc10773 5555
sleep 0.2
# amplitude 0.1 V" | nc pc8830 5555
echo $CLI" VOLT 0.1" | nc pc10773 5555
sleep 0.2
# offset 0 V
#echo $CLI" VOLT:OFFS 0" | nc pc8830 5555
sleep 0.2
# VLOW 0 V
echo $CLI" VOLT:LOW 0" | nc pc10773 5555
sleep 0.2
# edge 50 ns
echo $CLI" PULS:TRAN 0.000000050" | nc pc10773 5555
sleep 0.2
# triggered burst
echo $CLI" BURS:MODE TRIG" | nc pc10773 5555
sleep 0.2
# cycles 1
echo $CLI" BURS:NCYC 1" | nc pc10773 5555
sleep 0.2
# external trigger source
echo $CLI" TRIG:SOUR EXT" | nc pc10773 5555
sleep 0.2
# delay 1 us
echo $CLI" TRIG:DEL 0.000001" | nc pc10773 5555
sleep 0.2
# slope positive
echo $CLI" TRIG:SLOP POS" | nc pc10773 5555
sleep 0.2
# turn on burst mode
echo $CLI" BURS:STAT ON" | nc pc10773 5555
sleep 0.2
echo "It is now safe to connect the cable between the amplifier board and the readout board"
echo "Please do so 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
# high voltage
sls_detector_put highvoltage 200 #because it seemed more stable, we are using external HV 230V
# output on
echo $CLI" OUTP ON" | nc pc10773 5555
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"
#read -n 1 -s input
#if [[ $input = "q" ]]; then
# echo "Exiting script"
# exit 1
#fi
echo "The receiver should be waiting for data"
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 gainmode fixg1 # Trial for M431_JF12
sleep 2
$RCVON &
# the scan
for ivpulse in {10..1000..50} # normal step: 10 mV
do
vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l))
echo $CLI" VOLT:HIGH "$vpulse | nc pc10773 5555 #24.02.2025 changed, before command was echo $CLI" VOLT "$vpulse | nc pc10773 5555
sleep 1
sls_detector_put start
sleep 1
done
#for ivpulse in {1050..7000..50} uncomment for normal BP scan, changed for linearity scan in G1
for ivpulse in {1050..6000..50}
do
vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l))
echo $CLI" VOLT:HIGH "$vpulse | nc pc10773 5555 #24.02.2025 changed, before command was echo $CLI" VOLT "$vpulse | nc pc10773 5555
sleep 1
sls_detector_put start
sleep 1
done
# high voltage
sls_detector_put highvoltage 0
# switch back to dynamic gainmode
sls_detector_put gainmode dynamic
# output off
echo $CLI" OUTP OFF " | nc pc10773 5555
echo "Finished scan, please wait for capacitor to discharge"
sleep 20
echo "It is now safe to disconnect the cable between the amplifier board and the readout board"
echo "Script finished"

View File

@@ -16,160 +16,228 @@
# last data file (000002.dat) should be 2097184000 bytes
PulseWidth=0.000040 #80us Normal measurement: #40us
PulseDelay=0.000001 #10us NOrmal measurement: #1us
KILLRCV="killall ju_udp_receiver_3threads_2_0"
$KILLRCV
if [[ "$0" == *"BP_scan.sh"* ]]; then
echo "script changes env. variables: should be invoked with source, not sh "
exit
fi
sls_detector_put stop #just in case
if [ ! -v $1 & ! -v $2 ]; then
echo $0
echo "Readout speed is" $2
echo "printing filenames for module" $1
ROBspeed=$2
if [[ "$2" == "full_speed" ]]; then
source filename_creator.sh $1"_fullspeed" Y
elif [[ "$2" == "half_speed" ]]; then
source filename_creator.sh $1 Y
else
echo "Readout speed has to be specified as half_speed or full_speed"
exit
fi
sls_detector_put stop #just in case
sls_detector_put powerchip 1
sls_detector_put delay 0
#sls_detector_put triggers 1
#sls_detector_put frames 100
sls_detector_put period 0.005
sls_detector_put exptime $PulseWidth
sls_detector_put highvoltage 0
sls_detector_put powerchip 1
# configure for receiver on pc-jungfrau-01/pc-jungfrau-test/pc-jungfrau-02
# source pccalib.sh with pc (pc-jungfrau-01/pc-jungfrau-test/pc-jungfrau-02)
sls_detector_put udp_dstport 32410
sls_detector_put udp_dstip $DSTIP #10.1.4.105
sls_detector_put udp_dstmac $DSTMAC #3C:FD:FE:A2:14:D8
sls_detector_put udp_srcip $SRCIP #10.1.4.9
sls_detector_put udp_srcmac 00:ab:be:cc:dd:e2
#sls_detector_put configuremac 0
sls_detector_put readoutspeed $ROBspeed
#sls_detector_put readoutspeed full_speed
sls_detector_put gainmode dynamic
#CLI=/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay
HOST=EX-6111-02
# prepare the AGILENT 33250A
#echo $CLI" OUTP OFF " | nc pc10773 5555
(echo OUTP OFF ) | nc -t $HOST 5000
sleep 0.2
#remember to put High-Z load!
#Change load to Infinity
(echo OUTP:LOAD INF ) | nc -t $HOST 5000
sleep 0.2
# Polarity normal
#echo $CLI" OUTP:POL NORM" | nc pc10773 5555
(echo OUTP:POL NORM) | nc -t $HOST 5000
sleep 0.2
# pulse
#echo $CLI" FUNC PULS" | nc pc10773 5555
(echo FUNC PULS) | nc -t $HOST 5000
sleep 0.2
# frequency 1kHz
#echo $CLI" FREQ 1000" | nc pc10773 5555
(echo FREQ 1000) | nc -t $HOST 5000
sleep 0.2
# width 40 us
#echo $CLI" PULS:WIDT 0.000040" | nc pc10773 5555
(echo PULS:WIDT $PulseWidth) | nc -t $HOST 5000
sleep 0.2
# amplitude 0.1 V" | nc pc10773 5555
#echo $CLI" VOLT 0.1" | nc pc10773 5555
(echo VOLT 0.1) | nc -t $HOST 5000
sleep 0.2
# offset 0 V echo $CLI" VOLT:OFFS 0" | nc pc8830 5555
# sleep 0.2
# VLOW 0 V
#echo $CLI" VOLT:LOW 0" | nc pc10773 5555
(echo VOLT:LOW 0) | nc -t $HOST 5000
sleep 0.2
# edge 50 ns
#echo $CLI" PULS:TRAN 0.000000050" | nc pc10773 5555
(echo PULS:TRAN 0.000000050) | nc -t $HOST 5000
sleep 0.2
# triggered burst
#echo $CLI" BURS:MODE TRIG" | nc pc10773 5555
(echo BURS:MODE TRIG) | nc -t $HOST 5000
sleep 0.2
# cycles 1
#echo $CLI" BURS:NCYC 1" | nc pc10773 5555
(echo BURS:NCYC 1) | nc -t $HOST 5000
sleep 0.2
# external trigger source
#echo $CLI" TRIG:SOUR EXT" | nc pc10773 5555
(echo TRIG:SOUR EXT) | nc -t $HOST 5000
sleep 0.2
# delay 1 us
#echo $CLI" TRIG:DEL 0.000001" | nc pc10773 5555
(echo TRIG:DEL $PulseDelay) | nc -t $HOST 5000
sleep 0.2
# delay 40 us
#echo $CLI" TRIG:DEL 0.000040" | nc pc10773 5555
#sleep 0.2
# slope positive
#echo $CLI" TRIG:SLOP POS" | nc pc10773 5555
(echo TRIG:SLOP POS) | nc -t $HOST 5000
sleep 0.2
# turn on burst mode
#echo $CLI" BURS:STAT ON" | nc pc10773 5555
(echo BURS:STAT ON) | nc -t $HOST 5000
sleep 0.2
(echo VOLT:HIGH 0.02) | nc -t $HOST 5000
sleep 0.2
if [ "$1" == 'Y' ]; then
echo "started with Y argument, skipping manual checks"
else
echo "It is now safe to connect the cable between the amplifier board and the readout board"
echo "Please do so 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
fi
# high voltage
# sls_detector_put highvoltage 200 #because it seemed more stable, we are using external HV 230V
# output on
#echo $CLI" OUTP ON" | nc pc10773 5555
(echo OUTP ON) | nc -t $HOST 5000
sleep 0.2
if [ "$1" == 'Y' ]; then
echo "started with Y argument, skipping manual checks"
else
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"
read -n 1 -s input
if [[ $input = "q" ]]; then
echo "Exiting script"
exit 1
fi
fi
sls_detector_put frames 20000
sls_detector_put start
sleep 110
sls_detector_put stop
sls_detector_put triggers 1
sls_detector_put frames 100
sls_detector_put delay 0
sls_detector_put triggers 1
sls_detector_put frames 100
sls_detector_put period 0.005
sls_detector_put exptime 0.00004
sls_detector_put highvoltage 0
$TKBPG0 &
sleep 1
# configure for receiver on pc-jungfrau-01/pc-jungfrau-test/pc-jungfrau-02
# source pccalib.sh with pc (pc-jungfrau-01/pc-jungfrau-test/pc-jungfrau-02)
sls_detector_put udp_dstport 32410
sls_detector_put udp_dstip $DSTIP #10.1.4.105
sls_detector_put udp_dstmac $DSTMAC #3C:FD:FE:A2:14:D8
sls_detector_put udp_srcip $SRCIP #10.1.4.9
sls_detector_put udp_srcmac 00:ab:be:cc:dd:e2
#sls_detector_put configuremac 0
sls_detector_put readoutspeed half_speed
#sls_detector_put readoutspeed full_speed
sls_detector_put gainmode dynamic
CLI=/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay
# prepare the AGILENT 33250A
echo $CLI" OUTP OFF " | nc pc10773 5555
sleep 0.2
#remember to put High-Z load!
#Change load to Infinity
echo $CLI" OUTP:LOAD INF " | nc pc10773 5555
# Polarity normal
echo $CLI" OUTP:POL NORM" | nc pc10773 5555
# pulse
echo $CLI" FUNC PULS" | nc pc10773 5555
sleep 0.2
# frequency 1kHz
echo $CLI" FREQ 1000" | nc pc10773 5555
sleep 0.2
# width 40 us
echo $CLI" PULS:WIDT 0.000040" | nc pc10773 5555
sleep 0.2
# amplitude 0.1 V" | nc pc10773 5555
echo $CLI" VOLT 0.1" | nc pc10773 5555
# offset 0 V echo $CLI" VOLT:OFFS 0" | nc pc8830 5555
sleep 0.2
# VLOW 0 V
echo $CLI" VOLT:LOW 0" | nc pc10773 5555
sleep 0.2
# edge 50 ns
echo $CLI" PULS:TRAN 0.000000050" | nc pc10773 5555
sleep 0.2
# triggered burst
echo $CLI" BURS:MODE TRIG" | nc pc10773 5555
sleep 0.2
# cycles 1
echo $CLI" BURS:NCYC 1" | nc pc10773 5555
sleep 0.2
# external trigger source
echo $CLI" TRIG:SOUR EXT" | nc pc10773 5555
sleep 0.2
# delay 1 us
echo $CLI" TRIG:DEL 0.000001" | nc pc10773 5555
# delay 40 us
#echo $CLI" TRIG:DEL 0.000040" | nc pc10773 5555
sleep 0.2
# slope positive
echo $CLI" TRIG:SLOP POS" | nc pc10773 5555
sleep 0.2
# turn on burst mode
echo $CLI" BURS:STAT ON" | nc pc10773 5555
sleep 0.2
# the scan
for ivpulse in {10..1000..10}
do
vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l))
(echo VOLT:HIGH $vpulse) | nc -t $HOST 5000
sleep 1
sls_detector_put start
sleep 1
done
if [ "$1" == 'Y' ]; then
echo "started with Y argument, skipping manual checks"
for ivpulse in {1050..6000..50}
do
vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l))
(echo VOLT:HIGH $vpulse) | nc -t $HOST 5000
sleep 1
sls_detector_put start
sleep 1
done
# Kill receiver
sls_detector_put stop
(echo VOLT:HIGH 0.010) | nc -t $HOST 5000
(echo OUTP OFF) | nc -t $HOST 5000
sleep 20
$KILLRCV
echo "Finished scan, please wait for capacitor to discharge"
sls_detector_put readoutspeed half_speed
sleep 20
echo "It is now safe to disconnect the cable between the amplifier board and the readout board"
echo "Script finished"
else
echo "It is now safe to connect the cable between the amplifier board and the readout board"
echo "Please do so 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
echo "Specify module number as a first argument"
echo "Specify readout_speed as a second argument:half_speed,full_speed"
echo "Script finished"
fi
# high voltage
# sls_detector_put highvoltage 200 #because it seemed more stable, we are using external HV 230V
# output on
echo $CLI" OUTP ON" | nc pc10773 5555
sleep 0.2
if [ "$1" == 'Y' ]; then
echo "started with Y argument, skipping manual checks"
else
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"
read -n 1 -s input
if [[ $input = "q" ]]; then
echo "Exiting script"
exit 1
fi
fi
$TKBPG0 &
# the scan
for ivpulse in {10..1000..10}
do
vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l))
echo $CLI" VOLT:HIGH "$vpulse | nc pc10773 5555
sleep 1
sls_detector_put start
sleep 1
done
for ivpulse in {1050..6000..50}
do
vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l))
echo $CLI" VOLT:HIGH "$vpulse | nc pc10773 5555
sleep 1
sls_detector_put start
sleep 1
done
# high voltage
# sls_detector_put highvoltage 0
# output off
echo $CLI" OUTP OFF " | nc pc10773 5555
$KILLRCV
echo "Finished scan, please wait for capacitor to discharge"
sleep 20
echo "It is now safe to disconnect the cable between the amplifier board and the readout board"
echo "Script finished"

View File

@@ -11,7 +11,8 @@
# - amplifier board is powered and unconnected.
# - last file should be 2097184000 bytes big.
# connect to pc10773 (RH7 machine connected to the pulser and, after klog, run the command
# nc -k -n -v -l -p 5555 -e /bin/bash
# Old (with serial cable to USB) nc -k -n -v -l -p 5555 -e /bin/bash
# Using the new serial to ethernet EX-6111-02 or EX-6111-01
# last data file (000002.dat) should be 2097184000 bytes
@@ -35,8 +36,8 @@ if [ ! -v $1 ]; then
sls_detector_put powerchip 1
sls_detector_put delay 0
sls_detector_put triggers 1
sls_detector_put frames 100
#sls_detector_put triggers 1
#sls_detector_put frames 100
sls_detector_put period 0.005
sls_detector_put exptime 0.00004
sls_detector_put highvoltage 0
@@ -52,75 +53,95 @@ if [ ! -v $1 ]; then
sls_detector_put udp_srcmac 00:ab:be:cc:dd:e2
#sls_detector_put configuremac 0
sls_detector_put readoutspeed half_speed
sls_detector_put readoutspeed half_speed
#sls_detector_put readoutspeed full_speed
sls_detector_put gainmode dynamic
CLI=/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay
#sls_detector_put dac vb_comp 1100
#CLI=/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay
HOST=EX-6111-02
# prepare the AGILENT 33250A
echo $CLI" OUTP OFF " | nc pc10773 5555
#echo $CLI" OUTP OFF " | nc pc10773 5555
(echo OUTP OFF ) | nc -t $HOST 5000
sleep 0.2
#remember to put High-Z load!
#Change load to Infinity
echo $CLI" OUTP:LOAD INF " | nc pc10773 5555
(echo OUTP:LOAD INF ) | nc -t $HOST 5000
sleep 0.2
# Polarity normal
echo $CLI" OUTP:POL NORM" | nc pc10773 5555
#echo $CLI" OUTP:POL NORM" | nc pc10773 5555
(echo OUTP:POL NORM) | nc -t $HOST 5000
sleep 0.2
# pulse
echo $CLI" FUNC PULS" | nc pc10773 5555
#echo $CLI" FUNC PULS" | nc pc10773 5555
(echo FUNC PULS) | nc -t $HOST 5000
sleep 0.2
# frequency 1kHz
echo $CLI" FREQ 1000" | nc pc10773 5555
#echo $CLI" FREQ 1000" | nc pc10773 5555
(echo FREQ 1000) | nc -t $HOST 5000
sleep 0.2
# width 40 us
echo $CLI" PULS:WIDT 0.000040" | nc pc10773 5555
#echo $CLI" PULS:WIDT 0.000040" | nc pc10773 5555
(echo PULS:WIDT 0.000040) | nc -t $HOST 5000
sleep 0.2
# amplitude 0.1 V" | nc pc10773 5555
echo $CLI" VOLT 0.1" | nc pc10773 5555
# offset 0 V echo $CLI" VOLT:OFFS 0" | nc pc8830 5555
#echo $CLI" VOLT 0.1" | nc pc10773 5555
(echo VOLT 0.1) | nc -t $HOST 5000
sleep 0.2
# offset 0 V echo $CLI" VOLT:OFFS 0" | nc pc8830 5555
# sleep 0.2
# VLOW 0 V
echo $CLI" VOLT:LOW 0" | nc pc10773 5555
#echo $CLI" VOLT:LOW 0" | nc pc10773 5555
(echo VOLT:LOW 0) | nc -t $HOST 5000
sleep 0.2
# edge 50 ns
echo $CLI" PULS:TRAN 0.000000050" | nc pc10773 5555
#echo $CLI" PULS:TRAN 0.000000050" | nc pc10773 5555
(echo PULS:TRAN 0.000000050) | nc -t $HOST 5000
sleep 0.2
# triggered burst
echo $CLI" BURS:MODE TRIG" | nc pc10773 5555
#echo $CLI" BURS:MODE TRIG" | nc pc10773 5555
(echo BURS:MODE TRIG) | nc -t $HOST 5000
sleep 0.2
# cycles 1
echo $CLI" BURS:NCYC 1" | nc pc10773 5555
#echo $CLI" BURS:NCYC 1" | nc pc10773 5555
(echo BURS:NCYC 1) | nc -t $HOST 5000
sleep 0.2
# external trigger source
echo $CLI" TRIG:SOUR EXT" | nc pc10773 5555
#echo $CLI" TRIG:SOUR EXT" | nc pc10773 5555
(echo TRIG:SOUR EXT) | nc -t $HOST 5000
sleep 0.2
# delay 1 us
echo $CLI" TRIG:DEL 0.000001" | nc pc10773 5555
#echo $CLI" TRIG:DEL 0.000001" | nc pc10773 5555
(echo TRIG:DEL 0.000001) | nc -t $HOST 5000
sleep 0.2
# delay 40 us
#echo $CLI" TRIG:DEL 0.000040" | nc pc10773 5555
sleep 0.2
#sleep 0.2
# slope positive
echo $CLI" TRIG:SLOP POS" | nc pc10773 5555
#echo $CLI" TRIG:SLOP POS" | nc pc10773 5555
(echo TRIG:SLOP POS) | nc -t $HOST 5000
sleep 0.2
# turn on burst mode
echo $CLI" BURS:STAT ON" | nc pc10773 5555
#echo $CLI" BURS:STAT ON" | nc pc10773 5555
(echo BURS:STAT ON) | nc -t $HOST 5000
sleep 0.2
(echo VOLT:HIGH 0.02) | nc -t $HOST 5000
sleep 0.2
if [ "$1" == 'Y' ]; then
@@ -140,7 +161,8 @@ if [ ! -v $1 ]; then
# high voltage
# sls_detector_put highvoltage 200 #because it seemed more stable, we are using external HV 230V
# output on
echo $CLI" OUTP ON" | nc pc10773 5555
#echo $CLI" OUTP ON" | nc pc10773 5555
(echo OUTP ON) | nc -t $HOST 5000
sleep 0.2
if [ "$1" == 'Y' ]; then
@@ -155,6 +177,15 @@ if [ ! -v $1 ]; then
fi
fi
sls_detector_put frames 20000
sls_detector_put start
sleep 110
sls_detector_put stop
sls_detector_put triggers 1
sls_detector_put frames 100
$TKBPG0 &
sleep 1
@@ -162,7 +193,8 @@ if [ ! -v $1 ]; then
for ivpulse in {10..1000..10}
do
vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l))
echo $CLI" VOLT:HIGH "$vpulse | nc pc10773 5555
#echo $CLI" VOLT:HIGH "$vpulse | nc pc10773 5555
(echo VOLT:HIGH $vpulse) | nc -t $HOST 5000
sleep 1
sls_detector_put start
sleep 1
@@ -172,7 +204,8 @@ if [ ! -v $1 ]; then
for ivpulse in {1050..6000..50}
do
vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l))
echo $CLI" VOLT:HIGH "$vpulse | nc pc10773 5555
#echo $CLI" VOLT:HIGH "$vpulse | nc pc10773 5555
(echo VOLT:HIGH $vpulse) | nc -t $HOST 5000
sleep 1
sls_detector_put start
sleep 1
@@ -180,7 +213,8 @@ if [ ! -v $1 ]; then
# Kill receiver
sls_detector_put stop
echo $CLI" VOLT:HIGH 0.010" | nc pc10773 5555
#echo $CLI" VOLT:HIGH 0.010" | nc pc10773 5555
(echo VOLT:HIGH 0.010) | nc -t $HOST 5000
sleep 20
$KILLRCV
@@ -201,7 +235,8 @@ if [ ! -v $1 ]; then
do
vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l))
echo $CLI" VOLT:HIGH "$vpulse | nc pc10773 5555
#echo $CLI" VOLT:HIGH "$vpulse | nc pc10773 5555
(echo VOLT:HIGH $vpulse) | nc -t $HOST 5000
sleep 1
sls_detector_put start
sleep 1
@@ -210,7 +245,8 @@ if [ ! -v $1 ]; then
for ivpulse in {1050..6000..50}
do
vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l))
echo $CLI" VOLT:HIGH "$vpulse | nc pc10773 5555
#echo $CLI" VOLT:HIGH "$vpulse | nc pc10773 5555
(echo VOLT:HIGH $vpulse) | nc -t $HOST 5000
sleep 1
sls_detector_put start
sleep 1
@@ -221,11 +257,12 @@ if [ ! -v $1 ]; then
# high voltage
# sls_detector_put highvoltage 0
# output off
echo $CLI" OUTP OFF " | nc pc10773 5555
#echo $CLI" OUTP OFF " | nc pc10773 5555
(echo OUTP OFF) | nc -t $HOST 5000
$KILLRCV
echo "Finished scan, please wait for capacitor to discharge"
sls_detector_put dac vb_comp 1220
sleep 20
echo "It is now safe to disconnect the cable between the amplifier board and the readout board"
echo "Script finished"

View File

@@ -688,7 +688,115 @@ cout << " G0->G1->G2 sequence - dynamicG0" <<endl;
scan_v6.push_back("604_fullspeed"); //jfcalib-4
scan_v6.push_back("701_Vadym");
scan_v6.push_back("643"); //jfcalib-0
scan_v6.push_back("643_fullspeed"); //jfcalib-0
scan_v6.push_back("644"); //jfcalib-1
scan_v6.push_back("644_fullspeed"); //jfcalib-1
scan_v6.push_back("645"); //jfcalib-2
scan_v6.push_back("645_fullspeed"); //jfcalib-2
scan_v6.push_back("646"); //jfcalib-3
scan_v6.push_back("646_fullspeed"); //jfcalib-3
scan_v6.push_back("665"); //jfcalib-4
scan_v6.push_back("665_fullspeed"); //jfcalib-4
scan_v6.push_back("570"); //jfcalib-5
scan_v6.push_back("570_fullspeed"); //jfcalib-5
scan_v6.push_back("666"); //jfcalib-0
scan_v6.push_back("666_fullspeed"); //jfcalib-0
scan_v6.push_back("667"); //jfcalib-1
scan_v6.push_back("667_fullspeed"); //jfcalib-1
scan_v6.push_back("668"); //jfcalib-2
scan_v6.push_back("668_fullspeed"); //jfcalib-2
scan_v6.push_back("669"); //jfcalib-3
scan_v6.push_back("669_fullspeed"); //jfcalib-3
scan_v6.push_back("670"); //jfcalib-4
scan_v6.push_back("670_fullspeed"); //jfcalib-4
scan_v6.push_back("412"); //jfcalib-2
scan_v6.push_back("412_fullspeed"); //jfcalib-2
scan_v6.push_back("424"); //jfcalib-3
scan_v6.push_back("424_fullspeed"); //jfcalib-3
scan_v6.push_back("475"); //jfcalib-4
scan_v6.push_back("475_fullspeed"); //jfcalib-4
scan_v6.push_back("413"); //jfcalib-5
scan_v6.push_back("413_fullspeed"); //jfcalib-5
scan_v6.push_back("636"); //jfcalib-0
scan_v6.push_back("636_fullspeed"); //jfcalib-0
scan_v6.push_back("637"); //jfcalib-1
scan_v6.push_back("637_fullspeed"); //jfcalib-1
scan_v6.push_back("638"); //jfcalib-2
scan_v6.push_back("638_fullspeed"); //jfcalib-2
scan_v6.push_back("639"); //jfcalib-3
scan_v6.push_back("639_fullspeed"); //jfcalib-3
scan_v6.push_back("640"); //jfcalib-4
scan_v6.push_back("640_fullspeed"); //jfcalib-4
scan_v6.push_back("641"); //jfcalib-5
scan_v6.push_back("641_fullspeed"); //jfcalib-5
scan_v6.push_back("649"); //jfcalib-0
scan_v6.push_back("649_fullspeed"); //jfcalib-0
scan_v6.push_back("650"); //jfcalib-1
scan_v6.push_back("650_fullspeed"); //jfcalib-1
scan_v6.push_back("651"); //jfcalib-2
scan_v6.push_back("651_fullspeed"); //jfcalib-2
scan_v6.push_back("652"); //jfcalib-3
scan_v6.push_back("652_fullspeed"); //jfcalib-3
scan_v6.push_back("653"); //jfcalib-4
scan_v6.push_back("653_fullspeed"); //jfcalib-4
scan_v6.push_back("686"); //jfcalib-5
scan_v6.push_back("686_fullspeed"); //jfcalib-5
scan_v6.push_back("687"); //jfcalib-0
scan_v6.push_back("687_fullspeed"); //jfcalib-0
scan_v6.push_back("693"); //jfcalib-1
scan_v6.push_back("693_fullspeed"); //jfcalib-1
scan_v6.push_back("695"); //jfcalib-2
scan_v6.push_back("695_fullspeed"); //jfcalib-2
scan_v6.push_back("696"); //jfcalib-3
scan_v6.push_back("696_fullspeed"); //jfcalib-3
scan_v6.push_back("697"); //jfcalib-4
scan_v6.push_back("697_fullspeed"); //jfcalib-4
scan_v6.push_back("699"); //jfcalib-5
scan_v6.push_back("699_fullspeed"); //jfcalib-5
scan_v6.push_back("698"); //jfcalib-0
scan_v6.push_back("698_fullspeed"); //jfcalib-0
scan_v6.push_back("703"); //jfcalib-1
scan_v6.push_back("703_fullspeed"); //jfcalib-1
scan_v6.push_back("704"); //jfcalib-2
scan_v6.push_back("704_fullspeed"); //jfcalib-2
scan_v6.push_back("708"); //jfcalib-3
scan_v6.push_back("708_fullspeed"); //jfcalib-3
scan_v6.push_back("709"); //jfcalib-4
scan_v6.push_back("709_fullspeed"); //jfcalib-4
scan_v6.push_back("744"); //jfcalib-5
scan_v6.push_back("744_fullspeed"); //jfcalib-5
scan_v6.push_back("735"); //jfcalib-0
scan_v6.push_back("741"); //jfcalib-1
scan_v6.push_back("742"); //jfcalib-2
scan_v6.push_back("743"); //jfcalib-3
scan_v6.push_back("745"); //jfcalib-4
scan_v6.push_back("746"); //jfcalib-5
scan_v6.push_back("748"); //jfcalib-0
scan_v6.push_back("750"); //jfcalib-1
scan_v6.push_back("751"); //jfcalib-2
scan_v6.push_back("752"); //jfcalib-3
scan_v6.push_back("753"); //jfcalib-4
scan_v6.push_back("784"); //jfcalib-5
scan_v6.push_back("785"); //jfcalib-2
scan_v6.push_back("786"); //jfcalib-3
scan_v6.push_back("787"); //jfcalib-4
scan_v6.push_back("784_fullspeed"); //jfcalib-5
scan_v6.push_back("784_VBCOMP1000"); //jfcalib-5
scan_v6.push_back("784_VBCOMP1100"); //jfcalib-5
scan_v6.push_back("784_VBCOMP1000_fullspeed"); //jfcalib-5
scan_v6.push_back("784_VBCOMP1100_fullspeed"); //jfcalib-5
jungfrauFile *thisfile = new jungfrauFile();

Binary file not shown.

View File

@@ -556,6 +556,7 @@ cout << " G0->G1->G2 sequence - dynamicG0" <<endl;
scan_v6.push_back("577_fullspeed"); //jfcalib-5
scan_v6.push_back("431_JF12");
scan_v6.push_back("701_Vadym");
jungfrauFile *thisfile = new jungfrauFile();

View File

@@ -651,10 +651,7 @@ int main(int argc, char* argv[]) {
scan_v6.push_back("603"); //jfcalib-5
scan_v6.push_back("603_fullspeed"); //jfcalib-5
<<<<<<< HEAD
=======
>>>>>>> refs/remotes/origin/master
scan_v6.push_back("578"); //jfcalib-0
scan_v6.push_back("578_fullspeed"); //jfcalib-0
scan_v6.push_back("588"); //jfcalib-2
@@ -677,10 +674,7 @@ int main(int argc, char* argv[]) {
scan_v6.push_back("589"); //jfcalib-5
scan_v6.push_back("589_fullspeed"); //jfcalib-5
<<<<<<< HEAD
=======
>>>>>>> refs/remotes/origin/master
scan_v6.push_back("586"); //jfcalib-0
scan_v6.push_back("586_fullspeed"); //jfcalib-0
scan_v6.push_back("607"); //jfcalib-1
@@ -689,7 +683,6 @@ int main(int argc, char* argv[]) {
scan_v6.push_back("609_fullspeed"); //jfcalib-2
scan_v6.push_back("625"); //jfcalib-3
scan_v6.push_back("625_fullspeed"); //jfcalib-3
<<<<<<< HEAD
scan_v6.push_back("626"); //jfcalib-4
scan_v6.push_back("626_fullspeed"); //jfcalib-4
@@ -720,11 +713,109 @@ int main(int argc, char* argv[]) {
scan_v6.push_back("604"); //jfcalib-4
scan_v6.push_back("604_fullspeed"); //jfcalib-4
scan_v6.push_back("701_Vadym");
=======
scan_v6.push_back("526"); //jfcalib-4
scan_v6.push_back("526_fullspeed"); //jfcalib-4
>>>>>>> refs/remotes/origin/master
scan_v6.push_back("643"); //jfcalib-0
scan_v6.push_back("643_fullspeed"); //jfcalib-0
scan_v6.push_back("644"); //jfcalib-1
scan_v6.push_back("644_fullspeed"); //jfcalib-1
scan_v6.push_back("645"); //jfcalib-2
scan_v6.push_back("645_fullspeed"); //jfcalib-2
scan_v6.push_back("646"); //jfcalib-3
scan_v6.push_back("646_fullspeed"); //jfcalib-3
scan_v6.push_back("665"); //jfcalib-4
scan_v6.push_back("665_fullspeed"); //jfcalib-4
scan_v6.push_back("570"); //jfcalib-5
scan_v6.push_back("570_fullspeed"); //jfcalib-5
scan_v6.push_back("666"); //jfcalib-0
scan_v6.push_back("666_fullspeed"); //jfcalib-0
scan_v6.push_back("667"); //jfcalib-1
scan_v6.push_back("667_fullspeed"); //jfcalib-1
scan_v6.push_back("668"); //jfcalib-2
scan_v6.push_back("668_fullspeed"); //jfcalib-2
scan_v6.push_back("669"); //jfcalib-3
scan_v6.push_back("669_fullspeed"); //jfcalib-3
scan_v6.push_back("670"); //jfcalib-4
scan_v6.push_back("670_fullspeed"); //jfcalib-4
scan_v6.push_back("412"); //jfcalib-2
scan_v6.push_back("412_fullspeed"); //jfcalib-2
scan_v6.push_back("424"); //jfcalib-3
scan_v6.push_back("424_fullspeed"); //jfcalib-3
scan_v6.push_back("475"); //jfcalib-4
scan_v6.push_back("475_fullspeed"); //jfcalib-4
scan_v6.push_back("413"); //jfcalib-5
scan_v6.push_back("413_fullspeed"); //jfcalib-5
scan_v6.push_back("636"); //jfcalib-0
scan_v6.push_back("636_fullspeed"); //jfcalib-0
scan_v6.push_back("637"); //jfcalib-1
scan_v6.push_back("637_fullspeed"); //jfcalib-1
scan_v6.push_back("638"); //jfcalib-2
scan_v6.push_back("638_fullspeed"); //jfcalib-2
scan_v6.push_back("639"); //jfcalib-3
scan_v6.push_back("639_fullspeed"); //jfcalib-3
scan_v6.push_back("640"); //jfcalib-4
scan_v6.push_back("640_fullspeed"); //jfcalib-4
scan_v6.push_back("641"); //jfcalib-5
scan_v6.push_back("641_fullspeed"); //jfcalib-5
scan_v6.push_back("649"); //jfcalib-0
scan_v6.push_back("649_fullspeed"); //jfcalib-0
scan_v6.push_back("650"); //jfcalib-1
scan_v6.push_back("650_fullspeed"); //jfcalib-1
scan_v6.push_back("651"); //jfcalib-2
scan_v6.push_back("651_fullspeed"); //jfcalib-2
scan_v6.push_back("652"); //jfcalib-3
scan_v6.push_back("652_fullspeed"); //jfcalib-3
scan_v6.push_back("653"); //jfcalib-4
scan_v6.push_back("653_fullspeed"); //jfcalib-4
scan_v6.push_back("686"); //jfcalib-5
scan_v6.push_back("686_fullspeed"); //jfcalib-5
scan_v6.push_back("687"); //jfcalib-0
scan_v6.push_back("687_fullspeed"); //jfcalib-0
scan_v6.push_back("693"); //jfcalib-1
scan_v6.push_back("693_fullspeed"); //jfcalib-1
scan_v6.push_back("695"); //jfcalib-2
scan_v6.push_back("695_fullspeed"); //jfcalib-2
scan_v6.push_back("696"); //jfcalib-3
scan_v6.push_back("696_fullspeed"); //jfcalib-3
scan_v6.push_back("697"); //jfcalib-4
scan_v6.push_back("697_fullspeed"); //jfcalib-4
scan_v6.push_back("699"); //jfcalib-5
scan_v6.push_back("699_fullspeed"); //jfcalib-5
scan_v6.push_back("698"); //jfcalib-0
scan_v6.push_back("698_fullspeed"); //jfcalib-0
scan_v6.push_back("703"); //jfcalib-1
scan_v6.push_back("703_fullspeed"); //jfcalib-1
scan_v6.push_back("704"); //jfcalib-2
scan_v6.push_back("704_fullspeed"); //jfcalib-2
scan_v6.push_back("708"); //jfcalib-3
scan_v6.push_back("708_fullspeed"); //jfcalib-3
scan_v6.push_back("709"); //jfcalib-4
scan_v6.push_back("709_fullspeed"); //jfcalib-4
scan_v6.push_back("744"); //jfcalib-5
scan_v6.push_back("744_fullspeed"); //jfcalib-5
scan_v6.push_back("735"); //jfcalib-0
scan_v6.push_back("741"); //jfcalib-1
scan_v6.push_back("742"); //jfcalib-2
scan_v6.push_back("743"); //jfcalib-3
scan_v6.push_back("745"); //jfcalib-4
scan_v6.push_back("746"); //jfcalib-5
scan_v6.push_back("748"); //jfcalib-0
scan_v6.push_back("750"); //jfcalib-1
scan_v6.push_back("751"); //jfcalib-2
scan_v6.push_back("752"); //jfcalib-3
scan_v6.push_back("753"); //jfcalib-4
scan_v6.push_back("784"); //jfcalib-5

View File

@@ -15,172 +15,186 @@
KILLRCV="killall ju_udp_receiver_3threads_2_0"
$KILLRCV
sls_detector_put stop #just in case
sls_detector_put powerchip 1
if [[ "$0" == *"CS_scan.sh"* ]]; then
echo "script changes env. variables: should be invoked with source, not sh "
exit
fi
if [ ! -v $1 & ! -v $2 ]; then
echo $0
echo "Readout speed is" $2
echo "printing filenames for module" $1
ROBspeed=$2
if [[ "$2" == "full_speed" ]]; then
source filename_creator.sh $1"_fullspeed" N
elif [[ "$2" == "half_speed" ]]; then
source filename_creator.sh $1 N
else
echo "Readout speed has to be specified as half_speed or full_speed"
exit
fi
sls_detector_put stop #just in case
sls_detector_put powerchip 1
sls_detector_put frames 640
sls_detector_put period 0.005
sls_detector_put exptime 0.000010
sls_detector_put highvoltage 200 #200
sls_detector_put frames 640
sls_detector_put period 0.005
sls_detector_put exptime 0.000010
sls_detector_put highvoltage 200 #200
# configure for receiver on pc-jungfrau-01/pc-jungfrau-02/pc-jungfrau-test
# source pccalib.sh [pc] (pc-jungfrau-01/pc-jungfrau-02/pc-jungfrau-test)
sls_detector_put udp_dstport 32410
sls_detector_put udp_dstip $DSTIP #10.1.4.105
sls_detector_put udp_dstmac $DSTMAC #3C:FD:FE:A2:14:D8
sls_detector_put udp_srcip $SRCIP #10.1.4.9
sls_detector_put udp_srcmac 00:ab:be:cc:dd:e2
# configure for receiver on pc-jungfrau-01/pc-jungfrau-02/pc-jungfrau-test
# source pccalib.sh [pc] (pc-jungfrau-01/pc-jungfrau-02/pc-jungfrau-test)
sls_detector_put readoutspeed half_speed
#sls_detector_put readoutspeed full_speed
#sls_detector_put dbitphase 125
sls_detector_put udp_dstport 32410
sls_detector_put udp_dstip $DSTIP #10.1.4.105
sls_detector_put udp_dstmac $DSTMAC #3C:FD:FE:A2:14:D8
sls_detector_put udp_srcip $SRCIP #10.1.4.9
sls_detector_put udp_srcmac 00:ab:be:cc:dd:e2
sleep 3
sls_detector_put readoutspeed $ROBspeed
#sls_detector_put readoutspeed full_speed
#sls_detector_put dbitphase 125
sleep 3
sls_detector_put frames 10000
sls_detector_put start
sleep 70
sls_detector_put stop
sls_detector_put frames 640
sls_detector_put frames 10000
sls_detector_put start
sleep 70
sls_detector_put stop
sls_detector_put frames 640
$TKCSG0 &
sleep 3
$TKCSG0 &
sleep 3
echo "recording G0 pede"
sls_detector_put start
sleep 4
echo "recording G0 pede"
sls_detector_put start
sleep 4
echo "recording G1 pede"
sls_detector_put gainmode forceswitchg1
sls_detector_put start
sleep 4
echo "recording G1 pede"
sls_detector_put gainmode forceswitchg1
sls_detector_put start
sleep 4
echo "recording G2 pede"
sls_detector_put gainmode forceswitchg2
sls_detector_put start
sleep 4
sls_detector_put gainmode dynamic
echo "recording G2 pede"
sls_detector_put gainmode forceswitchg2
sls_detector_put start
sleep 4
# turn on current source
# bit 16 high bit 17 low = automatic cal col sweep
# bit 16 high bit 17 high = cal col selected with bits 26-20
sls_detector_put currentsource 1 nofix 0
sleep 1
sls_detector_put gainmode dynamic
# 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_put start
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_put start
sleep 4
done
# turn on current source
# bit 16 high bit 17 low = automatic cal col sweep
# bit 16 high bit 17 high = cal col selected with bits 26-20
sls_detector_put currentsource 1 nofix 0
# 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_put start
sleep 4
done
sleep 1
# 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_put start
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_put start
sleep 4
done
# 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_put start
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_put start
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_put start
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_put start
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_put start
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_put start
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_put start
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_put start
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_put start
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_put start
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_put start
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_put start
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_put start
sleep 4
done
echo "Finished scan"
sls_detector_put exptime 0.000010
sls_detector_put period 0.002
sls_detector_put frames 1000000
sls_detector_put currentsource 0
sls_detector_put highvoltage 0
echo "Script finished"
sleep 4
$KILLRCV
echo "Finished scan"
sls_detector_put exptime 0.000010
sls_detector_put period 0.002
sls_detector_put frames 1000000
sls_detector_put currentsource 0
sls_detector_put highvoltage 0
sls_detector_put readoutspeed half_speed
echo "Script finished"
sleep 4
$KILLRCV
else
echo "Specify module number as a first argument"
echo "Specify readout_speed as a second argument:half_speed or full_speed"
echo "Script finished"
fi

View File

@@ -48,6 +48,7 @@ if [ ! -v $1 ]; then
sls_detector_put readoutspeed half_speed
#sls_detector_put readoutspeed full_speed
#sls_detector_put dbitphase 125
#sls_detector_put dac vb_comp 1100
sleep 3
@@ -337,6 +338,7 @@ if [ ! -v $1 ]; then
sls_detector_put frames 1000000
sls_detector_put currentsource 0
sls_detector_put highvoltage 0
sls_detector_put dac vb_comp 1220
echo "Script finished"
sleep 4
$KILLRCV

292
CS_scan_multi_ROB.sh Normal file
View File

@@ -0,0 +1,292 @@
#!/bin/bash
# to run do: bash CS_scan.sh
# prerequisites:
# - setup_env.sh souced
# - the hostname is set
# - detector is on
# - fileneame script has been sourced
# - source pccalib.sh [pc] (pc-jungfrau-01/pc-jungfrau-02/pc-jungfrau-test)
# last file should have exactly 4194368000 byte in it.
KILLRCV0="killall ju_udp_receiver_3threads_2_0_jfcalib0"
KILLRCV1="killall ju_udp_receiver_3threads_2_0_jfcalib1"
KILLRCV2="killall ju_udp_receiver_3threads_2_0_jfcalib2"
KILLRCV3="killall ju_udp_receiver_3threads_2_0_jfcalib3"
KILLRCV4="killall ju_udp_receiver_3threads_2_0_jfcalib4"
KILLRCV5="killall ju_udp_receiver_3threads_2_0_jfcalib5"
$KILLRCV0
sleep 1
$KILLRCV1
sleep 1
$KILLRCV2
sleep 1
$KILLRCV3
sleep 1
$KILLRCV4
sleep 1
$KILLRCV5
sleep 1
if [[ "$0" == *"CS_scan_multi_ROB.sh"* ]]; then
echo "script changes env. variables: should be invoked with source, not sh "
exit
fi
if [ ! -v $6 ]; then
echo $0
echo "printing filenames for all modules " $1 $2 $3 $4 $5 $6
source Multi_filename_creator.sh $1 $2 $3 $4 $5 $6
sls_detector_put stop #just in case
sls_detector_put powerchip 1
sls_detector_put frames 640
sls_detector_put period 0.005
sls_detector_put exptime 0.000010
sls_detector_put highvoltage 200
# configure for receiver on pc-jungfrau-01/pc-jungfrau-02/pc-jungfrau-test
# source pccalib.sh [pc] (pc-jungfrau-01/pc-jungfrau-02/pc-jungfrau-test)
sls_detector_put 0:udp_dstport 32411
sls_detector_put 1:udp_dstport 32412
sls_detector_put 2:udp_dstport 32413
sls_detector_put 3:udp_dstport 32414
sls_detector_put 4:udp_dstport 32415
sls_detector_put 5:udp_dstport 32416
sls_detector_put udp_dstip $DSTIP #10.1.4.105
sls_detector_put udp_dstmac $DSTMAC #3C:FD:FE:A2:14:D8
sls_detector_put 0:udp_srcip 10.1.1.9 #10.1.4.9
sls_detector_put 1:udp_srcip 10.1.1.10
sls_detector_put 2:udp_srcip 10.1.1.11
sls_detector_put 3:udp_srcip 10.1.1.12
sls_detector_put 4:udp_srcip 10.1.1.13
sls_detector_put 5:udp_srcip 10.1.1.14
sls_detector_put 0:udp_srcmac 00:ab:be:cc:dd:e2
sls_detector_put 1:udp_srcmac 00:ab:6b:03:5a:d5
sls_detector_put 2:udp_srcmac 00:ab:d9:ee:bc:bd
sls_detector_put 3:udp_srcmac 00:ab:1d:4f:bd:6a
sls_detector_put 4:udp_srcmac 00:ab:d3:ae:0f:1f
sls_detector_put 5:udp_srcmac 00:ab:f2:a5:c0:a2
sls_detector_put readoutspeed half_speed
#sls_detector_put readoutspeed full_speed
#sls_detector_put dbitphase 125
sls_detector_put 0:txdelay_frame 0
sls_detector_put 1:txdelay_frame 0
sls_detector_put 2:txdelay_frame 1
sls_detector_put 3:txdelay_frame 1
sls_detector_put 4:txdelay_frame 2
sls_detector_put 5:txdelay_frame 2
sls_detector_put 0:master 1
sls_detector_put sync 1
sls_detector_get master
sls_detector_get status
sleep 3
sls_detector_put currentsource 0
sleep 2
sls_detector_put frames 10000
sleep 2
sls_detector_put start
sleep 60
sls_detector_put stop
sleep 1
sls_detector_get status
sls_detector_put frames 640
$TKCSG0_0 &
sleep 3
$TKCSG0_1 &
sleep 3
$TKCSG0_2 &
sleep 3
$TKCSG0_3 &
sleep 3
$TKCSG0_4 &
sleep 3
$TKCSG0_5 &
sleep 3
echo "recording G0 pede"
sls_detector_acquire
sleep 1
echo "recording G1 pede"
sls_detector_put gainmode forceswitchg1
sleep 2
sls_detector_acquire
sleep 1
echo "recording G2 pede"
sls_detector_put gainmode forceswitchg2
sleep 2
sls_detector_acquire
sleep 1
sls_detector_put gainmode dynamic
sleep 1
# turn on current source
# bit 16 high bit 17 low = automatic cal col sweep
# bit 16 high bit 17 high = cal col selected with bits 26-20
sls_detector_put currentsource 1 nofix 0
sleep 5
# 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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
done
# loop 3b
for tint in {110..200..10}
do
tint_sec=$(printf %.7f $(echo "$tint/10000000" | bc -l))
sleep 1
echo "setting integration time to (s) " $tint_sec
sls_detector_put exptime $tint_sec
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_put acquire
sleep 1
done
echo "Finished scan at halfspeed"
sls_detector_put exptime 0.000010
sleep 1
$KILLRCV0
sleep 1
$KILLRCV1
sleep 1
$KILLRCV2
sleep 1
$KILLRCV3
sleep 1
$KILLRCV4
sleep 1
$KILLRCV5
sleep 1
sls_detector_put period 0.002
sleep 2
sls_detector_put frames 1000000
sleep 2
sls_detector_put currentsource 0
sleep 2
sls_detector_put highvoltage 0
sleep 2
sls_detector_put powerchip 0
echo "Script finished"
sleep 4
else
echo "Specify module number for each jfcalib board after firt argument"
echo "Script finished"
fi

View File

@@ -0,0 +1,461 @@
#!/bin/bash
# to run do: bash CS_scan.sh
# prerequisites:
# - setup_env.sh souced
# - the hostname is set
# - detector is on
# - fileneame script has been sourced
# - source pccalib.sh [pc] (pc-jungfrau-01/pc-jungfrau-02/pc-jungfrau-test)
# last file should have exactly 4194368000 byte in it.
KILLRCV0="killall ju_udp_receiver_3threads_2_0_jfcalib0"
KILLRCV1="killall ju_udp_receiver_3threads_2_0_jfcalib1"
KILLRCV2="killall ju_udp_receiver_3threads_2_0_jfcalib2"
KILLRCV3="killall ju_udp_receiver_3threads_2_0_jfcalib3"
KILLRCV4="killall ju_udp_receiver_3threads_2_0_jfcalib4"
KILLRCV5="killall ju_udp_receiver_3threads_2_0_jfcalib5"
$KILLRCV0
sleep 1
$KILLRCV1
sleep 1
$KILLRCV2
sleep 1
$KILLRCV3
sleep 1
$KILLRCV4
sleep 1
$KILLRCV5
sleep 1
if [[ "$0" == *"CS_scan_multi_ROB.sh"* ]]; then
echo "script changes env. variables: should be invoked with source, not sh "
exit
fi
if [ ! -v $6 ]; then
echo $0
echo "printing filenames for all modules " $1 $2 $3 $4 $5 $6
source Multi_filename_creator.sh $1 $2 $3 $4 $5 $6
sls_detector_put stop #just in case
sls_detector_put powerchip 1
sls_detector_put frames 640
sls_detector_put period 0.005
sls_detector_put exptime 0.000010
sls_detector_put highvoltage 200
# configure for receiver on pc-jungfrau-01/pc-jungfrau-02/pc-jungfrau-test
# source pccalib.sh [pc] (pc-jungfrau-01/pc-jungfrau-02/pc-jungfrau-test)
sls_detector_put 0:udp_dstport 32411
sls_detector_put 1:udp_dstport 32412
sls_detector_put 2:udp_dstport 32413
sls_detector_put 3:udp_dstport 32414
sls_detector_put 4:udp_dstport 32415
sls_detector_put 5:udp_dstport 32416
sls_detector_put udp_dstip $DSTIP #10.1.4.105
sls_detector_put udp_dstmac $DSTMAC #3C:FD:FE:A2:14:D8
sls_detector_put 0:udp_srcip 10.1.1.9 #10.1.4.9
sls_detector_put 1:udp_srcip 10.1.1.10
sls_detector_put 2:udp_srcip 10.1.1.11
sls_detector_put 3:udp_srcip 10.1.1.12
sls_detector_put 4:udp_srcip 10.1.1.13
sls_detector_put 5:udp_srcip 10.1.1.14
sls_detector_put 0:udp_srcmac 00:ab:be:cc:dd:e2
sls_detector_put 1:udp_srcmac 00:ab:6b:03:5a:d5
sls_detector_put 2:udp_srcmac 00:ab:d9:ee:bc:bd
sls_detector_put 3:udp_srcmac 00:ab:1d:4f:bd:6a
sls_detector_put 4:udp_srcmac 00:ab:d3:ae:0f:1f
sls_detector_put 5:udp_srcmac 00:ab:f2:a5:c0:a2
sls_detector_put readoutspeed half_speed
#sls_detector_put readoutspeed full_speed
#sls_detector_put dbitphase 125
sls_detector_put 0:txdelay_frame 0
sls_detector_put 1:txdelay_frame 0
sls_detector_put 2:txdelay_frame 1
sls_detector_put 3:txdelay_frame 1
sls_detector_put 4:txdelay_frame 2
sls_detector_put 5:txdelay_frame 2
sls_detector_put 0:master 1
sls_detector_put sync 1
sls_detector_get master
sls_detector_get status
sleep 3
sls_detector_put currentsource 0
sleep 2
sls_detector_put frames 10000
sleep 2
sls_detector_put start
sleep 60
sls_detector_put stop
sleep 1
sls_detector_get status
sls_detector_put frames 640
$TKCSG0_0 &
sleep 3
$TKCSG0_1 &
sleep 3
$TKCSG0_2 &
sleep 3
$TKCSG0_3 &
sleep 3
$TKCSG0_4 &
sleep 3
$TKCSG0_5 &
sleep 3
echo "recording G0 pede"
sls_detector_acquire
sleep 1
echo "recording G1 pede"
sls_detector_put gainmode forceswitchg1
sleep 2
sls_detector_acquire
sleep 1
echo "recording G2 pede"
sls_detector_put gainmode forceswitchg2
sleep 2
sls_detector_acquire
sleep 1
sls_detector_put gainmode dynamic
sleep 1
# turn on current source
# bit 16 high bit 17 low = automatic cal col sweep
# bit 16 high bit 17 high = cal col selected with bits 26-20
sls_detector_put currentsource 1 nofix 0
sleep 5
# 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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
done
# loop 3b
for tint in {110..200..10}
do
tint_sec=$(printf %.7f $(echo "$tint/10000000" | bc -l))
sleep 1
echo "setting integration time to (s) " $tint_sec
sls_detector_put exptime $tint_sec
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_put acquire
sleep 1
done
echo "Finished scan at halfspeed"
sls_detector_put exptime 0.000010
sleep 1
$KILLRCV0
sleep 1
$KILLRCV1
sleep 1
$KILLRCV2
sleep 1
$KILLRCV3
sleep 1
$KILLRCV4
sleep 1
$KILLRCV5
sleep 1
# source filename creator to save data in fullspeed folder
source Multi_filename_creator.sh $1"_fullspeed" $2"_fullspeed" $3"_fullspeed" $4"_fullspeed" $5"_fullspeed" $6"_fullspeed"
sls_detector_put readoutspeed full_speed
sleep 2
sls_detector_put currentsource 0
sleep 2
$TKCSG0_0 &
sleep 3
$TKCSG0_1 &
sleep 3
$TKCSG0_2 &
sleep 3
$TKCSG0_3 &
sleep 3
$TKCSG0_4 &
sleep 3
$TKCSG0_5 &
sleep 3
echo "recording G0 pede"
sls_detector_acquire
sleep 1
echo "recording G1 pede"
sls_detector_put gainmode forceswitchg1
sleep 2
sls_detector_acquire
sleep 1
echo "recording G2 pede"
sls_detector_put gainmode forceswitchg2
sleep 2
sls_detector_acquire
sleep 1
sls_detector_put gainmode dynamic
sleep 2
# turn on current source
# bit 16 high bit 17 low = automatic cal col sweep
# bit 16 high bit 17 high = cal col selected with bits 26-20
sls_detector_put currentsource 1 nofix 0
sleep 2
# 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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
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
sleep 2
sls_detector_acquire
sleep 1
done
echo "Finished scan at fullspeed"
sls_detector_put exptime 0.000010
sleep 2
sls_detector_put period 0.002
sleep 2
sls_detector_put frames 1000000
sleep 2
sls_detector_put currentsource 0
sleep 2
sls_detector_put highvoltage 0
echo "Script finished"
sleep 4
$KILLRCV0
$KILLRCV1
$KILLRCV2
$KILLRCV3
$KILLRCV4
$KILLRCV5
else
echo "Specify module number for each jfcalib board after firt argument"
echo "Script finished"
fi

View File

@@ -11,129 +11,158 @@
# - source pccalib.sh [pc] (mpc2012/pc-jungfrau-test)
# - xray tube is on and ramped for 40 kV, 60 mA, set to Cu
shutter=1
shutter=1 # for big X-ray box
# shutter=3 # for small X-ray box
sls_detector_put stop #just in case
sls_detector_put powerchip 1
sls_detector_put period 0.002
sls_detector_put exptime 0.000010
sls_detector_put highvoltage 200 #200
# configure for receiver on mpc2012/pc-jungfrau-test/mpc2198/mpc3282
# source pccalib.sh [pc] (mpc2012/pc-jungfrau-test/mpc2198/mpc3282)
sls_detector_put udp_dstport 32410
sls_detector_put udp_dstip $DSTIP #10.1.4.105
sls_detector_put udp_dstmac $DSTMAC #3C:FD:FE:A2:14:D8
sls_detector_put udp_srcip $SRCIP #10.1.4.9
sls_detector_put udp_srcmac 00:ab:be:cc:dd:e2
#sls_detector_put readoutspeed half_speed
sls_detector_put readoutspeed full_speed
#sls_detector_put reg 0x59 0x1310 #0001 0011 0001 0000
#sls_detector_put readoutspeed 0
#sls_detector_put reg 0x59 0x0100 #0000 0001 0000 0000
KILLRCV="killall ju_udp_receiver_3threads_2_0"
$KILLRCV
#CLI=/afs/psi.ch/project/sls_det_software/bin/sl7_binaries_to_be_removed_soon/xrayClient_sl7
CLI=/afs/psi.ch/project/sls_det_software/bin/xrayClient_sl8 #/vacuumClient_sl7
$CLI setv 40
$CLI setc 60
$CLI HV on
if [[ "$0" == *"BP_scan.sh"* ]]; then
echo "script changes env. variables: should be invoked with source, not sh "
exit
fi
sls_detector_put clearbit 0x5d 0
if [ ! -v $1 & ! -v $2 ]; then
echo $0
echo "Readout speed is" $2
echo "printing filenames for module" $1
ROBspeed=$2
if [[ "$2" == "full_speed" ]]; then
source filename_creator.sh $1"_fullspeed" Y
elif [[ "$2" == "half_speed" ]]; then
source filename_creator.sh $1 Y
else
echo "Readout speed has to be specified as half_speed or full_speed"
exit
fi
$CLI shutter $shutter off #$CLI shutter 1 off
echo "warmin up the board"
sls_detector_put frames 40000
sls_detector_put start
sleep 81
sls_detector_put stop
sls_detector_put stop #just in case
echo "end of board warm up"
sls_detector_put powerchip 1
sls_detector_put frames 1000
$KILLRCV
sleep 1
$TKPG0 &
sleep 2
echo "recording G0 pede"
sls_detector_put start
sleep 3
# 1000 frames at 500 frames per second takes 2s
# JF1.2 to fix saturation issue in HG0
# sls_detector_put defaultdac vref_comp 420 highgain0
# sls_detector_put setbit 0x58 18
# End JF1.2
echo "recording G1 pede"
sls_detector_put gainmode forceswitchg1
sls_detector_put start
sleep 3
sls_detector_put period 0.002
sls_detector_put exptime 0.000010
sls_detector_put highvoltage 200 #200
echo "recording G2 pede"
sls_detector_put gainmode forceswitchg2
sls_detector_put start
sleep 3
# configure for receiver on mpc2012/pc-jungfrau-test/mpc2198/mpc3282
# source pccalib.sh [pc] (mpc2012/pc-jungfrau-test/mpc2198/mpc3282)
sls_detector_put gainmode dynamic
sls_detector_put udp_dstport 32410
sls_detector_put udp_dstip $DSTIP #10.1.4.105
sls_detector_put udp_dstmac $DSTMAC #3C:FD:FE:A2:14:D8
sls_detector_put udp_srcip $SRCIP #10.1.4.9
sls_detector_put udp_srcmac 00:ab:be:cc:dd:e2
$KILLRCV
echo "closed G0 pede file and open the G0 CuFluo file"
sleep 1
$TKFG0 &
sleep 3
sls_detector_put readoutspeed $ROBspeed
sls_detector_put frames 230000
$CLI shutter $shutter on #$CLI shutter 1 on
sleep 1
sls_detector_put start
sleep 470
# 200k frames at 500 frames per second takes 400s
$CLI shutter $shutter off #$CLI shutter 1 off
#sls_detector_put readoutspeed full_speed
#sls_detector_put reg 0x59 0x1310 #0001 0011 0001 0000
$KILLRCV
echo "closed G0 CuFluo file and open HG0 pede file"
sleep 1
$TKPHG0 &
sleep 3
#sls_detector_put readoutspeed 0
#sls_detector_put reg 0x59 0x0100 #0000 0001 0000 0000
sls_detector_put settings highgain0
#CLI=/afs/psi.ch/project/sls_det_software/bin/sl7_binaries_to_be_removed_soon/xrayClient_sl7
CLI=/afs/psi.ch/project/sls_det_software/bin/xrayClient_sl8 #/vacuumClient_sl7
# CLI=/afs/psi.ch/project/sls_det_software/bin/vacuumClient_sl8 # for small X-ray box
sls_detector_put frames 1000
$CLI setv 60
$CLI setc 40 # for big X-ray box
echo "recording HG0 pede"
# $CLI setc 55 # for small X-ray box
$CLI HV on
sls_detector_put start
sleep 3
# 1000 frames at 500 frames per second takes 2s
sls_detector_put clearbit 0x5d 0
$KILLRCV
echo "closed HG0 pede file and open the HG0 CuFluo file"
sleep 1
$CLI shutter $shutter off #$CLI shutter 1 off
echo "warmin up the board"
sls_detector_put frames 40000
sls_detector_put start
sleep 81
sls_detector_put stop
$TKFHG0 &
sleep 3
echo "end of board warm up"
# : ' # Uncomment to skip a G0 part
sls_detector_put frames 1000
$KILLRCV
sleep 1
$TKPG0 &
sleep 2
echo "recording G0 pede"
sls_detector_put start
sleep 3
# 1000 frames at 500 frames per second takes 2s
sls_detector_put frames 230000
echo "recording G1 pede"
sls_detector_put gainmode forceswitchg1
sls_detector_put start
sleep 3
$CLI shutter $shutter on #$CLI shutter 1 on
sleep 1
echo "recording G2 pede"
sls_detector_put gainmode forceswitchg2
sls_detector_put start
sleep 3
sls_detector_put start
sleep 470
# 200k frames at 500 frames per second takes 400s
sls_detector_put gainmode dynamic
$KILLRCV
echo "closed G0 pede file and open the G0 CuFluo file"
sleep 1
$TKFG0 &
sleep 3
sls_detector_put frames 220000
$CLI shutter $shutter on #$CLI shutter 1 on
sleep 1
sls_detector_put start
sleep 450
$CLI shutter $shutter off #$CLI shutter 1 off
# 200k frames at 500 frames per second takes 400s
$CLI shutter $shutter off #$CLI shutter 1 off
# ' # Uncomment to skip a G0 part
$KILLRCV
echo "closed G0 CuFluo file and open HG0 pede file"
sleep 1
$TKPHG0 &
sleep 3
$KILLRCV
sls_detector_put settings highgain0
sls_detector_put frames 1000
sls_detector_put highvoltage 0
echo "recording HG0 pede"
sls_detector_put start
sleep 3
# 1000 frames at 500 frames per second takes 2s
$KILLRCV
echo "closed HG0 pede file and open the HG0 CuFluo file"
sleep 1
echo "Script finished"
$TKFHG0 &
sleep 3
sls_detector_put frames 220000
$CLI shutter $shutter on #$CLI shutter 1 on
sleep 1
sls_detector_put start
sleep 450
# 200k frames at 500 frames per second takes 400s
$CLI shutter $shutter off #$CLI shutter 1 off
$KILLRCV
sls_detector_put highvoltage 0
sls_detector_put readoutspeed half_speed
echo "Script finished"
else
echo "Specify module number as a first argument"
echo "Specify readout_speed as a second argument:half_speed,full_speed"
echo "Script finished"
fi

View File

@@ -54,9 +54,9 @@ sls_detector_put reg 0x7f 0xff1f
CLI=/afs/psi.ch/project/sls_det_software/bin/xrayClient_sl7
$CLI setv 40
$CLI setc 60
CLI=/afs/psi.ch/project/sls_det_software/bin/xrayClient_sl8
$CLI setv 60
$CLI setc 40
$CLI HV on

View File

@@ -55,16 +55,17 @@ if [ ! -v $1 ]; then
#CLI=/afs/psi.ch/project/sls_det_software/bin/sl7_binaries_to_be_removed_soon/xrayClient_sl7 #/vacuumClient_sl7
CLI=/afs/psi.ch/project/sls_det_software/bin/xrayClient_sl8 #/vacuumClient_sl7
$CLI setv 40
$CLI setc 60
$CLI setv 60
$CLI setc 40
$CLI HV on
sls_detector_put clearbit 0x5d 0
#sls_detector_put vref_prech 1000
#sls_detector_put vref_ds 1100
sls_detector_put dac vb_comp 1100
$CLI shutter $shutter off #$CLI shutter 1 off
$CLI shutter $shutter on #$CLI shutter 1 on
echo "warmin up the board"
sls_detector_put frames 40000
sls_detector_put start
@@ -72,6 +73,7 @@ if [ ! -v $1 ]; then
sls_detector_put stop
echo "end of board warm up"
$CLI shutter $shutter off #$CLI shutter 1 off
sls_detector_put frames 1000
$KILLRCV
@@ -101,9 +103,10 @@ if [ ! -v $1 ]; then
$TKFG0 &
sleep 5
sls_detector_put frames 230000
$CLI shutter $shutter on #$CLI shutter 1 on
sleep 1
sls_detector_put frames 220000
$CLI shutter $shutter on #$CLI shutter 1 off
sleep 2
sls_detector_put start
sleep 470
# 200k frames at 500 frames per second takes 400s
@@ -116,6 +119,7 @@ if [ ! -v $1 ]; then
$TKPHG0 &
sleep 3
sls_detector_put settings highgain0
sls_detector_put dac vb_comp 1100
#sls_detector_put vref_prech 1000
#sls_detector_put vref_ds 1100
sls_detector_put frames 1000
@@ -132,7 +136,7 @@ if [ ! -v $1 ]; then
$TKFHG0 &
sleep 5
sls_detector_put frames 230000
sls_detector_put frames 220000
$CLI shutter $shutter on #$CLI shutter 1 on
sleep 1
sls_detector_put start
@@ -155,7 +159,8 @@ if [ ! -v $1 ]; then
sls_detector_put clearbit 0x5d 0
#sls_detector_put vref_prech 1000
#sls_detector_put vref_ds 1100
sls_detector_put dac vb_comp 1100
sls_detector_put frames 1000
$TKPG0 &
sleep 5
@@ -182,7 +187,7 @@ if [ ! -v $1 ]; then
$TKFG0 &
sleep 5
sls_detector_put frames 230000
sls_detector_put frames 220000
$CLI shutter $shutter on #$CLI shutter 1 on
sleep 1
sls_detector_put start
@@ -197,6 +202,7 @@ if [ ! -v $1 ]; then
$TKPHG0 &
sleep 5
sls_detector_put settings highgain0
sls_detector_put dac vb_comp 1100
#sls_detector_put vref_prech 1000
#sls_detector_put vref_ds 1100
@@ -214,7 +220,7 @@ if [ ! -v $1 ]; then
$TKFHG0 &
sleep 5
sls_detector_put frames 230000
sls_detector_put frames 220000
$CLI shutter $shutter on #$CLI shutter 1 on
sleep 1
sls_detector_put start
@@ -228,7 +234,7 @@ if [ ! -v $1 ]; then
sls_detector_put highvoltage 0
sls_detector_put clearbit 0x5d 0
sls_detector_put dac vb_comp 1220
echo "Script finished"

View File

@@ -9,6 +9,28 @@
# - detector is on
# - xray tube is on and ramped for 40 kV, 60 mA, set to Cu
KILLRCV="killall ju_udp_receiver_3threads_2_0"
$KILLRCV
if [[ "$0" == *"CuFluo_exposure_sc.sh"* ]]; then
echo "script changes env. variables: should be invoked with source, not sh "
exit
fi
if [ ! -v $1 ]; then
echo $0
echo "printing filenames for module " $1
source filename_creator.sh $1 N
else
echo "Make sure you source filename_creator.sh file name"
fi
shutter=1
sls_detector_put stop #just in case
sls_detector_put powerchip 1
@@ -16,7 +38,7 @@ sls_detector_put powerchip 1
#Effective SC period = sc_delay + exptime + 2.1us (reset preamp and CDS)
#Frame period = effective SC period *16 + 840 us * 16 = 14 ms (for readout)
sls_detector_put period 0.1 #0.03 #0.002
sls_detector_put period 0.03 #0.017 #0.1 #0.03 #0.002
sls_detector_put exptime 0.000010 #0.000010
sls_detector_put extrastoragecells 15
sls_detector_put storagecell_start 0
@@ -36,47 +58,48 @@ sls_detector_put readoutspeed half_speed
#sls_detector_put readoutspeed 0
#sls_detector_put reg 0x59 0x0100 #0000 0001 0000 0000
KILLRCV="killall ju_udp_receiver_3threads_2_0"
$KILLRCV
CLI=/afs/psi.ch/project/sls_det_software/bin/xrayClient_sl7
$CLI setv 40
$CLI setc 60
CLI=/afs/psi.ch/project/sls_det_software/bin/xrayClient_sl8 #/vacuumClient_sl7
$CLI setv 60
$CLI setc 40
$CLI HV on
sls_detector_put clearbit 0x5d 0
$CLI shutter 1 off
$CLI shutter $shutter off #$CLI shutter 1 off
$CLI shutter $shutter on #$CLI shutter 1 on
echo "warmin up the board"
sls_detector_put frames 2500 #40000
sls_detector_put frames 3500 #40000
sls_detector_put start
sleep 260 #81 # 2500 * 100ms = 250s # 2500 * 30ms = 75s # 2500 * 20 ms = 50s
sleep 110 #80 #81 # 2500 * 100ms = 250s # 2500 * 30ms = 75s # 2500 * 20 ms = 50s
sls_detector_put stop
echo "end of board warm up"
$CLI shutter $shutter off #$CLI shutter 1 off
sls_detector_put frames 1000
$KILLRCV
sleep 10 #1
sleep 10 #10 #1
$TKPG0 &
sleep 5
echo "recording G0 pede"
sls_detector_put start
sleep 105 #35
sleep 32 #25 #105 #35
# 1000 frames (per sc) at 10 frames per second (period 100ms) takes 100s
# 1000 frames (per sc) at 34 frames per second (period 30ms) takes 35s
echo "recording G0 pede"
#sls_detector_put gainmode forceswitchg1 #consumes too much power
sls_detector_put start
sleep 105 #35
sleep 32 #25 #105 #35
echo "recording G0 pede"
#sls_detector_put gainmode forceswitchg2 #consumes too much power
sls_detector_put start
sleep 105 #35
sleep 32 #25 #105 #35
sls_detector_put gainmode dynamic
@@ -91,18 +114,20 @@ sls_detector_put frames 220000
$CLI shutter 1 on
sleep 10 #1
sls_detector_put start
sleep 22010 #6800
sleep 6800 #3900 #22010 #6800
# 220k frames (per sc) at 10 frames per second (period 10ms) takes 22000s (6h 7min)
# 220k frames (per sc) at 34 frames per second (period 30ms) takes 6600s (1h 50min)
$CLI shutter 1 off
$CLI shutter $shutter off #$CLI shutter 1 off
#We are not interested in HG0
#$KILLRCV
#echo "closed G0 CuFluo file and open HG0 pede file"
#sleep 1
#$TKPHG0 &
#sleep 5
#sls_detector_put clearbit 0x5d 0
#sls_detector_put period 0.002
#sls_detector_put settings highgain0
@@ -118,21 +143,24 @@ $CLI shutter 1 off
#echo "closed HG0 pede file and open the HG0 CuFluo file"
#sleep 1
#$TKFHG0 &
#sleep 5
#sls_detector_put frames 220000
#$CLI shutter 1 on
#$CLI shutter $shutter on #$CLI shutter 1 on
#sleep 1
#sls_detector_put start
#sleep 450
# 200k frames at 500 frames per second takes 400s
#$CLI shutter 1 off
#$CLI shutter $shutter off #$CLI shutter 1 off
sleep 2
$KILLRCV
$CLI HV off
$KILLRCV
sls_detector_put highvoltage 0
sls_detector_put clearbit 0x5d 0
sls_detector_put powerchip 0
sls_detector_put free
echo "Script finished"

322
CuFluo_fit_sc.cpp Normal file
View File

@@ -0,0 +1,322 @@
// to analyse the backplane pulsing data per module
// changes by VH 210906: to eliminate hardcoded absolute paths, uses location of the analysis root files as additional input argument (accordingly changed in filename_creator.sh)
#include "TApplication.h"
#include "sls_detector_calibration/jungfrauCommonHeader.h"
#include "sls_detector_calibration/jungfrauCommonFunctions.h"
#include "sls_detector_calibration/jungfrauFile.C"
#include "sls_detector_calibration/jungfrauPixelMask.C"
#include "sls_detector_calibration/jungfrauPedestal.C"
#include "sls_detector_calibration/energyCalibration.h"
#include "sls_detector_calibration/energyCalibration.cpp"
#include "TGraph.h"
#include "TGraphErrors.h"
#include "TF1.h"
#include "TFile.h"
#include "TPaveStats.h"
#include "TLegend.h"
#include "TPaveText.h"
#include <sys/stat.h>
//#include <sstream>
//#define NB_ENABLE 1
//void nonblock(int state);
//#define NB_DISABLE 0
//TApplication* rootapp;
//TCanvas *A2;
//TCanvas *A3;
//TCanvas *A4;
//TCanvas *A5;
//TCanvas *A6;
//TPaveStats *st0;
//void PlotCanvas(void);
double checkRangeMaxForAmplifierPlateau(double range_max) {
// check that the range maximum is no more than 6.4 V
// to avoid non-linearity coming from amplifier plateau
if (range_max > 6400) {
return 6400;
} else {
return range_max;
}
}
bool isHGX=false;
int main(int argc, char* argv[]) {
//nonblock(NB_ENABLE);
cout <<"opening the rootapp" <<endl;
TApplication rootapp("example",&argc, argv);
jungfrauStyle();
//gROOT->SetBatch(1);
gStyle->SetOptFit(11);
/*
if (argc != 3) {
cout << "Correct usage:" << endl;
cout << "arg 1: specify module number" << endl;
cout << "arg 2: specify data location" << endl;
cout << "arg 3: specify column (x)" << endl;
cout << "arg 4: specify row (y)" << endl;
exit(1);
}
*/ //uncomment for SR
if (argc != 6) {
cout << "Correct usage:" << endl;
cout << "arg 1: specify module number" << endl;
cout << "arg 2: gain settings" << endl;
cout << "arg 3: specify storage cell" << endl;
cout << "arg 4: specify pixel x position" << endl;
cout << "arg 5: specify pixel y position" << endl;
exit(1);
} //uncomment for VH 210906
string module_str = argv[1];
string gain_str = argv[2];
int sc_int = atoi(argv[3]);
string str2 =("HG0G1G2");
string str3 =("HGOG1G2"); //filename creator had this bug
int column = atoi(argv[4]);
int row = atoi(argv[5]);
int pixel = column+row*1024;
char data_loc[256];
sprintf(data_loc,"/mnt/sls_det_storage/jungfrau_calib/jungfrau_ana_sophie/M%s_CalibAna/", module_str.c_str());
cout << data_loc << endl;
std::string folder_path(data_loc);
if (folder_path.find(str2) != string::npos) isHGX=true;
if (folder_path.find(str3) != string::npos) isHGX=true;
bool isJF11=false;
if (gain_str == "HG0JF11") {
gain_str = "HG0";
isJF11=true;
}
// cout << data_loc.find(str2)<<" " << string::npos << " " << str2 << " " << data_loc <<endl;
if (isHGX) {
cout << " HG0->HG1->HG2 sequence - dynamicHG0" <<endl;
// plotfolder_str="BackplanePulsing_HG0G1G2";
}
else {
cout << " G0->G1->G2 sequence - dynamicG0" <<endl;
// plotfolder_str="BackplanePulsing";
}
//char savename[128]; //uncomment for SR
//char filename[128]; //uncomment for SR
char filename[256]; //uncomment for VH 210902
int low_ADU_peak = 0;
int high_ADU_peak = 0;
if (gain_str == "HG0") {
low_ADU_peak = 700;
high_ADU_peak = 900;
if (isJF11) {
low_ADU_peak = 850;
high_ADU_peak = 1350;
}
} else if (gain_str == "G0") {
low_ADU_peak = 250;
high_ADU_peak = 400;
}
int low_bin_noise = 101;
int high_bin_noise = 301;
int low_bin_peak = 0;
int high_bin_peak = 0;
if (gain_str == "HG0") {
low_bin_peak = 701;
high_bin_peak = 1200;
if (isJF11) {
low_bin_peak = 801;
high_bin_peak = 1451;
}
} else if (gain_str == "G0") {
low_bin_peak = 301;
high_bin_peak = 651;
}
TCanvas *A2 = new TCanvas("A2","Plot histogram",150,10,800,400);
TCanvas *A3 = new TCanvas("A3","Plot noise",150,10,800,400);
A2->SetLeftMargin(0.1);
A2->SetRightMargin(0.13);
A2->SetTopMargin(0.08);
A2->SetBottomMargin(0.15);
A3->SetLeftMargin(0.1);
A3->SetRightMargin(0.13);
A3->SetTopMargin(0.08);
A3->SetBottomMargin(0.15);
//file name
sprintf(filename,"%sCuFluo_%s_sc%i_file0to351.root",folder_path.c_str(), gain_str.c_str(),sc_int); //storage cells in burst mode
cout << "Loading file " << filename << endl;
TFile* f = new TFile((const char *)(filename),"READ");
int chip;
int CH = row*1024+column;
if (CH < (65536*1)) {
chip = 1;
} else if (CH < (65536*2)) {
chip = 2;
} else if (CH < (65536*3)) {
chip = 3;
} else if (CH < (65536*4)) {
chip = 4;
} else if (CH < (65536*5)) {
chip = 5;
} else if (CH < (65536*6)) {
chip = 6;
} else if (CH < (65536*7)) {
chip = 7;
} else if (CH < (65536*8)){
chip = 8;
}
cout<< "Chip "<< chip << " Channel number " << CH << endl;
TH2I* hist0=(TH2I*)f->Get(Form("adc2d_%d_sc%i",chip, sc_int)); // Storage cell 1 in burst mode
cout << "Creating histogram for " << Form("adc2d_%d_sc%i",chip, sc_int) << endl;
TH1D* proj = hist0->ProjectionX("bin1",CH-(65536*(chip-1))+1,CH-(65536*(chip-1))+1);
cout << "Data for pixel "<< pixel << " is loaded" << endl;
if (proj->Integral(low_bin_noise,high_bin_noise)!=0 && proj->Integral(low_bin_peak,high_bin_peak)!=0) {
A2->cd();
cout << "Canvas Noise" << endl;
// noise
TH1D *proj_noise = dynamic_cast<TH1D*>(proj->Rebin(4,"proj_noise"));
proj_noise->SetStats(kTRUE);
proj_noise->GetXaxis()->SetRangeUser(proj->GetBinLowEdge(low_bin_noise),proj->GetBinLowEdge(high_bin_noise+1));
proj_noise->Fit("gaus","Q");
TF1 *fit = proj_noise->GetFunction("gaus");
proj_noise->Draw();
A2->Update();
proj_noise->GetXaxis()->SetTitle("Pedestal corrected ADC [ADU]");
proj_noise->GetXaxis()->SetRangeUser(-100,150);
fit->SetParNames("N_{#gamma}", "Peak pos", "Noise RMS");
TPaveStats *st0 = (TPaveStats*)proj_noise->FindObject("stats");
st0->SetX1NDC(0.53);
st0->SetX2NDC(0.94);
st0->SetY1NDC(0.75);
st0->SetY2NDC(0.94);
st0->SetBorderSize(0);
st0->SetTextSize(0.04);
A2->Modified();
A2->Update();
A3->cd();
// peak
TH1D *proj_peak = dynamic_cast<TH1D*>(proj->Rebin(4,"proj_peak"));
proj_peak->SetStats(kTRUE);
proj_peak->GetXaxis()->SetRangeUser(proj->GetBinLowEdge(low_bin_peak),proj->GetBinLowEdge(high_bin_peak+1));
Double_t mypar[8];
mypar[0] = 0.0;
mypar[1] = 0.0;
mypar[2] = proj_peak->GetBinCenter(proj_peak->GetMaximumBin());
if (gain_str == "G0") {
mypar[3] = 16.;
} else if (gain_str == "HG0") {
mypar[3] = 29.;
}
mypar[4] = proj_peak->GetBinContent(proj_peak->GetMaximumBin());
if (gain_str == "G0") {
mypar[5] = 0.17;
} else if (gain_str == "HG0") {
mypar[5] = 0.14;
}
mypar[6] = 1.12;
if (gain_str == "G0") {
mypar[7] = 0.12;
} else if (gain_str == "HG0") {
mypar[7] = 0.14;
}
Double_t emypar[8];
energyCalibration *thiscalibration = new energyCalibration();
thiscalibration->setScanSign(1);
thiscalibration->setStartParametersKb(mypar);
thiscalibration->fixParameter(0,0.); // no background
thiscalibration->fixParameter(1,0.);
TF1* fittedfun = thiscalibration->fitSpectrumKb(proj_peak,mypar,emypar);
TF1 *gaus_Ka = new TF1("gaus_Ka","gaus",proj->GetBinLowEdge(low_bin_peak),proj->GetBinLowEdge(high_bin_peak+1));
gaus_Ka->SetParameters(mypar[4],mypar[2],mypar[3]);
gaus_Ka->SetLineColor(kBlue);
TF1 *erfc_Ka = new TF1("erfc_Ka","[0]/2.*(TMath::Erfc(([1]*(x-[2])/[3])/(TMath::Sqrt(2.))))",proj->GetBinLowEdge(low_bin_peak),proj->GetBinLowEdge(high_bin_peak+1));
erfc_Ka->SetParameters(mypar[4]*mypar[5], 1, mypar[2], mypar[3]);
erfc_Ka->SetLineColor(kOrange);
TF1 *gaus_Kb = new TF1("gaus_Kb","gaus",proj->GetBinLowEdge(low_bin_peak),proj->GetBinLowEdge(high_bin_peak+1));
gaus_Kb->SetParameters(mypar[4]*mypar[7],mypar[6]*mypar[2],mypar[3]);
gaus_Kb->SetLineColor(kGreen+2);
TF1 *erfc_Kb = new TF1("erfc_Kb","[0]/2.*(TMath::Erfc(([1]*(x-[2])/[3])/(TMath::Sqrt(2.))))",proj->GetBinLowEdge(low_bin_peak),proj->GetBinLowEdge(high_bin_peak+1));
erfc_Kb->SetParameters(mypar[4]*mypar[7]*mypar[5], 1, mypar[6]*mypar[2], mypar[3]);
erfc_Kb->SetLineColor(kOrange+7);
proj_peak->Draw();
A3->Update();
erfc_Kb->Draw("same");
erfc_Ka->Draw("same");
gaus_Kb->Draw("same");
gaus_Ka->Draw("same");
fittedfun->Draw("same");
A3->Update();
proj_peak->GetXaxis()->SetTitle("Pedestal corrected ADC [ADU]");
fittedfun->SetParNames("Bkg height", "Bkg grad", "K_{#alpha} pos", "Noise RMS", "K_{#alpha} height", "CS", "K_{#beta}/K_{#alpha} pos", "K_{#beta} frac");
TPaveStats *st = (TPaveStats*)proj_peak->FindObject("stats");
st->SetX1NDC(0.15);
st->SetX2NDC(0.55);
st->SetY1NDC(0.7);
st->SetY2NDC(0.94);
st->SetBorderSize(0);
st->SetTextSize(0.04);
A3->Modified();
A3->Update();
} else {
std::cout << "Masked pixel";
}
rootapp.Run();
return 0;
}

View File

@@ -67,7 +67,7 @@ int main(int argc, char* argv[]) {
std::vector<short> this_g2_default_pixels(NCH,0);
std::vector<short> this_hg0_default_pixels(NCH,0);
// // CuFluo HG0 dataset
// // CuFluo HG0 dataset
sprintf(savename,"data/M%s/CuFluo_gain_HG0_M%s.root", this_module.c_str(), this_module.c_str());
TFile* FL_HG0_file = new TFile((char*)savename,"READ");
TH2F* FL_HG0_gain_map = 0;
@@ -129,8 +129,10 @@ int main(int argc, char* argv[]) {
double this_g0 = 0;
double this_g0overg1 = 0;
double this_g1 = 0;
double this_g1_2 = 0;
double this_g1overg2 = 0;
double this_g2 = 0;
double this_g2_2 =0;
// HG0
if (FL_HG0_gain_map) {
@@ -149,7 +151,7 @@ int main(int argc, char* argv[]) {
// G0
if (FL_G0_gain_map) {
this_g0 = FL_G0_gain_map->GetBinContent((i%NC)+1,(i/NC)+1);
this_g0_default_pixels[i] = 0;
//this_g0_default_pixels[i] = 0;
if (this_g0 == 0) {
this_g0_default_pixels[i] = 1;
} else if (this_g0 < 30 || this_g0 > 56) {
@@ -163,12 +165,15 @@ int main(int argc, char* argv[]) {
if (DB_ratio_map) {
this_g0overg1 = DB_ratio_map->GetBinContent((i%NC)+1,(i/NC)+1);
this_g1 = this_g0 / this_g0overg1;
this_g1_2 = this_g0_default_pixels[i];
this_g1_default_pixels[i] = 0;
if (this_g0overg1 == 0) {
this_g1_default_pixels[i] = 1;
} else if (this_g0 != 0 && (this_g1 < -2.5 || this_g1 > -0.4)) {
this_g1_default_pixels[i] = 1;
}
} else if (this_g1_2 == 1) {
this_g1_default_pixels[i] =1;
}
} else {
this_g1_default_pixels[i] = 1;
}
@@ -176,12 +181,16 @@ int main(int argc, char* argv[]) {
if (CS_ratio_map) {
this_g1overg2 = CS_ratio_map->GetBinContent((i%NC)+1,(i/NC)+1);
this_g2 = this_g1 / this_g1overg2;
this_g2_2 = this_g1_default_pixels[i];
this_g2_default_pixels[i] = 0;
if (this_g1overg2 == 0) {
this_g2_default_pixels[i] = 1;
} else if (this_g0 != 0 && this_g1 != 0 && (this_g2 < -0.3 || this_g2 > -0.015)) {
this_g2_default_pixels[i] = 1;
}
} else if (this_g2_2 == 1) {
this_g2_default_pixels[i] =1;
}
} else {
this_g2_default_pixels[i] = 1;
}
@@ -189,17 +198,17 @@ int main(int argc, char* argv[]) {
if (this_module == "586") {
if ( (i/NC) > 0 && (i/NC)<256 && (i%NC)> 768 && (i%NC)<1024 ) {
this_g2_default_pixels[i]=1;
this_g1_default_pixels[i]=1;
}
this_g2_default_pixels[i]=1;
this_g1_default_pixels[i]=1;
}
}
if (this_module == "454") {
if ( (i/NC) > 0 && (i/NC)<256 && (i%NC)> 768 && (i%NC)<1024 ) {
this_g2_default_pixels[i]=1;
}
this_g2_default_pixels[i]=1;
}
}

1357
Fluo_analysis_Ti_In.cpp Normal file

File diff suppressed because it is too large Load Diff

166
Fluo_exposure_Ti_In.sh Normal file
View File

@@ -0,0 +1,166 @@
#!/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
# - source filename_creator.sh #
# - source pccalib.sh [pc] (mpc2012/pc-jungfrau-test)
# - xray tube is on and ramped for 40 kV, 60 mA, set to Cu
shutter=1 # for big X-ray box
# shutter=3 # for small X-ray box
sls_detector_put stop #just in case
sls_detector_put powerchip 1
# JF1.2 to fix saturation issue in HG0
# sls_detector_put defaultdac vref_comp 420 highgain0
# sls_detector_put setbit 0x58 18
# End JF1.2
sls_detector_put period 0.002
sls_detector_put exptime 0.000010
sls_detector_put highvoltage 200 #200
# configure for receiver on mpc2012/pc-jungfrau-test/mpc2198/mpc3282
# source pccalib.sh [pc] (mpc2012/pc-jungfrau-test/mpc2198/mpc3282)
sls_detector_put udp_dstport 32410
sls_detector_put udp_dstip $DSTIP #10.1.4.105
sls_detector_put udp_dstmac $DSTMAC #3C:FD:FE:A2:14:D8
sls_detector_put udp_srcip $SRCIP #10.1.4.9
sls_detector_put udp_srcmac 00:ab:be:cc:dd:e2
sls_detector_put rx_tcpport 1975
sls_detector_put rx_hostname pc-jungfrau-02
sls_detector_put readoutspeed half_speed
#sls_detector_put readoutspeed full_speed
#sls_detector_put reg 0x59 0x1310 #0001 0011 0001 0000
#sls_detector_put readoutspeed 0
#sls_detector_put reg 0x59 0x0100 #0000 0001 0000 0000
#CLI=/afs/psi.ch/project/sls_det_software/bin/sl7_binaries_to_be_removed_soon/xrayClient_sl7
CLI=/afs/psi.ch/project/sls_det_software/bin/xrayClient_sl8 #/vacuumClient_sl7
# CLI=/afs/psi.ch/project/sls_det_software/bin/vacuumClient_sl8 # for small X-ray box
$CLI setv 40
$CLI setc 60 # for big X-ray box
# $CLI setc 55 # for small X-ray box
$CLI HV on
sls_detector_put clearbit 0x5d 0
sls_detector_put fwrite 0
echo "warmin up the board"
sls_detector_put frames 40000
sls_detector_acquire
sleep 1
echo "end of board warm up"
declare -a arr=("Ti" "Fe" "Cu" "Se" "Mo" "Ag" "in")
for i in "${arr[@]}"
do
$CLI setfl Fluorescence $i
echo "Target moved"
sleep 1
$CLI shutter $shutter off #$CLI shutter 1 off
# : ' # Uncomment to skip a G0 part
sls_detector_put frames 1000
sleep 1
sls_detector_put fwrite 1
sls_detector_put fpath /mnt/sls_det_storage/jungfrau_calib/data/Module_748_Calib/
sls_detector_put fname pedeG0_target_${i}_
echo "Saving file /mnt/sls_det_storage/jungfrau_calib/data/Module_748_Calib/pedeG0_target_${i}_"
sleep 2
echo "recording G0 pede"
sls_detector_acquire
sleep 1
# 1000 frames at 500 frames per second takes 2s
echo "recording G1 pede"
sls_detector_put gainmode forceswitchg1
sls_detector_acquire
sleep 1
echo "recording G2 pede"
sls_detector_put gainmode forceswitchg2
sls_detector_acquire
sleep 1
sls_detector_put gainmode dynamic
echo "closed G0 pede file and open the G0 CuFluo file"
sleep 1
sls_detector_put frames 220000
$CLI shutter $shutter on #$CLI shutter 1 on
sleep 1
sls_detector_put fpath "/mnt/sls_det_storage/jungfrau_calib/data/Module_748_Calib/"
sls_detector_put fname "FluoG0_target_${i}_"
echo "Saving file /mnt/sls_det_storage/jungfrau_calib/data/Module_748_Calib/FluoG0_target_${i}_"
sleep 1
sls_detector_acquire
sleep 1
# 200k frames at 500 frames per second takes 400s
$CLI shutter $shutter off #$CLI shutter 1 off
# ' # Uncomment to skip a G0 part
echo "closed G0 CuFluo file and open HG0 pede file"
sleep 1
sls_detector_put settings highgain0
sls_detector_put frames 1000
echo "recording HG0 pede"
sls_detector_put fpath "/mnt/sls_det_storage/jungfrau_calib/data/Module_748_Calib/"
sls_detector_put fname "pedeHG0_target_${i}_"
echo "Saving file /mnt/sls_det_storage/jungfrau_calib/data/Module_748_Calib/pedeHG0_target_${i}_"
sleep 1
sls_detector_acquire
sleep 1
# 1000 frames at 500 frames per second takes 2s
echo "closed HG0 pede file and open the HG0 CuFluo file"
sls_detector_put frames 220000
sleep 1
$CLI shutter $shutter on #$CLI shutter 1 on
sleep 1
sls_detector_put fpath "/mnt/sls_det_storage/jungfrau_calib/data/Module_748_Calib/"
sls_detector_put fname "FluoHG0_target_${i}_"
echo "Saving file /mnt/sls_det_storage/jungfrau_calib/data/Module_748_Calib/FluoHG0_target_${i}_"
sleep 1
sls_detector_acquire
sleep 1
# 200k frames at 500 frames per second takes 400s
$CLI shutter $shutter off #$CLI shutter 1 off
sls_detector_put clearbit 0x5d 0
done
$CLI setfl Fluorescence Ti
sls_detector_put highvoltage 0
echo "Script finished"

721
Fluo_fit.cpp Normal file
View File

@@ -0,0 +1,721 @@
// to analyse the backplane pulsing data per module
// changes by VH 210906: to eliminate hardcoded absolute paths, uses location of the analysis root files as additional input argument (accordingly changed in filename_creator.sh)
#include "TApplication.h"
#include "sls_detector_calibration/jungfrauCommonHeader.h"
#include "sls_detector_calibration/jungfrauCommonFunctions.h"
#include "sls_detector_calibration/jungfrauFile.C"
#include "sls_detector_calibration/jungfrauPixelMask.C"
#include "sls_detector_calibration/jungfrauPedestal.C"
#include "sls_detector_calibration/energyCalibration.h"
#include "sls_detector_calibration/energyCalibration.cpp"
#include "TGraph.h"
#include "TGraphErrors.h"
#include "TF1.h"
#include "TFile.h"
#include "TPaveStats.h"
#include "TLegend.h"
#include "TPaveText.h"
#include <sys/stat.h>
//#include <sstream>
//#define NB_ENABLE 1
//void nonblock(int state);
//#define NB_DISABLE 0
//TApplication* rootapp;
//TCanvas *A2;
//TCanvas *A3;
//TCanvas *A4;
//TCanvas *A5;
//TCanvas *A6;
//TPaveStats *st0;
//void PlotCanvas(void);
double checkRangeMaxForAmplifierPlateau(double range_max) {
// check that the range maximum is no more than 6.4 V
// to avoid non-linearity coming from amplifier plateau
if (range_max > 6400) {
return 6400;
} else {
return range_max;
}
}
bool isHGX=false;
int main(int argc, char* argv[]) {
//nonblock(NB_ENABLE);
cout <<"opening the rootapp" <<endl;
TApplication rootapp("example",&argc, argv);
jungfrauStyle();
//gROOT->SetBatch(1);
gStyle->SetOptFit(11);
/*
if (argc != 3) {
cout << "Correct usage:" << endl;
cout << "arg 1: specify module number" << endl;
cout << "arg 2: specify data location" << endl;
cout << "arg 3: specify column (x)" << endl;
cout << "arg 4: specify row (y)" << endl;
exit(1);
}
*/ //uncomment for SR
if (argc != 6) {
cout << "Correct usage:" << endl;
cout << "arg 1: specify module number" << endl;
cout << "arg 2: specify fluorescence target" << endl;
cout << "arg 3: gain settings" << endl;
cout << "arg 4: specify pixel x position" << endl;
cout << "arg 5: specify pixel y position" << endl;
exit(1);
} //uncomment for VH 210906
string module_str = argv[1];
string gain_str = argv[3];
string target= argv[2];
string str2 =("HG0G1G2");
string str3 =("HGOG1G2"); //filename creator had this bug
int column = atoi(argv[4]);
int row = atoi(argv[5]);
int pixel = column+row*1024;
char data_loc[256];
sprintf(data_loc,"/mnt/sls_det_storage/jungfrau_calib/jungfrau_ana_sophie/M%s_%s_CalibAna/", module_str.c_str(),target.c_str());
cout << data_loc << endl;
std::string folder_path(data_loc);
if (folder_path.find(str2) != string::npos) isHGX=true;
if (folder_path.find(str3) != string::npos) isHGX=true;
bool isJF11=false;
if (gain_str == "HG0JF11") {
gain_str = "HG0";
isJF11=true;
}
// cout << data_loc.find(str2)<<" " << string::npos << " " << str2 << " " << data_loc <<endl;
if (isHGX) {
cout << " HG0->HG1->HG2 sequence - dynamicHG0" <<endl;
// plotfolder_str="BackplanePulsing_HG0G1G2";
}
else {
cout << " G0->G1->G2 sequence - dynamicG0" <<endl;
// plotfolder_str="BackplanePulsing";
}
//char savename[128]; //uncomment for SR
//char filename[128]; //uncomment for SR
char filename[256]; //uncomment for VH 210902
int low_ADU_peak = 0;
int high_ADU_peak = 0;
if (target=="Ti") {
if (gain_str == "HG0") {
low_ADU_peak = 350;
high_ADU_peak = 600;
} else if (gain_str == "G0") {
low_ADU_peak = 250;
high_ADU_peak = 400;
}
}
if (target=="Fe") {
if (gain_str == "HG0") {
low_ADU_peak = 500;
high_ADU_peak = 800;
} else if (gain_str == "G0") {
low_ADU_peak = 250;
high_ADU_peak = 400;
}
}
if (target=="Cu") {
if (gain_str == "HG0") {
low_ADU_peak = 700;
high_ADU_peak = 1000;
} else if (gain_str == "G0") {
low_ADU_peak = 250;
high_ADU_peak = 400;
}
}
if (target=="Se") {
if (gain_str == "HG0") {
low_ADU_peak = 1050;
high_ADU_peak = 1350;
} else if (gain_str == "G0") {
low_ADU_peak = 250;
high_ADU_peak = 400;
}
}
if (target=="Mo") {
if (gain_str == "HG0") {
low_ADU_peak = 1650;
high_ADU_peak = 2150;
} else if (gain_str == "G0") {
low_ADU_peak = 250;
high_ADU_peak = 400;
}
}
if (target=="Ag") {
if (gain_str == "HG0") {
low_ADU_peak = 2100;
high_ADU_peak = 2650;
} else if (gain_str == "G0") {
low_ADU_peak = 250;
high_ADU_peak = 400;
}
}
if (target=="In") {
if (gain_str == "HG0") {
low_ADU_peak = 2300;
high_ADU_peak = 2800;
} else if (gain_str == "G0") {
low_ADU_peak = 250;
high_ADU_peak = 400;
}
}
int low_bin_noise = 100;
int high_bin_noise = 350;
int low_bin_peak = 0;
int high_bin_peak = 0;
int nrebin = 4;
if (target=="Ti") {
if (gain_str == "HG0") {
low_bin_peak = 450;
high_bin_peak = 750;
nrebin = 15;
} else if (gain_str == "G0") {
low_bin_peak = 250;
high_bin_peak = 400;
}
}
if (target=="Fe") {
if (gain_str == "HG0") {
low_bin_peak = 558;
high_bin_peak = 955;
nrebin = 8;
} else if (gain_str == "G0") {
low_bin_peak = 240;
high_bin_peak = 518;
}
}
if (target=="Cu") {
if (gain_str == "HG0") {
low_bin_peak = 701;
high_bin_peak = 1200;
nrebin = 8;
} else if (gain_str == "G0") {
low_bin_peak = 301;
high_bin_peak = 651;
}
}
if (target=="Se") {
if (gain_str == "HG0") {
low_bin_peak = 900;
high_bin_peak = 1500;
nrebin = 8;
} else if (gain_str == "G0") {
low_bin_peak = 420;
high_bin_peak = 908;
}
}
if (target=="Mo") {
if (gain_str == "HG0") {
low_bin_peak = 1400;
high_bin_peak = 2400;
nrebin = 8;
} else if (gain_str == "G0") {
low_bin_peak = 654;
high_bin_peak = 1414;
}
}
if (target=="Ag") {
if (gain_str == "HG0") {
low_bin_peak = 1900;
high_bin_peak = 2900;
nrebin = 15;
} else if (gain_str == "G0") {
low_bin_peak = 829;
high_bin_peak = 1793;
}
}
if (target=="In") {
if (gain_str == "HG0") {
low_bin_peak = 2000;
high_bin_peak = 3000;
nrebin = 15;
} else if (gain_str == "G0") {
low_bin_peak = 906;
high_bin_peak = 1959;
}
}
TCanvas *A2 = new TCanvas("A2","Plot Noise",150,10,800,400);
TCanvas *A3 = new TCanvas("A3","Plot Pedestal",150,10,800,400);
A2->SetLeftMargin(0.1);
A2->SetRightMargin(0.13);
A2->SetTopMargin(0.08);
A2->SetBottomMargin(0.15);
A3->SetLeftMargin(0.1);
A3->SetRightMargin(0.13);
A3->SetTopMargin(0.08);
A3->SetBottomMargin(0.15);
//file name
sprintf(filename,"%sCuFluo_%s_file0to21.root",folder_path.c_str(), gain_str.c_str());
cout << "Loading file " << filename << endl;
TFile* f = new TFile((const char *)(filename),"READ");
int chip;
int CH = row*1024+column;
if (CH < (65536*1)) {
chip = 1;
} else if (CH < (65536*2)) {
chip = 2;
} else if (CH < (65536*3)) {
chip = 3;
} else if (CH < (65536*4)) {
chip = 4;
} else if (CH < (65536*5)) {
chip = 5;
} else if (CH < (65536*6)) {
chip = 6;
} else if (CH < (65536*7)) {
chip = 7;
} else if (CH < (65536*8)){
chip = 8;
}
cout<< "Chip "<< chip << " Channel number " << CH << endl;
TH2I* hist0=(TH2I*)f->Get(Form("adc2d_%d",chip));
cout << "Creating histogram for " << Form("adc2d_%d",chip) << endl;
TH1D* proj = hist0->ProjectionX("bin1",CH-(65536*(chip-1))+1,CH-(65536*(chip-1))+1);
cout << "Data for pixel "<< pixel << " is loaded" << endl;
if (proj->Integral(low_bin_noise,high_bin_noise)!=0 && proj->Integral(low_bin_peak,high_bin_peak)!=0) {
A2->cd();
cout << "Canvas Noise" << endl;
// noise
TH1D *proj_noise = dynamic_cast<TH1D*>(proj->Rebin(nrebin,"proj_noise"));
proj_noise->SetStats(kTRUE);
proj_noise->GetXaxis()->SetRangeUser(proj->GetBinLowEdge(low_bin_noise),proj->GetBinLowEdge(high_bin_noise+1));
proj_noise->Fit("gaus","Q");
TF1 *fit = proj_noise->GetFunction("gaus");
proj_noise->Draw();
A2->Update();
proj_noise->GetXaxis()->SetTitle("Noise RMS [ADU]");
proj_noise->GetXaxis()->SetRangeUser(-200,200);
fit->SetParNames("N_{#gamma}", "Peak pos", "Noise RMS");
TPaveStats *st0 = (TPaveStats*)proj_noise->FindObject("stats");
st0->SetX1NDC(0.53);
st0->SetX2NDC(0.94);
st0->SetY1NDC(0.75);
st0->SetY2NDC(0.94);
st0->SetBorderSize(0);
st0->SetTextSize(0.04);
A2->Modified();
A2->Update();
A3->cd();
// peak
TH1D *proj_peak = dynamic_cast<TH1D*>(proj->Rebin(nrebin,"proj_peak"));
proj_peak->SetStats(kTRUE);
proj_peak->GetXaxis()->SetRangeUser(proj->GetBinLowEdge(low_bin_peak),proj->GetBinLowEdge(high_bin_peak+1));
Double_t mypar[8];
mypar[0] = 0.0;
mypar[1] = 0.0;
if (target=="Ti") {
// Peak position
mypar[2] = proj_peak->GetBinCenter(proj_peak->GetMaximumBin());
// Noise RMS
if (gain_str == "G0") {
mypar[3] = 16.;
} else if (gain_str == "HG0") {
mypar[3] = 24.;
}
// Peak hight
mypar[4] = proj_peak->GetBinContent(proj_peak->GetMaximumBin());
// Charge sharing
if (gain_str == "G0") {
mypar[5] = 0.17;
} else if (gain_str == "HG0") {
mypar[5] = 0.12;
}
// Kb/Ka position ratio
mypar[6] = 1.0;
// Kb fraction
if (gain_str == "G0") {
mypar[7] = 0.12;
} else if (gain_str == "HG0") {
mypar[7] = 0.2;
}
}
if (target=="Fe") {
// Peak position
mypar[2] = proj_peak->GetBinCenter(proj_peak->GetMaximumBin());
// Noise RMS
if (gain_str == "G0") {
mypar[3] = 16.;
} else if (gain_str == "HG0") {
mypar[3] = 27.;
}
// Peak hight
mypar[4] = proj_peak->GetBinContent(proj_peak->GetMaximumBin());
// Charge sharing
if (gain_str == "G0") {
mypar[5] = 0.17;
} else if (gain_str == "HG0") {
mypar[5] = 0.2;
}
// Kb/Ka position ratio
mypar[6] = 1.11;
// Kb fraction
if (gain_str == "G0") {
mypar[7] = 0.12;
} else if (gain_str == "HG0") {
mypar[7] = 0.12;
}
}
if (target=="Cu") {
// Peak position
mypar[2] = proj_peak->GetBinCenter(proj_peak->GetMaximumBin());
// Noise RMS
if (gain_str == "G0") {
mypar[3] = 16.;
} else if (gain_str == "HG0") {
mypar[3] = 29.;
}
// Peak hight
mypar[4] = proj_peak->GetBinContent(proj_peak->GetMaximumBin());
// Charge sharing
if (gain_str == "G0") {
mypar[5] = 0.17;
} else if (gain_str == "HG0") {
mypar[5] = 0.14;
}
// Kb/Ka position ratio
mypar[6] = 1.11; // mypar[6] = 1.12;
// Kb fraction
if (gain_str == "G0") {
mypar[7] = 0.12;
} else if (gain_str == "HG0") {
mypar[7] = 0.14;
}
}
if (target=="Se") {
// Peak position
mypar[2] = proj_peak->GetBinCenter(proj_peak->GetMaximumBin());
// Noise RMS
if (gain_str == "G0") {
mypar[3] = 16.;
} else if (gain_str == "HG0") {
mypar[3] = 29.;
}
// Peak hight
mypar[4] = proj_peak->GetBinContent(proj_peak->GetMaximumBin());
// Charge sharing
if (gain_str == "G0") {
mypar[5] = 0.17;
} else if (gain_str == "HG0") {
mypar[5] = 0.14;
}
// Kb/Ka position ratio
mypar[6] = 1.11;
// Kb fraction
if (gain_str == "G0") {
mypar[7] = 0.12;
} else if (gain_str == "HG0") {
mypar[7] = 0.14;
}
}
if (target=="Mo") {
// Peak position
mypar[2] = proj_peak->GetBinCenter(proj_peak->GetMaximumBin());
// Noise RMS
if (gain_str == "G0") {
mypar[3] = 16.;
} else if (gain_str == "HG0") {
mypar[3] = 29.;
}
// Peak hight
mypar[4] = proj_peak->GetBinContent(proj_peak->GetMaximumBin());
// Charge sharing
if (gain_str == "G0") {
mypar[5] = 0.17;
} else if (gain_str == "HG0") {
mypar[5] = 0.14;
}
// Kb/Ka position ratio
mypar[6] = 1.12;
// Kb fraction
if (gain_str == "G0") {
mypar[7] = 0.12;
} else if (gain_str == "HG0") {
mypar[7] = 0.14;
}
}
if (target=="Ag") {
// Peak position
mypar[2] = proj_peak->GetBinCenter(proj_peak->GetMaximumBin());
// Noise RMS
if (gain_str == "G0") {
mypar[3] = 16.;
} else if (gain_str == "HG0") {
mypar[3] = 29.;
}
// Peak hight
mypar[4] = proj_peak->GetBinContent(proj_peak->GetMaximumBin());
// Charge sharing
if (gain_str == "G0") {
mypar[5] = 0.17;
} else if (gain_str == "HG0") {
mypar[5] = 0.14;
}
// Kb/Ka position ratio
mypar[6] = 1.10;
// Kb fraction
if (gain_str == "G0") {
mypar[7] = 0.12;
} else if (gain_str == "HG0") {
mypar[7] = 0.14;
}
}
if (target=="In") {
// Peak position
mypar[2] = proj_peak->GetBinCenter(proj_peak->GetMaximumBin());
// Noise RMS
if (gain_str == "G0") {
mypar[3] = 16.;
} else if (gain_str == "HG0") {
mypar[3] = 29.;
}
// Peak hight
mypar[4] = proj_peak->GetBinContent(proj_peak->GetMaximumBin());
// Charge sharing
if (gain_str == "G0") {
mypar[5] = 0.17;
} else if (gain_str == "HG0") {
mypar[5] = 0.14;
}
// Kb/Ka position ratio
mypar[6] = 1.13;
// Kb fraction
if (gain_str == "G0") {
mypar[7] = 0.12;
} else if (gain_str == "HG0") {
mypar[7] = 0.14;
}
}
Double_t emypar[8];
energyCalibration *thiscalibration = new energyCalibration();
thiscalibration->setScanSign(1);
thiscalibration->setStartParametersKb(mypar);
thiscalibration->fixParameter(0,0.); // no background
thiscalibration->fixParameter(1,0.);
TF1* fittedfun = thiscalibration->fitSpectrumKb(proj_peak,mypar,emypar);
TF1 *gaus_Ka = new TF1("gaus_Ka","gaus",proj->GetBinLowEdge(low_bin_peak),proj->GetBinLowEdge(high_bin_peak+1));
gaus_Ka->SetParameters(mypar[4],mypar[2],mypar[3]);
gaus_Ka->SetLineColor(kBlue);
TF1 *erfc_Ka = new TF1("erfc_Ka","[0]/2.*(TMath::Erfc(([1]*(x-[2])/[3])/(TMath::Sqrt(2.))))",proj->GetBinLowEdge(low_bin_peak),proj->GetBinLowEdge(high_bin_peak+1));
erfc_Ka->SetParameters(mypar[4]*mypar[5], 1, mypar[2], mypar[3]);
erfc_Ka->SetLineColor(kOrange);
TF1 *gaus_Kb = new TF1("gaus_Kb","gaus",proj->GetBinLowEdge(low_bin_peak),proj->GetBinLowEdge(high_bin_peak+1));
gaus_Kb->SetParameters(mypar[4]*mypar[7],mypar[6]*mypar[2],mypar[3]);
gaus_Kb->SetLineColor(kGreen+2);
TF1 *erfc_Kb = new TF1("erfc_Kb","[0]/2.*(TMath::Erfc(([1]*(x-[2])/[3])/(TMath::Sqrt(2.))))",proj->GetBinLowEdge(low_bin_peak),proj->GetBinLowEdge(high_bin_peak+1));
erfc_Kb->SetParameters(mypar[4]*mypar[7]*mypar[5], 1, mypar[6]*mypar[2], mypar[3]);
erfc_Kb->SetLineColor(kOrange+7);
proj_peak->Draw();
A3->Update();
erfc_Kb->Draw("same");
erfc_Ka->Draw("same");
gaus_Kb->Draw("same");
gaus_Ka->Draw("same");
fittedfun->Draw("same");
A3->Update();
proj_peak->GetXaxis()->SetTitle("Pedestal corrected ADC [ADU]");
fittedfun->SetParNames("Bkg height", "Bkg grad", "K_{#alpha} pos", "Noise RMS", "K_{#alpha} height", "CS", "K_{#beta}/K_{#alpha} pos", "K_{#beta} frac");
TPaveStats *st = (TPaveStats*)proj_peak->FindObject("stats");
st->SetX1NDC(0.15);
st->SetX2NDC(0.55);
st->SetY1NDC(0.7);
st->SetY2NDC(0.94);
st->SetBorderSize(0);
st->SetTextSize(0.04);
A3->Modified();
A3->Update();
} else {
std::cout << "Masked pixel";
}
rootapp.Run();
return 0;
}

View File

@@ -66,7 +66,8 @@ int main(int argc, char* argv[]) {
for (int sci = 0; sci < NSC; ++sci) {
// CuFluo HG0 dataset
sprintf( savename, "data/M%s/CuFluo_gain_sc%d_HG0_M%s.root", module_str.c_str(), sci, module_str.c_str() );
//sprintf( savename, "data/M%s/CuFluo_gain_sc%d_HG0_M%s.root", module_str.c_str(), sci, module_str.c_str() );
sprintf( savename, "/mnt/sls_det_storage/jungfrau_calib/ana/M%s_CalibAna/data/CuFluo_gain_sc%d_HG0_M%s.root", module_str.c_str(), sci, module_str.c_str() );
TFile* FL_HG0_file = new TFile((char*)savename,"READ");
TH2F* FL_HG0_gain_map = 0;
TH2F* FL_HG0_gainer_map = 0;
@@ -80,7 +81,8 @@ int main(int argc, char* argv[]) {
}
// CuFluo G0 dataset
sprintf( savename, "data/M%s/CuFluo_gain_sc%d_G0_M%s.root", module_str.c_str(), sci, module_str.c_str() );
//sprintf( savename, "data/M%s/CuFluo_gain_sc%d_G0_M%s.root", module_str.c_str(), sci, module_str.c_str() );
sprintf( savename, "/mnt/sls_det_storage/jungfrau_calib/ana/M%s_CalibAna/data/CuFluo_gain_sc%d_G0_M%s.root", module_str.c_str(), sci, module_str.c_str() );
TFile* FL_G0_file = new TFile((char*)savename,"READ");
TH2F* FL_G0_gain_map = 0;
TH2F* FL_G0_gainer_map = 0;

144
Multi_filename_creator.sh Normal file
View File

@@ -0,0 +1,144 @@
#!/bin/bash
if [[ "$0" == *"Multi_filename_creator.sh"* ]]; then
echo "script changes env. variables: should be invoked with source, not sh "
exit
fi
if [ ! -v $6 ]; then
echo $0
echo "Run pccalib.sh [pc_name] to set the DST ip address before running the filename creator"
echo "printing filenames for jfcalib0 " $1
echo "printing filenames for jfcalib1 " $2
echo "printing filenames for jfcalib2 " $3
echo "printing filenames for jfcalib3 " $4
echo "printing filenames for jfcalib4 " $5
echo "printing filenames for jfcalib5 " $6
#define folder structure
parentdir="/mnt/sls_det_storage/jungfrau_calib/" #"/home/l_msdetect/test/" #"/mnt/sls_det_storage/jungfrau_calib/"
calib0_relativedir="data/Module_"$1"_Calib/"
calib1_relativedir="data/Module_"$2"_Calib/"
calib2_relativedir="data/Module_"$3"_Calib/"
calib3_relativedir="data/Module_"$4"_Calib/"
calib4_relativedir="data/Module_"$5"_Calib/"
calib5_relativedir="data/Module_"$6"_Calib/"
ana0_relativedir="ana/M"$1"_CalibAna/"
ana1_relativedir="ana/M"$2"_CalibAna/"
ana2_relativedir="ana/M"$3"_CalibAna/"
ana3_relativedir="ana/M"$4"_CalibAna/"
ana4_relativedir="ana/M"$5"_CalibAna/"
ana5_relativedir="ana/M"$6"_CalibAna/"
calibdatafolder0=$parentdir$calib0_relativedir
calibdatafolder1=$parentdir$calib1_relativedir
calibdatafolder2=$parentdir$calib2_relativedir
calibdatafolder3=$parentdir$calib3_relativedir
calibdatafolder4=$parentdir$calib4_relativedir
calibdatafolder5=$parentdir$calib5_relativedir
anadatafolder0=$parentdir$ana0_relativedir
anadatafolder1=$parentdir$ana1_relativedir
anadatafolder2=$parentdir$ana2_relativedir
anadatafolder3=$parentdir$ana3_relativedir
anadatafolder4=$parentdir$ana4_relativedir
anadatafolder5=$parentdir$ana5_relativedir
datestring=$(date +%F)
echo "Relative calib directory is "$calib0_relativedir
echo "Relative calib directory is "$calib1_relativedir
echo "Relative calib directory is "$calib2_relativedir
echo "Relative calib directory is "$calib3_relativedir
echo "Relative calib directory is "$calib4_relativedir
echo "Relative calib directory is "$calib5_relativedir
echo "Relative analysis results directory is "$ana0_relativedir
echo "Relative analysis results directory is "$ana1_relativedir
echo "Relative analysis results directory is "$ana2_relativedir
echo "Relative analysis results directory is "$ana3_relativedir
echo "Relative analysis results directory is "$ana4_relativedir
echo "Relative analysis results directory is "$ana5_relativedir
echo "mkdir "$calibdatafolder0 "if not already existing."
echo "mkdir "$calibdatafolder1 "if not already existing."
echo "mkdir "$calibdatafolder2 "if not already existing."
echo "mkdir "$calibdatafolder3 "if not already existing."
echo "mkdir "$calibdatafolder4 "if not already existing."
echo "mkdir "$calibdatafolder5 "if not already existing."
mkdir -p $calibdatafolder0
mkdir -p $calibdatafolder1
mkdir -p $calibdatafolder2
mkdir -p $calibdatafolder3
mkdir -p $calibdatafolder4
mkdir -p $calibdatafolder5
Rcv0="./slsDetector_bin/ju_udp_receiver_3threads_2_0_jfcalib0 S " #pc-jungfrau-02 RHEL8
Rcv1="./slsDetector_bin/ju_udp_receiver_3threads_2_0_jfcalib1 S " #pc-jungfrau-02 RHEL8
Rcv2="./slsDetector_bin/ju_udp_receiver_3threads_2_0_jfcalib2 S " #pc-jungfrau-02 RHEL8
Rcv3="./slsDetector_bin/ju_udp_receiver_3threads_2_0_jfcalib3 S " #pc-jungfrau-02 RHEL8
Rcv4="./slsDetector_bin/ju_udp_receiver_3threads_2_0_jfcalib4 S " #pc-jungfrau-02 RHEL8
Rcv5="./slsDetector_bin/ju_udp_receiver_3threads_2_0_jfcalib5 S " #pc-jungfrau-02 RHEL8
export TKBPG0_0=$Rcv0$calibdatafolder0"BP_M"$1"_"$datestring"_ "$DSTIP
export TKBPG0_1=$Rcv1$calibdatafolder1"BP_M"$2"_"$datestring"_ "$DSTIP
export TKBPG0_2=$Rcv2$calibdatafolder2"BP_M"$3"_"$datestring"_ "$DSTIP
export TKBPG0_3=$Rcv3$calibdatafolder3"BP_M"$4"_"$datestring"_ "$DSTIP
export TKBPG0_4=$Rcv4$calibdatafolder4"BP_M"$5"_"$datestring"_ "$DSTIP
export TKBPG0_5=$Rcv5$calibdatafolder5"BP_M"$6"_"$datestring"_ "$DSTIP
export TKBPHG0_0=$Rcv0$calibdatafolder0"BP_M"$1"_"$datestring"_HGOG1G2_ "$DSTIP
export TKBPHG0_1=$Rcv1$calibdatafolder1"BP_M"$2"_"$datestring"_HGOG1G2_ "$DSTIP
export TKBPHG0_2=$Rcv2$calibdatafolder2"BP_M"$3"_"$datestring"_HGOG1G2_ "$DSTIP
export TKBPHG0_3=$Rcv3$calibdatafolder3"BP_M"$4"_"$datestring"_HGOG1G2_ "$DSTIP
export TKBPHG0_4=$Rcv4$calibdatafolder4"BP_M"$5"_"$datestring"_HGOG1G2_ "$DSTIP
export TKBPHG0_5=$Rcv5$calibdatafolder5"BP_M"$6"_"$datestring"_HGOG1G2_ "$DSTIP
export TKCSHG0_0=$Rcv0$calibdatafolder0"CS_M"$1"_"$datestring"_HGOG1G2_ "$DSTIP
export TKCSHG0_1=$Rcv1$calibdatafolder1"CS_M"$2"_"$datestring"_HGOG1G2_ "$DSTIP
export TKCSHG0_2=$Rcv2$calibdatafolder2"CS_M"$3"_"$datestring"_HGOG1G2_ "$DSTIP
export TKCSHG0_3=$Rcv3$calibdatafolder3"CS_M"$4"_"$datestring"_HGOG1G2_ "$DSTIP
export TKCSHG0_4=$Rcv4$calibdatafolder4"CS_M"$5"_"$datestring"_HGOG1G2_ "$DSTIP
export TKCSHG0_5=$Rcv5$calibdatafolder5"CS_M"$6"_"$datestring"_HGOG1G2_ "$DSTIP
export TKCSG0_0=$Rcv0$calibdatafolder0"CS_M"$1"_"$datestring"_ $DSTIP"
export TKCSG0_1=$Rcv1$calibdatafolder1"CS_M"$2"_"$datestring"_ $DSTIP"
export TKCSG0_2=$Rcv2$calibdatafolder2"CS_M"$3"_"$datestring"_ $DSTIP"
export TKCSG0_3=$Rcv3$calibdatafolder3"CS_M"$4"_"$datestring"_ $DSTIP"
export TKCSG0_4=$Rcv4$calibdatafolder4"CS_M"$5"_"$datestring"_ $DSTIP"
export TKCSG0_5=$Rcv5$calibdatafolder5"CS_M"$6"_"$datestring"_ $DSTIP"
echo "exporting the fluorescence receiver commands "
export TKFG0_0=$Rcv0$calibdatafolder0"CuFluoG0_M"$1"_"$datestring"_ "$DSTIP
export TKFG0_1=$Rcv1$calibdatafolder1"CuFluoG0_M"$2"_"$datestring"_ "$DSTIP
export TKFG0_2=$Rcv2$calibdatafolder2"CuFluoG0_M"$3"_"$datestring"_ "$DSTIP
export TKFG0_3=$Rcv3$calibdatafolder3"CuFluoG0_M"$4"_"$datestring"_ "$DSTIP
export TKFG0_4=$Rcv4$calibdatafolder4"CuFluoG0_M"$5"_"$datestring"_ "$DSTIP
export TKFG0_5=$Rcv5$calibdatafolder5"CuFluoG0_M"$6"_"$datestring"_ "$DSTIP
export TKFHG0_0=$Rcv0$calibdatafolder0"CuFluoHG0_M"$1"_"$datestring"_ "$DSTIP
export TKFHG0_1=$Rcv1$calibdatafolder1"CuFluoHG0_M"$2"_"$datestring"_ "$DSTIP
export TKFHG0_2=$Rcv2$calibdatafolder2"CuFluoHG0_M"$3"_"$datestring"_ "$DSTIP
export TKFHG0_3=$Rcv3$calibdatafolder3"CuFluoHG0_M"$4"_"$datestring"_ "$DSTIP
export TKFHG0_4=$Rcv4$calibdatafolder4"CuFluoHG0_M"$5"_"$datestring"_ "$DSTIP
export TKFHG0_5=$Rcv5$calibdatafolder5"CuFluoHG0_M"$6"_"$datestring"_ "$DSTIP
export TKPG0_0=$Rcv0$calibdatafolder0"pedeG0_M"$1"_"$datestring"_ "$DSTIP
export TKPG0_1=$Rcv1$calibdatafolder1"pedeG0_M"$2"_"$datestring"_ "$DSTIP
export TKPG0_2=$Rcv2$calibdatafolder2"pedeG0_M"$3"_"$datestring"_ "$DSTIP
export TKPG0_3=$Rcv3$calibdatafolder3"pedeG0_M"$4"_"$datestring"_ "$DSTIP
export TKPG0_4=$Rcv4$calibdatafolder4"pedeG0_M"$5"_"$datestring"_ "$DSTIP
export TKPG0_5=$Rcv5$calibdatafolder5"pedeG0_M"$6"_"$datestring"_ "$DSTIP
export TKPHG0_0=$Rcv0$calibdatafolder0"pedeHG0_M"$1"_"$datestring"_ "$DSTIP
export TKPHG0_1=$Rcv1$calibdatafolder1"pedeHG0_M"$2"_"$datestring"_ "$DSTIP
export TKPHG0_2=$Rcv2$calibdatafolder2"pedeHG0_M"$3"_"$datestring"_ "$DSTIP
export TKPHG0_3=$Rcv3$calibdatafolder3"pedeHG0_M"$4"_"$datestring"_ "$DSTIP
export TKPHG0_4=$Rcv4$calibdatafolder4"pedeHG0_M"$5"_"$datestring"_ "$DSTIP
export TKPHG0_5=$Rcv5$calibdatafolder5"pedeHG0_M"$6"_"$datestring"_ "$DSTIP
else
echo "Specify module number for each jfcalib board after firt argument"
echo "Script finished"
fi

View File

@@ -13,7 +13,7 @@ echo "printing filenames for module " $1
#define folder structure
parentdir="/mnt/sls_det_storage/jungfrau_calib/"
parentdir="/mnt/sls_det_storage/jungfrau_calib/" #"/home/l_msdetect/test/" #"/mnt/sls_det_storage/jungfrau_calib/"
calib_relativedir="data/Module_"$1"_Calib/"
ana_relativedir="ana/M"$1"_CalibAna/"
calibdatafolder=$parentdir$calib_relativedir

View File

@@ -104,3 +104,13 @@ CS_analysis_M439: CS_analysis_M439.cpp
Default_pixels_arrays: Default_pixels_arrays.cpp
g++ -Wall -O3 -m64 -I$(ROOTSYS)/include -L$(ROOTSYS)/lib -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic Default_pixels_arrays.cpp -o Default_pixels_arrays
Fluo_analysis_Ti_In: Fluo_analysis_Ti_In.cpp
g++ -Wall -O3 -m64 -I$(ROOTSYS)/include -L$(ROOTSYS)/lib -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic Fluo_analysis_Ti_In.cpp -o Fluo_analysis_Ti_In
Fluo_fit: Fluo_fit.cpp
g++ -Wall -ggdb -fopenmp -O3 -m64 -I$(ROOTSYS)/include -L$(ROOTSYS)/lib -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -lrt -o Fluo_fit Fluo_fit.cpp
CuFluo_fit_sc: CuFluo_fit_sc.cpp
g++ -Wall -ggdb -fopenmp -O3 -m64 -I$(ROOTSYS)/include -L$(ROOTSYS)/lib -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -lrt -o CuFluo_fit_sc CuFluo_fit_sc.cpp

File diff suppressed because it is too large Load Diff