Exemplo n.º 1
0
    def create(filename):

        if re.search('\.fits$',filename) or re.search('\.fit$',filename):
            return Catalog.create_from_fits(filename)
        elif re.search('(\.P|\.P\.gz)',filename):
            return load_object(filename)
        else:
            raise Exception("Unrecognized suffix in catalog file: %s"%(filename))
Exemplo n.º 2
0
    def create(filename):

        if re.search('\.fits$', filename) or re.search('\.fit$', filename):
            return Catalog.create_from_fits(filename)
        elif re.search('(\.P|\.P\.gz)', filename):
            return load_object(filename)
        else:
            raise Exception("Unrecognized suffix in catalog file: %s" %
                            (filename))
Exemplo n.º 3
0
if args.iso0 is not None:
    iso0 = np.loadtxt(args.iso0,unpack=True)
else:
    iso0 = iso

if args.iso1 is not None:
    iso1 = np.loadtxt(args.iso1,unpack=True)
else:
    iso1 = iso

iso_spline = UnivariateSpline(np.log10(iso[0]),iso[1],k=1,s=0)
iso0_spline = UnivariateSpline(np.log10(iso0[0]),iso0[1],k=1,s=0)
iso1_spline = UnivariateSpline(np.log10(iso1[0]),iso1[1],k=1,s=0)


obj0 = load_object(args.files[0])
obj1 = load_object(args.files[1])

    

for k in sorted(obj0):
    
    m0 = obj0[k]['flux']
    ecenter = obj0[k]['ecenter']
    m1 = obj1[k]['flux']

    exp0 = obj0[k]['bexp']
    exp1 = obj1[k]['bexp']

    ms0 = m0.integrate(latrange=[-5.0,5.0])
    ms1 = m1.integrate(latrange=[-5.0,5.0])
Exemplo n.º 4
0
if args.iso0 is not None:
    iso0 = np.loadtxt(args.iso0, unpack=True)
else:
    iso0 = iso

if args.iso1 is not None:
    iso1 = np.loadtxt(args.iso1, unpack=True)
else:
    iso1 = iso

iso_spline = UnivariateSpline(np.log10(iso[0]), iso[1], k=1, s=0)
iso0_spline = UnivariateSpline(np.log10(iso0[0]), iso0[1], k=1, s=0)
iso1_spline = UnivariateSpline(np.log10(iso1[0]), iso1[1], k=1, s=0)

obj0 = load_object(args.files[0])
obj1 = load_object(args.files[1])

for k in sorted(obj0):

    m0 = obj0[k]['flux']
    ecenter = obj0[k]['ecenter']
    m1 = obj1[k]['flux']

    exp0 = obj0[k]['bexp']
    exp1 = obj1[k]['bexp']

    ms0 = m0.integrate(latrange=[-5.0, 5.0])
    ms1 = m1.integrate(latrange=[-5.0, 5.0])

    if ms0 == 0: continue