fit() if localize: paranoid_localize(roi, name, verbosity=4) if fit_extension: roi.fit_extension(which=name) paranoid_localize(roi, name) fit() print 'Making pointlike SED for hypothesis %s' % hypothesis sed = PointlikeSED(roi, name, verbosity=4) sed.save('%s/sed_pointlike_4bpd_%s_%s.yaml' % (pipeline.dirdict['seds'], hypothesis, name)) sed.plot('%s/sed_pointlike_4bpd_%s_%s.png' % (pipeline.dirdict['seds'], hypothesis, name)) print_summary() p = source_dict(roi, name) if upper_limit: pul = PointlikePowerLawUpperLimit(roi, name, cl=.95, verbosity=4) p['powerlaw_upper_limit'] = pul.todict() roi.toXML(filename="%s/srcmodel_pointlike_%s_%s.xml" % (pipeline.dirdict['data'], hypothesis, name)) roi.save('roi_%s_%s.dat' % (hypothesis, name)) return p
fit(fit_bg_first=True) fit() if localize: paranoid_localize(roi, name, verbosity=4) if fit_extension: roi.fit_extension(which=name) paranoid_localize(roi, name) fit() print 'Making pointlike SED for hypothesis %s' % hypothesis sed = PointlikeSED(roi, name, verbosity=4) sed.save('%s/sed_pointlike_4bpd_%s_%s.yaml' % (pipeline.dirdict['seds'],hypothesis,name)) sed.plot('%s/sed_pointlike_4bpd_%s_%s.png' % (pipeline.dirdict['seds'],hypothesis,name)) print_summary() p = source_dict(roi, name) if upper_limit: pul = PointlikePowerLawUpperLimit(roi, name, cl=.95, verbosity=4) p['powerlaw_upper_limit']=pul.todict() roi.toXML(filename="%s/srcmodel_pointlike_%s_%s.xml"%(pipeline.dirdict['data'], hypothesis, name)) roi.save('roi_%s_%s.dat' % (hypothesis,name)) return p
print 'Localization Ellipse:',m.todict() if fit_extension: roi.fit_extension(which=name) ellipse = paranoid_localize(roi, name) print ellipse unfreeze_far_away(roi, frozen) fit() print 'Making pointlike SED for hypothesis %s' % hypothesis sed = PointlikeSED(roi, name, verbosity=4) sed.save('%s/sed_pointlike_4bpd_%s_%s.yaml' % (seddir,hypothesis,name)) sed.plot('%s/sed_pointlike_4bpd_%s_%s.png' % (seddir,hypothesis,name)) print_summary() p = source_dict(roi, name) pul = PointlikePowerLawUpperLimit(roi, name, emin=emin, emax=emax, cl=.95, verbosity=4) p['powerlaw_upper_limit']=pul.todict() cul = PointlikeCutoffUpperLimit(roi, name, Index=1.7, Cutoff=3e3, b=1, cl=.95, verbosity=4) p['cutoff_upper_limit']=cul.todict() if cutoff: try: tc = PointlikeCutoffTester(roi,name, cutoff_model=cutoff_model, verbosity=4) p['test_cutoff']=tc.todict() tc.plot(sed_results='%s/sed_pointlike_4bpd_%s_%s.yaml' % (seddir,hypothesis,name),