From 03ab1dfda7e28f9cb07ee8ca43cd9f2a3d62ba74 Mon Sep 17 00:00:00 2001 From: redford_s Date: Fri, 25 Aug 2017 16:45:16 +0200 Subject: [PATCH] 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. --- JFMC_CurrentSourceScan.cpp | 37 +++++++++++++++-------------------- run_JFModuleCalib_CuFBDCS.txt | 16 +++++++-------- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/JFMC_CurrentSourceScan.cpp b/JFMC_CurrentSourceScan.cpp index b3a66c7..a0a35dc 100644 --- a/JFMC_CurrentSourceScan.cpp +++ b/JFMC_CurrentSourceScan.cpp @@ -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); diff --git a/run_JFModuleCalib_CuFBDCS.txt b/run_JFModuleCalib_CuFBDCS.txt index 22a569d..dc390d3 100644 --- a/run_JFModuleCalib_CuFBDCS.txt +++ b/run_JFModuleCalib_CuFBDCS.txt @@ -5,7 +5,7 @@ Module 006 - ESRF ./JFMC_CuFluoPeak 006 /mnt/pcmoench_jungfrau_data/Module_006_161116 10us_500Hz_QS_allgain_pede 10us_500Hz_QS_G0_Cu ./JFMC_CuFluoPeakFit 006 ./JFMC_DirectBeamScan 006 /mnt/pcmoench_jungfrau_data/Module_006_161116 100us_500Hz_QS_allgain_pede_1055 100us_500Hz_QS_beam_scan_a -./JFMC_CurrentSourceScan 006 /mnt/pcmoench_jungfrau_data/Module_006_161116 Current_source_scan_a +./JFMC_CurrentSourceScan 006 /mnt/pcmoench_jungfrau_data1_ib/Module_006_161116 Current_source_scan_a ./JFMC_CalibWriter 006 @@ -13,7 +13,7 @@ Module 008 - Pohang ./JFMC_CuFluoPeak 008 /mnt/pcmoench_jungfrau_data/Module_008_181116 10us_500Hz_QS_allgain_pede_1558 10us_500Hz_QS_G0_Cu_2 ./JFMC_CuFluoPeakFit 008 ./JFMC_DirectBeamScan 008 /mnt/pcmoench_jungfrau_data/Module_008_181116 150us_500Hz_QS_allgain_pede_1332 150us_500Hz_QS_beam_scan_b -./JFMC_CurrentSourceScan 008 /mnt/pcmoench_jungfrau_data/Module_008_181116 Current_source_scan_a +./JFMC_CurrentSourceScan 008 /mnt/pcmoench_jungfrau_data1_ib/Module_008_181116 Current_source_scan_a ./JFMC_CalibWriter 008 @@ -21,7 +21,7 @@ Module 021 - 1M top LCLS, PX ./JFMC_CuFluoPeak 021 /mnt/pcmoench_jungfrau_data/1M_021_022_150916 10us_200Hz_QS_allgain_pede__B 10us_200Hz_QS_G0_Cu__B ./JFMC_CuFluoPeakFit 021 ./JFMC_DirectBeamScan 021 /mnt/pcmoench_jungfrau_data/1M_021_022_150916 200us_200Hz_QS_allgain_pede_scan_d_B 200us_200Hz_QS_beam_scan_d_B -./JFMC_CurrentSourceScan 021 /mnt/pcmoench_jungfrau_data/1M_021_022_150916 Current_source_scan_a_B +./JFMC_CurrentSourceScan 021 /mnt/pcmoench_jungfrau_data1_ib/1M_021_022_150916 Current_source_scan_a_B ./JFMC_CalibWriter 021 @@ -29,7 +29,7 @@ Module 022 - 1M bottom LCLS, PX ./JFMC_CuFluoPeak 022 /mnt/pcmoench_jungfrau_data/1M_021_022_150916 10us_200Hz_QS_allgain_pede__A 10us_200Hz_QS_G0_Cu__A ./JFMC_CuFluoPeakFit 022 ./JFMC_DirectBeamScan 022 /mnt/pcmoench_jungfrau_data/1M_021_022_150916 200us_200Hz_QS_allgain_pede_scan_d_A 200us_200Hz_QS_beam_scan_d_A -./JFMC_CurrentSourceScan 022 /mnt/pcmoench_jungfrau_data/Module_022_Calib CS_HS_NF_200Hz_scan1 +./JFMC_CurrentSourceScan 022 /mnt/pcmoench_jungfrau_data1_ib/Module_022_Calib CS_HS_NF_200Hz_scan1 ./JFMC_CalibWriter 022 @@ -42,21 +42,21 @@ Module 027 - old HDI (no current source scan). sent to ESRF with Paolo Module 040 - partly etched. sent to ESRF with Paolo ./JFMC_CuFluoPeak 040 /mnt/pcmoench_jungfrau_data/Module_040_Calib Cu_FLuo_240317_500Hz_10us_QS_pede Cu_FLuo_240317_500Hz_10us_QS_beam ./JFMC_CuFluoPeakFit 040 -./JFMC_CurrentSourceScan 040 /mnt/pcmoench_jungfrau_data/Module_040_Calib CS_240322_scan +./JFMC_CurrentSourceScan 040 /mnt/pcmoench_jungfrau_data1_ib/Module_040_Calib CS_240322_scan Module 044 - added to the 1M to make the 1.5M, cSAXS ./JFMC_CuFluoPeak 044 /mnt/pcmoench_jungfrau_data/Module044 allpede_10us_500Hz_QS_G0_1500 CuFluo_10us_500Hz_QS_G0 ./JFMC_CuFluoPeakFit 044 ./JFMC_DirectBeamScan 044 /mnt/pcmoench_jungfrau_data/Module044 allpede_150us_500Hz_QS_1620 DB_170221_scan1 -./JFMC_CurrentSourceScan 044 /mnt/pcmoench_jungfrau_data/Module044 CS_170221_scan2 +./JFMC_CurrentSourceScan 044 /mnt/pcmoench_jungfrau_data1_ib/Module044 CS_170221_scan2 ./JFMC_CalibWriter 044 Module 045 - replaces M021 in the 1M ./JFMC_CuFluoPeak 045 /mnt/pcmoench_jungfrau_data/Module_045_Calib pede_G0_1649_HS_NF_500Hz Cu_HS_NF_500Hz ./JFMC_CuFluoPeakFit 045 -./JFMC_CurrentSourceScan 045 /mnt/pcmoench_jungfrau_data/Module_045_Calib CS_HS_NF_200Hz_scan10 +./JFMC_CurrentSourceScan 045 /mnt/pcmoench_jungfrau_data1_ib/Module_045_Calib CS_HS_NF_200Hz_scan10 Module 028 @@ -66,4 +66,4 @@ direct beam scan data only Module 032 current source scan data only -./JFMC_CurrentSourceScan 032 /mnt/pcmoench_jungfrau_data/test_module032_cal_source_15082016 test_currentsourcescan_5 +./JFMC_CurrentSourceScan 032 /mnt/pcmoench_jungfrau_data1_ib/test_module032_cal_source_15082016 test_currentsourcescan_5