Esempio n. 1
0
 def todict(self):
     return tolist(dict(
         sed_points = self.sed_points,
         model0 = spectrum_to_dict(self.model0),
         model1 = spectrum_to_dict(self.comprehensive_model),
         TS_comp = self.TS_comp,
         ll_1 = self.ll_1,
         ll_0 = self.ll_0,
     ))
Esempio n. 2
0
 def todict(self):
     return tolist(
         dict(
             sed_points=self.sed_points,
             model0=spectrum_to_dict(self.model0),
             model1=spectrum_to_dict(self.comprehensive_model),
             TS_comp=self.TS_comp,
             ll_1=self.ll_1,
             ll_0=self.ll_0,
         ))
Esempio n. 3
0
results = []

for extension_mc in extensions:

    print 'Looping over extension_mc=%g' % extension_mc

    model_mc = PowerLaw(index=index_mc)
    model_mc.set_flux(flux_mc(extension_mc), emin, emax)

    r = dict(
        type = args.type,
        mc = dict(
            extension=extension_mc,
            gal=[ skydir_mc.l(), skydir_mc.b() ],
            cel=[ skydir_mc.ra(), skydir_mc.dec() ],
            model=spectrum_to_dict(model_mc),
            flux=pointlike_model_to_flux(model_mc, emin, emax),
        )
    )

    tempdir = mkdtemp()

    point = 'point'
    ps = PointSource(
        name=point,
        model=model_mc.copy(),
        skydir = skydir_mc
    )

    extended = 'extended_%f' % extension_mc
    if extension_mc > 0: