|
| 1 | +from flarestack.data.icecube.ic_season import IceCubeDataset, icecube_dataset_dir |
| 2 | +from flarestack.data.icecube.northern_tracks import ( |
| 3 | + NTSeasonNewStyle, |
| 4 | + get_diffuse_binning, |
| 5 | +) |
| 6 | + |
| 7 | +nt_data_dir = icecube_dataset_dir / "northern_tracks/version-005-p04" |
| 8 | + |
| 9 | +sample_name = "northern_tracks_v005_p04" |
| 10 | + |
| 11 | +dataset_name = "icecube." + sample_name |
| 12 | + |
| 13 | +nt_v005_p04 = IceCubeDataset(name=dataset_name) |
| 14 | + |
| 15 | +IC86_start_year = 2011 |
| 16 | +IC86_stop_year = 2022 |
| 17 | +IC86_timerange = range(IC86_start_year, IC86_stop_year + 1) |
| 18 | + |
| 19 | +seasons = [f"IC86_{yr}" for yr in IC86_timerange] |
| 20 | + |
| 21 | +# ================================== |
| 22 | +# Add individual years as subseasons |
| 23 | +# ================================== |
| 24 | + |
| 25 | + |
| 26 | +def generate_diffuse_season(name): |
| 27 | + season = NTSeasonNewStyle( |
| 28 | + season_name=name, |
| 29 | + sample_name=sample_name, |
| 30 | + exp_path=nt_data_dir / f"{name}_exp.npy", |
| 31 | + mc_path=nt_data_dir / "IC86_pass2_MC.npy", |
| 32 | + grl_path=nt_data_dir / f"GRL/{name}_exp.npy", |
| 33 | + sin_dec_bins=get_diffuse_binning(name)[0], |
| 34 | + log_e_bins=get_diffuse_binning(name)[1], |
| 35 | + ) |
| 36 | + return season |
| 37 | + |
| 38 | + |
| 39 | +for season in seasons: |
| 40 | + subseason = generate_diffuse_season(season) |
| 41 | + nt_v005_p04.add_subseason(subseason) |
| 42 | + |
| 43 | + |
| 44 | +# ================================== |
| 45 | +# Add combo season |
| 46 | +# ================================== |
| 47 | + |
| 48 | +name = "IC86_1-12" |
| 49 | + |
| 50 | +combo_season = NTSeasonNewStyle( |
| 51 | + season_name=name, |
| 52 | + sample_name=sample_name, |
| 53 | + exp_path=[nt_data_dir / f"IC86_{yr}_exp.npy" for yr in IC86_timerange], |
| 54 | + mc_path=nt_data_dir / "IC86_pass2_MC.npy", |
| 55 | + grl_path=[nt_data_dir / f"GRL/IC86_{yr}_exp.npy" for yr in IC86_timerange], |
| 56 | + sin_dec_bins=get_diffuse_binning(name)[0], |
| 57 | + log_e_bins=get_diffuse_binning(name)[1], |
| 58 | +) |
| 59 | + |
| 60 | +nt_v005_p04.add_season(combo_season) |
0 commit comments