from flarestack.data.icecube.gfu import gfu_binning import numpy as np gfu_data_dir = icecube_dataset_dir + "gfu/version-002-p01/" gfu_v002_p01 = IceCubeDataset() sample_name = "gfu_v002_p01" gfu_season = IceCubeSeason( season_name=sample_name, sample_name=sample_name, exp_path=[ gfu_data_dir + "SplineMPEmax.MuEx.IC86-2015.npy", gfu_data_dir + "SplineMPEmax.MuEx.IC86-2016.npy", gfu_data_dir + "SplineMPEmax.MuEx.IC86-2017.npy" ], mc_path=gfu_data_dir + "SplineMPEmax.MuEx.MC.npy", grl_path=gfu_data_dir + "SplineMPEmax.MuEx.GRL.npy", sin_dec_bins=gfu_binning[0], log_e_bins=gfu_binning[1] ) gfu_v002_p01.add_season(gfu_season) txs_sample_v1 = IceCubeDataset() for season in ps_v002_p01.values(): txs_sample_v1.add_season(season) txs_sample_v1.add_season(gfu_season)
def old_ic_season(season): return IceCubeSeason(season_name=season, sample_name=sample_name, exp_path=ps_data_dir + "{0}_exp.npy".format(season), mc_path=ps_data_dir + "{0}_MC.npy".format(season), grl_path=grl_data_dir + "{0}_exp.npy".format(season), sin_dec_bins=get_ps_binning(season)[0], log_e_bins=get_ps_binning(season)[1]) old_seasons = ["IC40", "IC59", "IC79", "IC86_2011"] for season in old_seasons: ps_v003_p01.add_season(old_ic_season(season)) # Add in combined IC86 2012-2017 seasons new_years = ["2012", "2013", "2014", "2015", "2016", "2017"] ic86_234567 = IceCubeSeason( season_name="IC86_2012_17", sample_name=sample_name, exp_path=[ps_data_dir + "IC86_{0}_exp.npy".format(x) for x in new_years], mc_path=ps_data_dir + "IC86_2012_MC.npy", grl_path=[grl_data_dir + "IC86_{0}_exp.npy".format(x) for x in new_years], sin_dec_bins=get_ps_binning("IC86_2012")[0], log_e_bins=get_ps_binning("IC86_2012")[1]) ps_v003_p01.add_season(ic86_234567)
all_years = ["2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018"] gfu_v002_p04 = IceCubeDataset() sample_name = "gfu_v002_p04" gfu_8_year = IceCubeSeason( season_name="gfu_8_year", sample_name=sample_name, exp_path=[get_exp_path(x) for x in all_years], mc_path=gfu_data_dir + "IC86_2011_MC.npy", grl_path=[get_grl_path(x) for x in all_years], sin_dec_bins=gfu_binning[0], log_e_bins=gfu_binning[1], ) gfu_v002_p04.add_season(gfu_8_year) for year in all_years: gfu_year = IceCubeSeason( season_name="IC86_{0}".format(year), sample_name=sample_name, exp_path=get_exp_path(year), mc_path=gfu_data_dir + "IC86_2011_MC.npy", grl_path=get_grl_path(year), sin_dec_bins=gfu_binning[0], log_e_bins=gfu_binning[1], ) gfu_v002_p04.add_subseason(gfu_year)
ps_v002_p01 = IceCubeDataset() sample_name = "ps_tracks_v002_p01" ic40 = IceCubeSeason( season_name="IC40", sample_name=sample_name, exp_path=ps_data_dir + "IC40_exp.npy", mc_path=ps_data_dir + "IC40_corrected_MC.npy", grl_path=ps_data_dir + "IC40_GRL.npy", sin_dec_bins=get_ps_binning("IC40")[0], log_e_bins=get_ps_binning("IC40")[1] ) ps_v002_p01.add_season(ic40) ic59 = IceCubeSeason( season_name="IC59", sample_name=sample_name, exp_path=ps_data_dir + "IC59_exp.npy", mc_path=ps_data_dir + "IC59_corrected_MC.npy", grl_path=ps_data_dir + "IC59_GRL.npy", sin_dec_bins=get_ps_binning("IC59")[0], log_e_bins=get_ps_binning("IC59")[1] ) ps_v002_p01.add_season(ic59) ic79 = IceCubeSeason(
icecube_dataset_dir = get_dataset_dir() gfu_data_dir = icecube_dataset_dir + "gfu/version-002-p02/" gfu_v002_p02 = IceCubeDataset() sample_name = "gfu_v002_p02" gfu_season = IceCubeSeason( season_name=sample_name, sample_name=sample_name, exp_path=[ gfu_data_dir + "SplineMPEmax.MuEx.IC86-2015.npy", gfu_data_dir + "SplineMPEmax.MuEx.IC86-2016.npy", gfu_data_dir + "SplineMPEmax.MuEx.IC86-2017.npy", ], mc_path=gfu_data_dir + "SplineMPEmax.MuEx.MC.npy", grl_path=gfu_data_dir + "SplineMPEmax.MuEx.GRL.npy", sin_dec_bins=gfu_binning[0], log_e_bins=gfu_binning[1], ) gfu_v002_p02.add_season(gfu_season) txs_sample_v2 = IceCubeDataset() for season in ps_v002_p01.values(): txs_sample_v2.add_season(season) txs_sample_v2.add_season(gfu_season)
np.linspace(-1., -0.25, 10 + 1), np.linspace(-0.25, 0.0, 10 + 1), np.linspace(0.0, 1., 10 + 1), ])) energy_bins = np.arange(2., 9. + 0.01, 0.125) ic40 = IceCubeSeason(season_name="IC40", sample_name=sample_name, exp_path=ps_data_dir + "IC40_exp.npy", mc_path=ps_data_dir + "IC40_MC.npy", grl_path=grl_data_dir + "IC40_exp.npy", sin_dec_bins=sinDec_bins, log_e_bins=energy_bins) ps_v004_p00.add_season(ic40) ############ # - IC59 - # ############ sinDec_bins = np.unique( np.concatenate([ np.linspace(-1., -0.95, 2 + 1), np.linspace(-0.95, -0.25, 25 + 1), np.linspace(-0.25, 0.05, 15 + 1), np.linspace(0.05, 1., 10 + 1), ])) energy_bins = np.arange(2., 9.5 + 0.01, 0.125)
ps_v002_p03 = IceCubeDataset() sample_name = "ps_tracks_v002_p03" logger.debug(f"building {sample_name}") logger.debug(f"adding IC40") ic40 = IceCubeSeason( season_name="IC40", sample_name=sample_name, exp_path=ps_data_dir + "IC40_exp.npy", mc_path=ps_data_dir + "IC40_MC.npy", grl_path=grl_data_dir + "IC40_exp.npy", sin_dec_bins=get_ps_binning("IC40")[0], log_e_bins=get_ps_binning("IC40")[1], ) ps_v002_p03.add_season(ic40) logger.debug("adding IC59") ic59 = IceCubeSeason( season_name="IC59", sample_name=sample_name, exp_path=ps_data_dir + "IC59_exp.npy", mc_path=ps_data_dir + "IC59_MC.npy", grl_path=grl_data_dir + "IC59_exp.npy", sin_dec_bins=get_ps_binning("IC59")[0], log_e_bins=get_ps_binning("IC59")[1], ) ps_v002_p03.add_season(ic59) logger.debug("adding IC79")