Make check that ADC doesn't equal zero. This isn't a measurement and shouldn't

be included in the average. Reran everything, looks same or better.
Also removed zoom plot, unnecessary.
Repointed data files to new storage name.
This commit is contained in:
redford_s
2017-08-25 16:45:16 +02:00
parent fe34f4a0ad
commit 03ab1dfda7
2 changed files with 24 additions and 29 deletions

View File

@@ -295,11 +295,13 @@ int main(int argc, char* argv[]) {
uint16_t adc = imagedptr[i]&0x3fff;
uint16_t gain = (imagedptr[i]&0xc000) >> 14;
gain_histos[i]->Fill(gain);
if (gain == 1) {
adc_histos_g1[i]->Fill(adc);
} else if (gain == 3) {
adc_histos_g2[i]->Fill(adc);
if (adc > 0) {
gain_histos[i]->Fill(gain);
if (gain == 1) {
adc_histos_g1[i]->Fill(adc);
} else if (gain == 3) {
adc_histos_g2[i]->Fill(adc);
}
}
if ((j-1) < 10 || (j > 8075 && j < 8085)) {
@@ -362,7 +364,7 @@ int main(int argc, char* argv[]) {
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
gainmap_avg->Fill(i%NC,i/NC,gain_histos[i]->GetMean());
adcmap_avg_g1[j/640-1]->Fill(i%NC,i/NC,adc_histos_g1[i]->GetMean());
adcermap_avg_g1[j/640-1]->Fill(i%NC,i/NC,adc_histos_g1[i]->GetMeanError());
@@ -463,7 +465,7 @@ int main(int argc, char* argv[]) {
cout << "frame_counter " << frame_counter << endl;
// save histograms
sprintf(savename,"/mnt/pcmoench_jungfrau_data/jungfrau_ana_sophie/M%s_CalibAna/CS_histos_M%s.root", module_str.c_str(), module_str.c_str());
sprintf(savename,"/mnt/pcmoench_jungfrau_data1_ib/jungfrau_ana_sophie/M%s_CalibAna/CS_histos_M%s.root", module_str.c_str(), module_str.c_str());
TFile* saved_file = new TFile((const char *)(savename),"RECREATE");
for (int i = 0; i < 51; i++) {
@@ -476,7 +478,7 @@ int main(int argc, char* argv[]) {
} else {
// load histos
cout << "LOADING HISTOS" << endl;
sprintf(savename,"/mnt/pcmoench_jungfrau_data/jungfrau_ana_sophie/M%s_CalibAna/CS_histos_M%s.root", module_str.c_str(), module_str.c_str());
sprintf(savename,"/mnt/pcmoench_jungfrau_data1_ib/jungfrau_ana_sophie/M%s_CalibAna/CS_histos_M%s.root", module_str.c_str(), module_str.c_str());
TFile* saved_file = new TFile((const char *)(savename),"READ");
for (int i = 0; i < 51; i++) {
@@ -843,12 +845,12 @@ int main(int argc, char* argv[]) {
delete grap2_norm;
}
delete grap_g1;
delete grap_g2;
delete grap_p1;
delete grap_p2;
delete fit2;
delete fit3;
delete grap_g1;
delete grap_g2;
delete grap_p1;
delete grap_p2;
delete fit2;
delete fit3;
}
}
@@ -1005,13 +1007,6 @@ int main(int argc, char* argv[]) {
sprintf(savename,"plots/M%s/CurrentSource/g1overg2map.png", module_str.c_str());
mapcanvas->SaveAs((const char *)(savename));
g1overg2map->GetXaxis()->SetRangeUser(0,256);
g1overg2map->GetYaxis()->SetRangeUser(240,280);
g1overg2map->Draw("colz");
pave->Draw();
sprintf(savename,"plots/M%s/CurrentSource/g1overg2map_zoom.png", module_str.c_str());
mapcanvas->SaveAs((const char *)(savename));
g1overg2ermap->GetXaxis()->SetTitle("Column");
g1overg2ermap->GetYaxis()->SetTitle("Row");
g1overg2ermap->GetYaxis()->SetTitleOffset(0.7);