コード例 #1
0
ファイル: load_j7yr.py プロジェクト: brelethford/IceCube
def initMESEfollowup(energy=True, mode='all', **kwargs):
    arr_exp = cache.load(filename_pickle + "MESE/expfollowup.pickle")
    arr_mc = cache.load(filename_pickle + "MESE/mc.pickle")

    dec_bins = np.unique(
        np.concatenate([
            np.linspace(-1., -0.93, 4 + 1),
            np.linspace(-0.93, hem, 12 + 1),
        ]))

    energy_bins = [np.linspace(2., 8.5, 67 + 1), np.linspace(-1., hem, 4 + 1)]

    arr_mc = arr_mc[arr_mc["logE"] > 1.]

    if energy:
        llh_model = EnergyLLH(energy_bins, sinDec_bins=dec_bins)

    else:

        llh_model = ClassicLLH(sinDec_bins=dec_bins, sinDec_range=[-1., 1.])

    llh = PointSourceLLH(arr_exp,
                         arr_mc,
                         livetime=livetimeMESEfollowup,
                         llh_model=llh_model,
                         mode=mode,
                         **kwargs)

    return (llh, arr_exp, arr_mc)
コード例 #2
0
ファイル: load_j7yr.py プロジェクト: brelethford/IceCube
def init3yr(energy=True, decorr=False, mode='all', **kwargs):
    if decorr:
        arr_exp = cache.load(filename_pickle + "epinat_3yr/noMESE/exp.pickle")
        arr_mc = cache.load(filename_pickle + "epinat_3yr/noMESE/mc.pickle")
    else:
        arr_exp = cache.load(filename_pickle + "epinat_3yr/exp.pickle")
        arr_mc = cache.load(filename_pickle + "epinat_3yr/mc.pickle")
    dec_bins = np.unique(
        np.concatenate([
            np.linspace(-1., -0.93, 4 + 1),
            np.linspace(-0.93, -0.3, 10 + 1),
            np.linspace(-0.3, 0.05, 9 + 1),
            np.linspace(0.05, 1., 18 + 1),
        ]))

    energy_bins = [np.linspace(1., 9.5, 50 + 1), dec_bins]

    if energy:
        llh_model = EnergyLLH(energy_bins, sinDec_bins=dec_bins)
    else:
        llh_model = ClassicLLH(sinDec_bins=dec_bins, sinDec_range=[-1., 1.])

    llh = PointSourceLLH(arr_exp,
                         arr_mc,
                         livetime=livetime3yr,
                         llh_model=llh_model,
                         mode=mode,
                         **kwargs)

    return (llh, arr_exp, arr_mc)
コード例 #3
0
ファイル: load_j7yr.py プロジェクト: brelethford/IceCube
def init86I(energy=True, decorr=False, nopull=False, mode='all', **kwargs):
    if decorr:
        arr_exp = cache.load(filename_pickle + "IC86I/noMESE/exp.pickle")
        arr_mc = cache.load(filename_pickle + "IC86I/noMESE/mc.pickle")
    elif nopull:
        arr_exp = cache.load(filename_pickle + "nopull/IC86I/exp.pickle")
        arr_mc = cache.load(filename_pickle + "nopull/IC86I/mc.pickle")
    else:
        arr_exp = cache.load(filename_pickle + "IC86I/exp.pickle")
        arr_mc = cache.load(filename_pickle + "IC86I/mc.pickle")
    dec_bins = np.unique(
        np.concatenate([
            np.linspace(-1., -0.2, 10 + 1),
            np.linspace(-0.2, hem, 4 + 1),
            np.linspace(hem, 0.2, 5 + 1),
            np.linspace(0.2, 1., 10),
        ]))
    #energy_bins = [np.linspace(1., 10., 67 + 1), dec_bins]
    energy_bins = [np.linspace(1.5, 9.5, 64 + 1), dec_bins]

    if energy:
        llh_model = EnergyLLH(energy_bins, sinDec_bins=dec_bins)
    else:
        llh_model = ClassicLLH(sinDec_bins=dec_bins, sinDec_range=[-1., 1.])

    llh = PointSourceLLH(arr_exp,
                         arr_mc,
                         livetime=livetime_IC86I,
                         llh_model=llh_model,
                         mode=mode,
                         **kwargs)

    return (llh, arr_exp, arr_mc)
