tsmap.py

Mayer Michael, 09/27/2016 02:47 PM

Download (749 Bytes)

 
1
import gammalib
2
import ctools
3

    
4
sim = ctools.ctobssim()
5
sim['ra']      = 83.6331
6
sim['dec']     = 22.01
7
sim['rad']     = 3.0
8
sim['tmin']    = 0.0
9
sim['tmax']    = 1800.
10
sim['emin']    = 0.1
11
sim['emax']    = 100.0
12
sim['caldb']   = 'prod2'
13
sim['irf']     = 'South_50h'
14
sim['inmodel'] = '$CTOOLS/share/models/crab.xml'
15
sim['debug']   = True
16
sim['chatter'] = 1
17
sim.run()
18

    
19
like = ctools.ctlike(sim.obs())
20
like.run()
21

    
22
tsmap = ctools.cttsmap(like.obs())
23
tsmap['xref']     = 83.6331
24
tsmap['yref']     = 22.01
25
tsmap['srcname']  = 'Crab'
26
tsmap['coordsys'] = 'CEL'
27
tsmap['proj']     = 'CAR'
28
tsmap['binsz']    = 0.05
29
tsmap['nxpix']    = 10
30
tsmap['nypix']    = 10
31
tsmap['outmap']   = 'tsmap.fits'
32
tsmap['errors']   = True
33
tsmap['debug']    = True
34
tsmap.execute()