test_csbutterfly.py

Mayer Michael, 07/18/2014 02:10 PM

Download (585 Bytes)

 
1
import gammalib as gl
2
import csbutterfly
3
import obsutils
4
import os
5

    
6

    
7

    
8
if __name__ == "__main__":
9
    dir = gl.GSkyDir()
10
    dir.radec_deg(83.6331,22.01)
11
    ob = obsutils.set(dir)
12
    
13
    obs = gl.GObservations()
14
    obs.append(ob)
15
    
16
    obs.models(os.environ["CTOOLS"]+"/test/data/crab.xml")
17
    filled_obs = obsutils.sim(obs)
18

    
19
    bf = csbutterfly.csbutterfly(filled_obs)
20
    bf.source = "Crab"
21
    bf.m_emin = 0.1
22
    bf.m_emax = 100
23
    bf.outfile = "Crab.bf"
24
    bf.run()
25
    
26
    #ulimit = ulim.ulimit
27
    #print "Retrieved 95% U.L. to "+str("%.2e" % ulimit)+" 1/cm2/s/MeV"
28