plt.plot(delta_ell, func_c, linestyle='solid', color='black', linewidth=3.0) plt.plot(delta_ell[10:], func_r, linestyle='dashed', color='red', linewidth=3.0) ax.set_xticks(ll) plt.tick_params(labelsize=18) plt.xlabel('$l$', fontsize=20) plt.ylabel('$C_l/4\pi$', fontsize=20) plt.show() ################################### # Make a posterior-averaged skymap ################################### bu.makeSkyMap(clm, lmax=LMAX) plt.show() ################################ ################################ ''' fig, ax = plt.subplots() plt.contourf(mxx, mxy, H/np.sum(H), 50, cmap='Greys') plt.colorbar() plt.plot(delta_ell, func_c, linestyle='solid', color='black', linewidth=3.0) #plt.plot(delta_ell[10:], func_l, linestyle='dashed', color='red', linewidth=3.0) plt.plot(delta_ell[10:], func_r, linestyle='dashed', color='red', linewidth=3.0) #fil = open('global_lmax4_upperlimits_prior.dat','w') #for ii in range(len(func_r)): # print>>fil, delta_ell[10:][ii], func_r[ii]
plt.xlabel('$l$', fontsize=20) if not args.strainAnis: plt.ylabel('$C_l/4\pi$', fontsize=20) elif args.strainAnis: plt.ylabel('$(A_h^4 C_l/4\pi)^{1/4}$', fontsize=20) plt.show() ################################### # Make a posterior-averaged skymap ################################### if args.strainAnis: #strainClm = np.array([clm[:,ii]*(10**(2*Agwb)) for ii in range(clm.shape[1])]).T bu.makeSkyMap(clm, lmax=LMAX, cmap=newcmaps.viridis, strain=Agwb, psrs=positions) else: bu.makeSkyMap(clm, lmax=LMAX, cmap=newcmaps.viridis, psrs=positions) plt.show() ################################ ################################ ''' fig, ax = plt.subplots() plt.contourf(mxx, mxy, H/np.sum(H), 50, cmap='Greys') plt.colorbar() plt.plot(delta_ell, func_c, linestyle='solid', color='black', linewidth=3.0) #plt.plot(delta_ell[10:], func_l, linestyle='dashed', color='red', linewidth=3.0)
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]) np.save('invfisher_lmax{0}'.format(args.LMAX),anisOptStat[1]) psrlocs = np.loadtxt('PsrPos_SNR_{0}.txt'.format(snr_tag_ext),usecols=[1,2]) Asqr = anisOptStat[0][0]/np.sqrt(4.0*np.pi) final_clm = np.array(anisOptStat[0]) / Asqr bu.makeSkyMap(final_clm, lmax=args.LMAX, psrs=psrlocs) plt.show() ''' print "Fisher matrix singular values are {0}".format(anisOptStat[2]) plt.plot(anisOptStat[2]) plt.yscale('log') plt.ylabel("Fisher matrix singular value",fontsize=15) plt.show() ''' plt.plot(anisOptStat[0]/np.sqrt(np.diag(anisOptStat[1]))) plt.xlabel("lm mode",fontsize=15) plt.ylabel("ML value / error",fontsize=15) plt.show()
ax.set_xticks(ll) plt.tick_params(labelsize=18) plt.xlabel('$l$', fontsize=20) if not args.strainAnis: plt.ylabel('$C_l/4\pi$', fontsize=20) elif args.strainAnis: plt.ylabel('$(A_h^4 C_l/4\pi)^{1/4}$', fontsize=20) plt.show() ################################### # Make a posterior-averaged skymap ################################### if args.strainAnis: #strainClm = np.array([clm[:,ii]*(10**(2*Agwb)) for ii in range(clm.shape[1])]).T bu.makeSkyMap(clm, lmax=LMAX, cmap=newcmaps.viridis, strain=Agwb, psrs=positions) else: bu.makeSkyMap(clm, lmax=LMAX, cmap=newcmaps.viridis, psrs=positions) plt.show() ################################ ################################ ''' fig, ax = plt.subplots() plt.contourf(mxx, mxy, H/np.sum(H), 50, cmap='Greys') plt.colorbar() plt.plot(delta_ell, func_c, linestyle='solid', color='black', linewidth=3.0) #plt.plot(delta_ell[10:], func_l, linestyle='dashed', color='red', linewidth=3.0) plt.plot(delta_ell[10:], func_r, linestyle='dashed', color='red', linewidth=3.0) #fil = open('global_lmax4_upperlimits_prior.dat','w')
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]) np.save('invfisher_lmax{0}'.format(args.LMAX), anisOptStat[1]) psrlocs = np.loadtxt('PsrPos_SNR_{0}.txt'.format(snr_tag_ext), usecols=[1, 2]) Asqr = anisOptStat[0][0] / np.sqrt(4.0 * np.pi) final_clm = np.array(anisOptStat[0]) / Asqr bu.makeSkyMap(final_clm, lmax=args.LMAX, psrs=psrlocs) plt.show() ''' print "Fisher matrix singular values are {0}".format(anisOptStat[2]) plt.plot(anisOptStat[2]) plt.yscale('log') plt.ylabel("Fisher matrix singular value",fontsize=15) plt.show() ''' plt.plot(anisOptStat[0] / np.sqrt(np.diag(anisOptStat[1]))) plt.xlabel("lm mode", fontsize=15) plt.ylabel("ML value / error", fontsize=15) plt.show()