import pylab as P

import numpy as np

from lande.utilities.plotting import plot_points
from lande.utilities import pubplot
from lande.fermi.pipeline.pwncat2.interp.bigfile import PulsarCatalogLoader

pubplot.set_latex_defaults()

bw = pubplot.get_bw()

cat=PulsarCatalogLoader(
    bigfile_filename='$lat2pc/BigFile/Pulsars_BigFile_v20130214170325.fits',
    off_peak_auxiliary_filename='$lat2pc/OffPeak/auxiliary/off_peak_auxiliary_table.fits')

psrlist = cat.get_off_peak_psrlist()


fig = P.figure(None,(6,6))
axes = fig.add_subplot(111)

axes.set_xscale("log")
axes.set_yscale("log")


classification=np.empty_like(psrlist,dtype=object)
Edot=np.empty_like(psrlist,dtype=float)
luminosity=np.empty_like(psrlist,dtype=float)
luminosity_error_statistical=np.empty_like(psrlist,dtype=float)
luminosity_lower_error_systematic=np.empty_like(psrlist,dtype=float)
示例#2
0
#!/usr/bin/env python
from os.path import expandvars,join
import scipy.stats 
from matplotlib.ticker import MaxNLocator


import numpy as np
import pylab as P


from lande.utilities.pubplot import set_latex_defaults
set_latex_defaults()

from lande.utilities.save import loaddict


name = expandvars(join('$fitdiffdata','v11','merged.hdf5'))
r = loaddict(name)

#plot_pull=True
plot_pull=False

#pointlike=True
pointlike=False

if pointlike:
    print 'pointlike'
    norm=np.asarray(r['pointlike_norm'])
    norm_err=np.asarray(r['pointlike_norm_err'])
    norm_mc=np.asarray(r['pointlike_norm_mc'])
else: