Commit ec947f5cff61f86d4d296774f142950dbd59d21f

Authored by Jürgen Knödlseder
1 parent 7b4ba70b

Make some hidden parameters of csresmap automatic.

cscripts/csresmap.par
@@ -33,10 +33,10 @@ outmap, f, a, resmap.fits,,, "Output residual map file" @@ -33,10 +33,10 @@ outmap, f, a, resmap.fits,,, "Output residual map file"
33 # Script parameters 33 # Script parameters
34 #================== 34 #==================
35 ebinalg, s, h, LOG,LIN|LOG|FILE,, "Binning algorithm" 35 ebinalg, s, h, LOG,LIN|LOG|FILE,, "Binning algorithm"
36 -emin, r, h, 0.1,,, "Lower energy limit (TeV)"  
37 -emax, r, h, 100.0,,, "Upper energy limit (TeV)"  
38 -enumbins, i, h, 20,,, "Number of energy bins (0=unbinned)"  
39 -ebinfile, f, h, NONE,,, "Name of the file containing the energy bin definition" 36 +emin, r, a, 0.1,,, "Lower energy limit (TeV)"
  37 +emax, r, a, 100.0,,, "Upper energy limit (TeV)"
  38 +enumbins, i, a, 20,,, "Number of energy bins (0=unbinned)"
  39 +ebinfile, f, a, NONE,,, "Name of the file containing the energy bin definition"
40 coordsys, s, a, CEL,CEL|GAL,, "Coordinate System" 40 coordsys, s, a, CEL,CEL|GAL,, "Coordinate System"
41 proj, s, a, CAR,AIT|AZP|CAR|MER|MOL|STG|TAN,, "Projection method" 41 proj, s, a, CAR,AIT|AZP|CAR|MER|MOL|STG|TAN,, "Projection method"
42 xref, r, a, 83.63,0,360, "First coordinate of image center in degrees (RA or galactic l)" 42 xref, r, a, 83.63,0,360, "First coordinate of image center in degrees (RA or galactic l)"
doc/source/reference_manual/csresmap.rst
@@ -61,16 +61,16 @@ General parameters @@ -61,16 +61,16 @@ General parameters
61 ``(ebinalg = LOG) <FILE|LIN|LOG> [string]`` 61 ``(ebinalg = LOG) <FILE|LIN|LOG> [string]``
62 Algorithm for defining energy bins. 62 Algorithm for defining energy bins.
63 63
64 -``(emin = 0.1) [real]`` 64 +``emin [real]``
65 Lower energy value for first energy bin (in TeV). 65 Lower energy value for first energy bin (in TeV).
66 66
67 -``(emax = 100.0) [real]`` 67 +``emax [real]``
68 Upper energy value for last energy bin (in TeV). 68 Upper energy value for last energy bin (in TeV).
69 69
70 -``(enumbins = 20) [integer]`` 70 +``enumbins [integer]``
71 Number of energy bins. 71 Number of energy bins.
72 72
73 -``(ebinfile = NONE) [file]`` 73 +``ebinfile [file]``
74 Name of the file containing the energy bin definition. 74 Name of the file containing the energy bin definition.
75 75
76 ``coordsys <CEL|GAL> [string]`` 76 ``coordsys <CEL|GAL> [string]``
test/test_csresmap.py
@@ -76,6 +76,7 @@ class Test(gammalib.GPythonTestSuite): @@ -76,6 +76,7 @@ class Test(gammalib.GPythonTestSuite):
76 ' outmap="csresmap_cmd1.fits"'+ \ 76 ' outmap="csresmap_cmd1.fits"'+ \
77 ' inmodel="data/crab.xml"'+ \ 77 ' inmodel="data/crab.xml"'+ \
78 ' caldb="prod2" irf="South_0.5h"' + \ 78 ' caldb="prod2" irf="South_0.5h"' + \
  79 + ' emin=0.1 emax=100.0 enumbins=20'+ \
79 ' nxpix=50 nypix=50 binsz=0.02'+ \ 80 ' nxpix=50 nypix=50 binsz=0.02'+ \
80 ' coordsys="CEL" proj="CAR" xref=83.63 yref=22.01'+ \ 81 ' coordsys="CEL" proj="CAR" xref=83.63 yref=22.01'+ \
81 ' algorithm="SUBDIV"'+ \ 82 ' algorithm="SUBDIV"'+ \
@@ -99,6 +100,7 @@ class Test(gammalib.GPythonTestSuite): @@ -99,6 +100,7 @@ class Test(gammalib.GPythonTestSuite):
99 ' outmap="csresmap_cmd1.fits"'+ \ 100 ' outmap="csresmap_cmd1.fits"'+ \
100 ' inmodel="data/crab.xml"'+ \ 101 ' inmodel="data/crab.xml"'+ \
101 ' caldb="prod2" irf="South_0.5h"' + \ 102 ' caldb="prod2" irf="South_0.5h"' + \
  103 + ' emin=0.1 emax=100.0 enumbins=20'+ \
102 ' nxpix=50 nypix=50 binsz=0.02'+ \ 104 ' nxpix=50 nypix=50 binsz=0.02'+ \
103 ' coordsys="CEL" proj="CAR" xref=83.63 yref=22.01'+ \ 105 ' coordsys="CEL" proj="CAR" xref=83.63 yref=22.01'+ \
104 ' algorithm="SUBDIV"'+ \ 106 ' algorithm="SUBDIV"'+ \
@@ -129,6 +131,9 @@ class Test(gammalib.GPythonTestSuite): @@ -129,6 +131,9 @@ class Test(gammalib.GPythonTestSuite):
129 resmap['inmodel'] = 'data/crab.xml' 131 resmap['inmodel'] = 'data/crab.xml'
130 resmap['caldb'] = 'prod2' 132 resmap['caldb'] = 'prod2'
131 resmap['irf'] = 'South_0.5h' 133 resmap['irf'] = 'South_0.5h'
  134 + resmap['emin'] = 0.1
  135 + resmap['emax'] = 100.0
  136 + resmap['enumbins'] = 20
132 resmap['nxpix'] = 50 137 resmap['nxpix'] = 50
133 resmap['nypix'] = 50 138 resmap['nypix'] = 50
134 resmap['binsz'] = 0.02 139 resmap['binsz'] = 0.02