args = parser.parse_args() i = args.i istr = "%05d" % i np.random.seed(i) difftype = args.difftype time = args.time position = args.position emin = args.emin emax = args.emax diffdir = "/afs/slac/g/glast/groups/diffuse/rings/2year/" iso = get_background(join(diffdir, "isotrop_2year_P76_source_v0.txt")) ring = get_background(join(diffdir, "ring_2year_P76_v0.fits")) sreekumar = get_sreekumar(diff_factor=1) if difftype == "galactic": for p in iso.smodel.param_names: iso.smodel.freeze(p) ring.smodel = Constant() diffuse_sources = [iso, ring] elif difftype == "isotropic": diffuse_sources = [iso] elif difftype == "sreekumar": diffuse_sources = [sreekumar] tempdir = mkdtemp(prefix="/scratch/")
skydir = SkyDir(94.310,22.580) gtifile = '/u/gl/funk/data/GLAST/ExtendedSources/NewAnalysis/gtlike/IC443/sel_IC443_60_100000.fits' if args.diffuse == 'galactic': ds = get_default_diffuse( diffdir="/nfs/slac/g/ki/ki03/lande/fermi/diffuse/", gfile="gal_2yearp7v6_v0.fits", ifile="iso_p7v6source.txt") elif args.diffuse == 'sreekumar': ds = [ get_sreekumar() ] elif args.diffuse == 'nobackground': ds = [] elif args.diffuse == 'extrapolated': ds = get_background( "/afs/slac/g/glast/groups/scienceTools/bugs/Likelihood/energy_dispersion/Simulations/galdif_extended.fits", '/nfs/slac/g/ki/ki03/lande/fermi/diffuse/iso_p7v6source_extrapolated.txt') else: raise Exception("...") ps,ds = catalog.merge_lists(skydir, radius=15, user_diffuse_list=ds) d = {s.name:s for s in ds} if source == 'W44': W44 = d['W44'] """ SmoothBrokenPowerlaw spectrum is from: /u/gl/funk/data3/ExtendedSources/NewAnalysis/gtlike/W44/SmoothBrokenPowerlaw/W44_fitted_BINNED_PlusP_BSP_lowEnergy.fewer.minos.xml <spectrum type="SmoothBrokenPowerLaw">