示例#1
0
文件: icecube.py 项目: jlazar17/dm
    if Emu_fin_GeV < 10**1.6:
        return 0.0
    elif 10**1.6 < Emu_fin_GeV < 10**2.8:
        return 0.748 * (np.log(Emu_fin_GeV) - 1.6)
    else:
        return 0.9 + 0.54 * (np.log(Emu_fin_GeV) - 2.8)


def R(costh):
    return 0.92 - 0.45 * costh


if __name__ == '__main__':
    # TEST AREA #
    import physicsconstants as PC
    import matplotlib.pyplot as plt
    import DM
    pc = PC.PhysicsConstants()
    E = 100.0 * pc.MeV

    #Enu = np.arange(1.0,100.0,0.5)
    #nuc_num = map(lambda EE : NucleonNumber(EE*pc.GeV,pc),Enu)
    #
    #plt.plot(Enu,nuc_num)
    #plt.show()
    ch = 'tautau'
    DMm = 100.0 * pc.GeV

    DM_flux = DM.DMFluxAtDetector(ch, DMm, pc)
示例#2
0
    Track.x = xcur
    if return_inter:
        inter = interpolate.interp1d(x, densities)
        return inter
    if return_path and not return_ye:
        return x, densities
    if return_path and return_ye:
        return x, densities, ye
    else:
        return densities


if __name__ == '__main__':

    print LogSpaceEnergies(1.0, 1000.0)
    print len(MidPoint(LogSpaceEnergies(1.0, 1000.0)))
    quit()
    import physicsconstants as PC
    pc = PC.PhysicsConstants()
    pc.th12 = 10.0
    filename = "test.dat"
    file = open(filename, 'w')
    array = [1, 2, 3]
    hwritefile(file, array, pc)
    file = open(filename, 'r')
    narray = []
    nparam = PC.PhysicsConstants()
    hreadfilev4(file, narray, nparam)

    print nparam.th12