22import os
33
44import numpy as np
5- from ctapipe_io_nectarcam import constants
65from traitlets .config import Config
76
87from nectarchain .makers .calibration .calibration_pipeline import (
1514log = logging .getLogger (__name__ )
1615log .handlers = logging .getLogger ("__main__" ).handlers
1716
17+ # Set NECTARCAMDATA environment
1818os .environ ["NECTARCAMDATA" ] = "/data/users/pcorrea"
1919
20+ # Some the run numbers to use for each calibration tool
2021ped_run_number = 6249
2122FF_run_number = 6252
2223FF_SPE_run_number = 3936
2324FF_SPE_HHV_run_number = 3942
24- max_events = 1000
25- progress_bar = True
26- overwrite = True
2725
26+ # Specify which tools to use for each step in the calibration
2827ped_tool_name = "PedestalNectarCAMCalibrationTool"
29- gain_tool_name = "PhotoStatisticNectarCAMCalibrationTool"
28+ gain_tool_name = "FlatFieldSPENominalStdNectarCAMCalibrationTool"
29+ FF_tool_name = "FlatfieldNectarCAMCalibrationTool"
30+
31+ # Path for a 1400-V result file of the SPE fit
32+ # used in the SPE combined fit and photostatistic method
3033SPE_HHV_result_path = (
3134 "/data/users/pcorrea/SPEHHV_res/"
32- "output_FlatFieldSPEHHVNectarCAMCalibrationTool_run3942_maxEvents1000.h5"
35+ "FlatFieldSPEHHVStdNectarCAM_run3942_LocalPeakWindowSum_"
36+ "window_shift_4_window_width_8.h5"
3337)
3438
39+ # Some general configurations that will pass to all subtools
40+ max_events = 12000
41+ progress_bar = True
42+ overwrite = True
43+
44+ # Some specific configurations for each subtool
3545config = Config ()
36- # config.FlatfieldNectarCAMCalibrationTool.gain = gain_array.tolist()
37- # asked_pixels_id_SPE = np.arange(100)
38- # config.FlatFieldSPENominalNectarCAMCalibrationTool.asked_pixels_id = (
39- # asked_pixels_id_SPE.tolist()
40- # )
41- config [ped_tool_name ].events_per_slice = 500
42- config [gain_tool_name ].multiproc = False
46+ config [ped_tool_name ].events_per_slice = 5000
47+ config [gain_tool_name ].multiproc = True
4348config [gain_tool_name ].nproc = 8
4449# config[gain_tool_name].display = False
45- config [gain_tool_name ].asked_pixels_id = [
46- 100 ,
47- 200 ,
48- 300 ,
49- 400 ,
50- 500 ,
51- 600 ,
52- 700 ,
53- 800 ,
54- 900 ,
55- 1000 ,
56- ]
50+ asked_pixels_id = np .arange (100 )
51+ config [gain_tool_name ].asked_pixels_id = asked_pixels_id .tolist ()
5752
5853
5954def main ():
@@ -64,7 +59,9 @@ def main():
6459 FF_SPE_run_number = FF_SPE_run_number ,
6560 FF_SPE_HHV_run_number = FF_SPE_HHV_run_number ,
6661 SPE_HHV_result_path = SPE_HHV_result_path ,
62+ ped_tool_name = ped_tool_name ,
6763 gain_tool_name = gain_tool_name ,
64+ FF_tool_name = FF_tool_name ,
6865 max_events = max_events ,
6966 progress_bar = progress_bar ,
7067 overwrite = overwrite ,
0 commit comments