test_cslike.py

Mayer Michael, 07/07/2014 02:26 PM

Download (487 Bytes)

 
1
import gammalib as gl
2
import cslike
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
    like = cslike.cslike(filled_obs)
20
    like.outfile = "crab_optmodel.xml"
21
    like["TSmethod"].string("UNBIASED")
22
    like.run()
23
    #print like.covar()