コード例 #1
0
ファイル: NX01_freqStat.py プロジェクト: stasbabak/NX01
if args.make_plot:

    if args.limit_or_detect == 'detect':
        far = 0.05
        dr_list = [0.95, 0.68]
        bu.OSupperLimit(psr, GCGnoiseInv, HnD, optimalStat, far, dr_list)
    else:
        ul_list = [0.95, 0.90]
        bu.OSupperLimit(psr, GCGnoiseInv, HnD, optimalStat, ul_list)

    bu.OScrossPower(angSep, optimalStat[3], optimalStat[4])

if args.LMAX != 0:
    anisOptStat = utils.AnisOptStat(psr,
                                    GCGnoiseInv,
                                    CorrCoeff,
                                    args.LMAX,
                                    gam_gwb=gam_bkgrd)

    print "\n The ML coefficients of an l={0} search are {1}\n".format(
        args.LMAX, anisOptStat[0] / np.sqrt(4.0 * np.pi))
    print "\n The error-bars from the inverse Fisher matrix are {0}\n".format(
        np.sqrt(np.diag(anisOptStat[1])) / np.sqrt(4.0 * np.pi))

    print "\n The Fisher information is {0}\n".format(anisOptStat[2])

    print "\n The ML coefficients of an l={0} search are {1}\n".format(
        args.LMAX, anisOptStat[0])
    print "\n The full covariance matrix is {0}\n".format(anisOptStat[1])

    np.save('mlcoeff_lmax{0}'.format(args.LMAX), anisOptStat[0])