Commit ec947f5cff61f86d4d296774f142950dbd59d21f
1 parent
7b4ba70b
Make some hidden parameters of csresmap automatic.
Showing
3 changed files
with
13 additions
and
8 deletions
cscripts/csresmap.par
| ... | ... | @@ -33,10 +33,10 @@ outmap, f, a, resmap.fits,,, "Output residual map file" |
| 33 | 33 | # Script parameters |
| 34 | 34 | #================== |
| 35 | 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 | 40 | coordsys, s, a, CEL,CEL|GAL,, "Coordinate System" |
| 41 | 41 | proj, s, a, CAR,AIT|AZP|CAR|MER|MOL|STG|TAN,, "Projection method" |
| 42 | 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 | 61 | ``(ebinalg = LOG) <FILE|LIN|LOG> [string]`` |
| 62 | 62 | Algorithm for defining energy bins. |
| 63 | 63 | |
| 64 | -``(emin = 0.1) [real]`` | |
| 64 | +``emin [real]`` | |
| 65 | 65 | Lower energy value for first energy bin (in TeV). |
| 66 | 66 | |
| 67 | -``(emax = 100.0) [real]`` | |
| 67 | +``emax [real]`` | |
| 68 | 68 | Upper energy value for last energy bin (in TeV). |
| 69 | 69 | |
| 70 | -``(enumbins = 20) [integer]`` | |
| 70 | +``enumbins [integer]`` | |
| 71 | 71 | Number of energy bins. |
| 72 | 72 | |
| 73 | -``(ebinfile = NONE) [file]`` | |
| 73 | +``ebinfile [file]`` | |
| 74 | 74 | Name of the file containing the energy bin definition. |
| 75 | 75 | |
| 76 | 76 | ``coordsys <CEL|GAL> [string]`` | ... | ... |
test/test_csresmap.py
| ... | ... | @@ -76,6 +76,7 @@ class Test(gammalib.GPythonTestSuite): |
| 76 | 76 | ' outmap="csresmap_cmd1.fits"'+ \ |
| 77 | 77 | ' inmodel="data/crab.xml"'+ \ |
| 78 | 78 | ' caldb="prod2" irf="South_0.5h"' + \ |
| 79 | + ' emin=0.1 emax=100.0 enumbins=20'+ \ | |
| 79 | 80 | ' nxpix=50 nypix=50 binsz=0.02'+ \ |
| 80 | 81 | ' coordsys="CEL" proj="CAR" xref=83.63 yref=22.01'+ \ |
| 81 | 82 | ' algorithm="SUBDIV"'+ \ |
| ... | ... | @@ -99,6 +100,7 @@ class Test(gammalib.GPythonTestSuite): |
| 99 | 100 | ' outmap="csresmap_cmd1.fits"'+ \ |
| 100 | 101 | ' inmodel="data/crab.xml"'+ \ |
| 101 | 102 | ' caldb="prod2" irf="South_0.5h"' + \ |
| 103 | + ' emin=0.1 emax=100.0 enumbins=20'+ \ | |
| 102 | 104 | ' nxpix=50 nypix=50 binsz=0.02'+ \ |
| 103 | 105 | ' coordsys="CEL" proj="CAR" xref=83.63 yref=22.01'+ \ |
| 104 | 106 | ' algorithm="SUBDIV"'+ \ |
| ... | ... | @@ -129,6 +131,9 @@ class Test(gammalib.GPythonTestSuite): |
| 129 | 131 | resmap['inmodel'] = 'data/crab.xml' |
| 130 | 132 | resmap['caldb'] = 'prod2' |
| 131 | 133 | resmap['irf'] = 'South_0.5h' |
| 134 | + resmap['emin'] = 0.1 | |
| 135 | + resmap['emax'] = 100.0 | |
| 136 | + resmap['enumbins'] = 20 | |
| 132 | 137 | resmap['nxpix'] = 50 |
| 133 | 138 | resmap['nypix'] = 50 |
| 134 | 139 | resmap['binsz'] = 0.02 | ... | ... |