Beispiel #1
0
    Change logs:

    Version 2018/07/25
    * initial version



"""
from flarestack.data.icecube.ic_season import IceCubeDataset, get_dataset_dir
from flarestack.data.icecube.northern_tracks import NTSeason, get_diffuse_binning

icecube_dataset_dir = get_dataset_dir()

nt_data_dir = icecube_dataset_dir + "northern_tracks/version-002-p05/"

nt_v002_p05 = IceCubeDataset()

sample_name = "northern_tracks_v002_p05"


def generate_diffuse_season(name):
    season = NTSeason(
        season_name=name,
        sample_name=sample_name,
        exp_path=nt_data_dir +
        "dataset_8yr_fit_{0}_exp_compressed.npy".format(name),
        mc_path=nt_data_dir +
        "dataset_8yr_fit_{0}_MC_compressed.npy".format(name),
        grl_path=nt_data_dir +
        "GRL/dataset_8yr_fit_{0}_exp_compressed.npy".format(name),
        sin_dec_bins=get_diffuse_binning(name)[0],
Beispiel #2
0
"""PS Tracks v003_p01, as used by Tessa in the 10 year PS analysis.
"""
from flarestack.data.icecube.ic_season import IceCubeSeason, \
    IceCubeDataset, icecube_dataset_dir
from flarestack.data.icecube.ps_tracks import get_ps_binning
import numpy as np

ps_data_dir = icecube_dataset_dir + "ps_tracks/version-003-p01/"
grl_data_dir = ps_data_dir + "GRL/"

ps_v003_p01 = IceCubeDataset()

sample_name = "ps_tracks_v003_p01"

# Add in old seasons before full detector operation, and IC86_1


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))
Beispiel #3
0
gfu_data_dir = icecube_dataset_dir + "gfu/version-002-p04/"
grl_dir = gfu_data_dir + "GRL/"


def get_exp_path(year):
    return gfu_data_dir + "IC86_{0}_data.npy".format(year)


def get_grl_path(year):
    return grl_dir + "IC86_{0}_data.npy".format(year)


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)
Beispiel #4
0
/data/ana .. /current, with the following readme:

    * better pull-correction using splines, instead of polynomial fits

This is the sample that was used for the original TXS analysis in 2017
(NOT THE ONE THAT INCLUDED ADDITIONAL DATA UP TO SPRING 2018!)
"""
from flarestack.data.icecube.ps_tracks.ps_v002_p01 import ps_v002_p01
from flarestack.data.icecube.ic_season import IceCubeDataset, \
    IceCubeSeason, icecube_dataset_dir
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]
Beispiel #5
0
      MC File    IC86-2013_corrected_MC_v2.npy

    IC86, 2014:
      Data File  IC86-2014_exp_v2.npy
      MC File    IC86-2014_corrected_MC_v2.npy

"""
from flarestack.data.icecube.ic_season import IceCubeDataset, \
    IceCubeSeason, icecube_dataset_dir
from flarestack.data.icecube.ps_tracks import get_ps_binning
import numpy as np
import copy

ps_data_dir = icecube_dataset_dir + "ps_tracks/version-002-p01/"

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)
Beispiel #6
0
"""

from flarestack.data.icecube.ps_tracks.ps_v002_p01 import ps_v002_p01
from flarestack.data.icecube.ic_season import (
    IceCubeDataset,
    IceCubeSeason,
    get_dataset_dir,
)
from flarestack.data.icecube.gfu import gfu_binning
import numpy as np

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],
Beispiel #7
0
from flarestack.data.icecube.ic_season import IceCubeDataset, get_dataset_dir
from flarestack.data.icecube.northern_tracks import (
    NTSeasonNewStyle,
    get_diffuse_binning,
)

icecube_dataset_dir = get_dataset_dir()

nt_data_dir = icecube_dataset_dir + "northern_tracks/version-005-p00/"

nt_v005_p00 = IceCubeDataset()

sample_name = "northern_tracks_v005_p00"


def generate_diffuse_season(name):
    season = NTSeasonNewStyle(
        season_name=name,
        sample_name=sample_name,
        exp_path=nt_data_dir + f"{name}_exp.npy",
        mc_path=nt_data_dir + "IC86_pass2_MC.npy",
        grl_path=nt_data_dir + f"GRL/{name}_exp.npy",
        sin_dec_bins=get_diffuse_binning(name)[0],
        log_e_bins=get_diffuse_binning(name)[1],
    )
    nt_v005_p00.add_season(season)


seasons = [f"IC86_201{i}" for i in [1, 2, 3, 4, 5, 6, 7, 8, 9]]

for season in seasons:
Beispiel #8
0
    dataset folder and the presentations here:

    https://events.icecube.wisc.edu/event/125/contributions/7204/attachments/5554/6427/200915_pstracks_updates.pdf
    https://drive.google.com/file/d/1E1I8kgRmlWdLdXX_p7UweXn7gJIYx9Mg/view?usp=sharing
"""

import numpy as np
import copy

from flarestack.data.icecube.ic_season import IceCubeDataset, \
    IceCubeSeason, icecube_dataset_dir
from flarestack.data.icecube.ps_tracks import get_ps_binning

ps_data_dir = icecube_dataset_dir + "ps_tracks/version-004-p00/"
grl_data_dir = ps_data_dir + "GRL/"
ps_v004_p00 = IceCubeDataset()

sample_name = "ps_tracks_v004_p00"

##########################
#  START ADDING SEASONS  #
##########################

############
# - IC40 - #
############

sinDec_bins = np.unique(
    np.concatenate([
        np.linspace(-1., -0.25, 10 + 1),
        np.linspace(-0.25, 0.0, 10 + 1),
Beispiel #9
0
from flarestack.data.icecube.ic_season import (
    IceCubeDataset,
    IceCubeSeason,
    get_dataset_dir,
)
from flarestack.data.icecube.ps_tracks import get_ps_binning
import numpy as np
import logging

logger = logging.getLogger(__name__)

icecube_dataset_dir = get_dataset_dir()

ps_data_dir = icecube_dataset_dir + "ps_tracks/version-002-p03/"
grl_data_dir = ps_data_dir + "GRL/"
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)