3131date = datetime .fromisoformat ("2020-01-17" )
3232nightdir = date_to_dir (date )
3333prod_id = "v0.1.0"
34- dl1_prod_id = cfg . get ( "LST1" , "DL1_PROD_ID" )
35- dl2_prod_id = cfg . get ( "LST1" , "DL2_PROD_ID" )
34+ dl1_prod_id = "tailcut84"
35+ dl2_prod_id = "tailcut84/nsb_tuning_0.14"
3636
3737
3838@pytest .fixture (scope = "session" )
@@ -412,6 +412,9 @@ def sequence_list(
412412 r0_data ,
413413 pedestal_ids_file ,
414414 merged_run_summary ,
415+ dl1b_config_files ,
416+ tailcuts_log_files ,
417+ rf_models ,
415418):
416419 """Creates a sequence list from a run summary file."""
417420 options .directory = running_analysis_dir
@@ -574,10 +577,131 @@ def database(osa_dir):
574577
575578
576579@pytest .fixture (scope = "session" )
577- def gain_selection_flag_file (osa_dir ):
580+ def rf_models_allsky_basedir (base_test_dir ):
581+ directory = base_test_dir / "models/AllSky"
582+ directory .mkdir (parents = True , exist_ok = True )
583+ return directory
584+
585+
586+ @pytest .fixture (scope = "session" )
587+ def rf_model_path (rf_models_allsky_basedir ):
588+ mc_prod = "20240131_allsky_v0.10.5_all_dec_base"
589+ declination_str = "dec_2276"
590+ rf_model_path = rf_models_allsky_basedir / mc_prod / declination_str
591+ rf_model_path .mkdir (parents = True , exist_ok = True )
592+ return rf_model_path
578593
594+
595+ @pytest .fixture (scope = "session" )
596+ def gain_selection_flag_file (osa_dir ):
579597 GainSel_dir = osa_dir / "GainSel" / "20200117"
580598 GainSel_dir .mkdir (parents = True , exist_ok = True )
581599 file = GainSel_dir / "GainSelFinished.txt"
582600 file .touch ()
583601 return file
602+
603+
604+ @pytest .fixture (scope = "session" )
605+ def catB_closed_file (running_analysis_dir ):
606+
607+ catB_closed_file = running_analysis_dir / "catB_00003.closed"
608+ catB_closed_file .touch ()
609+ return catB_closed_file
610+
611+
612+ @pytest .fixture (scope = "session" )
613+ def catB_calib_base_dir (monitoring_dir ):
614+
615+ catB_calib_base_dir = monitoring_dir / "PixelCalibration" / "Cat-B"
616+ catB_calib_base_dir .mkdir (parents = True , exist_ok = True )
617+ return catB_calib_base_dir
618+
619+
620+ @pytest .fixture (scope = "session" )
621+ def catB_calibration_file (catB_calib_dir ):
622+
623+ catB_calib_dir = catB_calib_base_dir / "calibration" / nightdir / prod_id
624+ catB_calib_file = catB_calib_dir / "cat_B_calibration_filters_52.Run00003.h5"
625+ catB_calib_file .touch ()
626+ return catB_calib_file
627+
628+
629+ @pytest .fixture (scope = "session" )
630+ def tailcuts_finder_dir (base_test_dir ):
631+ tailcuts_finder_dir = base_test_dir / "auxiliary" / "TailCuts"
632+ tailcuts_finder_dir .mkdir (parents = True , exist_ok = True )
633+ return tailcuts_finder_dir
634+
635+
636+ @pytest .fixture (scope = "session" )
637+ def dl1b_config_files (tailcuts_finder_dir ):
638+ config_information = dedent (
639+ """\
640+ {
641+ "tailcuts_clean_with_pedestal_threshold": {
642+ "picture_thresh": 8,
643+ "boundary_thresh": 4,
644+ "sigma": 2.5,
645+ "keep_isolated_pixels": false,
646+ "min_number_picture_neighbors": 2,
647+ "use_only_main_island": false,
648+ "delta_time": 2
649+ },
650+ "dynamic_cleaning": {
651+ "apply": true,
652+ "threshold": 267,
653+ "fraction_cleaning_intensity": 0.03
654+ }
655+ }"""
656+ )
657+ config_file1 = tailcuts_finder_dir / "dl1ab_Run01807.json"
658+ config_file1 .touch ()
659+ config_file1 .write_text (config_information )
660+ config_file2 = tailcuts_finder_dir / "dl1ab_Run01808.json"
661+ config_file2 .touch ()
662+ config_file2 .write_text (config_information )
663+ config_file3 = tailcuts_finder_dir / "dl1ab_Run04185.json"
664+ config_file3 .touch ()
665+ config_file3 .write_text (config_information )
666+ return config_file1 , config_file2 , config_file3
667+
668+
669+ @pytest .fixture (scope = "session" )
670+ def tailcuts_log_files (tailcuts_finder_dir ):
671+ log_information = dedent (
672+ """\
673+ Median of 95% quantile of pedestal charge: 5.416 p.e.
674+
675+ Additional NSB rate (over dark MC): 0.2221 p.e./ns
676+ lstchain_find_tailcuts finished successfully!
677+ """
678+ )
679+ log_file1 = tailcuts_finder_dir / "log_find_tailcuts_Run01807.log"
680+ log_file1 .touch ()
681+ log_file1 .write_text (log_information )
682+ log_file2 = tailcuts_finder_dir / "log_find_tailcuts_Run01808.log"
683+ log_file2 .touch ()
684+ log_file2 .write_text (log_information )
685+ log_file3 = tailcuts_finder_dir / "log_find_tailcuts_Run04185.log"
686+ log_file3 .touch ()
687+ log_file3 .write_text (log_information )
688+ return log_file1 , log_file2 , log_file3
689+
690+
691+ @pytest .fixture (scope = "session" )
692+ def rf_models_base_dir (base_test_dir ):
693+ directory = base_test_dir / "models/AllSky"
694+ directory .mkdir (parents = True , exist_ok = True )
695+ return directory
696+
697+
698+ @pytest .fixture (scope = "session" )
699+ def rf_models (rf_models_base_dir ):
700+ rf_models_prefix = cfg .get ("lstchain" , "mc_prod" )
701+ rf_models_path1 = rf_models_base_dir / f"{ rf_models_prefix } nsb_tuning_0.00"
702+ rf_models_path1 .mkdir (parents = True , exist_ok = True )
703+ rf_models_path2 = rf_models_base_dir / f"{ rf_models_prefix } nsb_tuning_0.14/dec_2276"
704+ rf_models_path2 .mkdir (parents = True , exist_ok = True )
705+ rf_models_path3 = rf_models_base_dir / f"{ rf_models_prefix } nsb_tuning_0.14/dec_4822"
706+ rf_models_path3 .mkdir (parents = True , exist_ok = True )
707+ return rf_models_path1 , rf_models_path2 , rf_models_path3
0 commit comments