コード例 #4
0
ファイル: load_j7yr.py プロジェクト: brelethford/IceCube
def init79(energy=True, decorr=False, mode='all', **kwargs):
    if decorr:
        arr_exp = cache.load(filename_pickle + "IC79/noMESE/exp.pickle")
        arr_mc = cache.load(filename_pickle + "IC79/noMESE/mc.pickle")
    else:
        arr_exp = cache.load(filename_pickle + "IC79/exp.pickle")
        arr_mc = cache.load(filename_pickle + "IC79/mc.pickle")

    dec_bins = np.unique(
        np.concatenate([
            np.linspace(-1., -0.75, 10 + 1),
            np.linspace(-0.75, 0.0, 15 + 1),
            np.linspace(0.0, 1., 20 + 1),
        ]))

    #energy_bins = [np.linspace(2., 9., 67 + 1), dec_bins]
    energy_bins = [np.linspace(2.5, 8.5, 64 + 1), dec_bins]

    if energy:

        llh_model = EnergyLLH(energy_bins, sinDec_bins=dec_bins)
    else:

        llh_model = ClassicLLH(sinDec_bins=dec_bins, sinDec_range=[-1., 1.])

    llh = PointSourceLLH(arr_exp,
                         arr_mc,
                         livetime=livetime_IC79,
                         llh_model=llh_model,
                         mode=mode,
                         **kwargs)

    return (llh, arr_exp, arr_mc)
コード例 #5
0
ファイル: load_j7yr.py プロジェクト: brelethford/IceCube
def init59(energy=True, mode='all', nopull=False, **kwargs):
    if nopull:
        arr_exp = cache.load(filename_pickle + "nopull/IC59/exp.pickle")
        arr_mc = cache.load(filename_pickle + "nopull/IC59/mc.pickle")
    else:
        arr_exp = cache.load(filename_pickle + "IC59/exp.pickle")
        arr_mc = cache.load(filename_pickle + "IC59/mc.pickle")

    dec_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),
        ]))

    dec_bins_logE = np.unique(
        np.concatenate([
            np.linspace(-1., -0.05, 20 + 1),
            np.linspace(0.05, 1., 10 + 1),
        ]))

    #energy_bins = [np.linspace(2., 9.5, 67 + 1), dec_bins_logE]
    energy_bins = [np.linspace(2.5, 8.5, 64 + 1), dec_bins_logE]

    if energy:

        llh_model = EnergyLLH(energy_bins, sinDec_bins=dec_bins)
    else:

        llh_model = ClassicLLH(sinDec_bins=dec_bins, sinDec_range=[-1., 1.])
    llh = PointSourceLLH(arr_exp,
                         arr_mc,
                         livetime=livetime_IC59,
                         llh_model=llh_model,
                         mode=mode,
                         **kwargs)

    return (llh, arr_exp, arr_mc)
コード例 #6
0
ファイル: load_j7yr.py プロジェクト: brelethford/IceCube
def init40(energy=True, mode='all', nopull=False, **kwargs):
    if nopull:
        arr_exp = cache.load(filename_pickle + "nopull/IC40/exp.pickle")
        arr_mc = cache.load(filename_pickle + "nopull/IC40/mc.pickle")
    else:
        arr_exp = cache.load(filename_pickle + "IC40/exp.pickle")
        arr_mc = cache.load(filename_pickle + "IC40/mc.pickle")

    dec_bins = np.unique(
        np.concatenate([
            np.linspace(-1., -0.25, 10 + 1),
            np.linspace(-0.25, 0.0, 5 + 1),
            np.linspace(0.0, 1., 10 + 1),
        ]))

    dec_bins_logE = np.unique(
        np.concatenate([
            np.linspace(-1., -0.25, 10 + 1),
            np.linspace(-0.25, 0.0, 10 + 1),
            np.linspace(0.0, 1., 10 + 1),
        ]))
    #These binnings are done, year specifically, in load.py from stefan.
    #energy_bins = [np.linspace(2., 9., 75 + 1), dec_bins_logE]
    energy_bins = [np.linspace(2.6, 8.4, 64 + 1), dec_bins_logE]
    if energy:

        llh_model = EnergyLLH(energy_bins, sinDec_bins=dec_bins)
    else:

        llh_model = ClassicLLH(sinDec_bins=dec_bins, sinDec_range=[-1., 1.])
    llh = PointSourceLLH(arr_exp,
                         arr_mc,
                         livetime=livetime_IC40,
                         llh_model=llh_model,
                         mode=mode,
                         **kwargs)

    return (llh, arr_exp, arr_mc)