Пример #1
0
def analysis():
    fake_data_key_path = NDI_plots_dir + 'FD_key.txt.gz'

    p3FGL = fa.plot_3FGL(f_NDI,CTB_en_min=f_NDI.CTB_en_bins[0],CTB_en_max=f_NDI.CTB_en_bins[-1],band_mask_range = [-2,2], mask_ring = True, outer = 10)
    p3FGL.configure_3FGL(flux_min=10**-12,flux_max=10**-8,n_flux_bins = 25,only_gal = True,error_range = 0.68) 
    plt.figure(figsize=(8,6))
    p3FGL.plot_3FGL(fmt = 'o', color='black',markersize=7,label='3FGL PS')

    pfake3FGL = sa.make_flux_histogram(fake_data_key_path,f_NDI.CTB_exposure_maps,band_mask_range = [-2,2], mask_ring = True, outer = 10)
    pfake3FGL.make_fake_data_flux_histogram(0.1,500,25)
    pfake3FGL.plot_fake_data_histogram(fmt = 'o', color='blue',markersize=5,label='sim PS')

    plt.yscale('log')
    plt.xscale('log')
    plt.yscale('log')
    plt.xscale('log')
    plt.xlim([5e-11,5e-9])
    plt.ylim([1e6,1e11])

    plt.tick_params(axis='x', length=5,width=2,labelsize=18)
    plt.tick_params(axis='y',length=5,width=2,labelsize=18)
    plt.xlabel('$F$  [photons / cm$^2$ / s]', fontsize=18)
    plt.ylabel('$dN/dF$  [photons$^{-1}$ cm$^2$ s deg$^{-2}$]', fontsize=18)

    plt.legend(fontsize=16)
    plt.savefig(NDI_plots_dir + 'dnds_fake_data.pdf')
    plt.close()
Пример #2
0
nside=512
data_type='p8'

band_mask_range_plot = [-0.5,0.5]
mask_ring_plot = True
outer_plot = 10

f = sim.fake_fermi_data(maps_dir,CTB_en_min=CTB_start_bin,CTB_en_max=CTB_end_bin,nside=nside,data_name=data_type)


p3FGL = fa.plot_3FGL(f,CTB_en_min=f.CTB_en_bins[0],CTB_en_max=f.CTB_en_bins[-1],band_mask_range = band_mask_range_plot, mask_ring = mask_ring_plot, outer = outer_plot)
p3FGL.configure_3FGL(flux_min=10**-12,flux_max=10**-5,n_flux_bins = 50,only_gal = True,error_range = 0.68)
plt.figure(figsize=(8,6))
p3FGL.plot_3FGL(fmt = 'o', color='black',markersize=7,label='3FGL PS')

pfake3FGL = sa.make_flux_histogram(fake_data_key_path,f.CTB_exposure_maps,band_mask_range = band_mask_range_plot, mask_ring = mask_ring_plot, outer = outer_plot)
pfake3FGL.make_fake_data_flux_histogram(0.1,5000,50)
pfake3FGL.plot_fake_data_histogram(fmt = 'o', color='blue',markersize=5,label='sim PS')

plt.yscale('log')
plt.xscale('log')
plt.yscale('log')
plt.xscale('log')
plt.xlim([5e-11,5e-5])
plt.ylim([1e2,1e11])

plt.tick_params(axis='x', length=5,width=2,labelsize=18)
plt.tick_params(axis='y',length=5,width=2,labelsize=18)
plt.xlabel('$F$  [photons / cm$^2$ / s]', fontsize=18)
plt.ylabel('$dN/dF$  [photons$^{-1}$ cm$^2$ s deg$^{-2}$]', fontsize=18)