Commit 1b010f6e3d2a274228ac4bb661a0678d80c4b487
1 parent
c59d9b36
Complete cttsmap tests after last merge
Showing
1 changed file
with
8 additions
and
5 deletions
test/test_cttsmap.py
| ... | ... | @@ -97,21 +97,24 @@ class Test(test): |
| 97 | 97 | # Check if execution failed |
| 98 | 98 | self.test_assert(self._execute(cmd) != 0, |
| 99 | 99 | 'Check invalid input file when executed from command line') |
| 100 | - | |
| 100 | + | |
| 101 | 101 | # Setup cttsmap command |
| 102 | 102 | cmd = cttsmap+' inobs="'+self._events+'"'+ \ |
| 103 | 103 | ' inmodel="'+self._model+'" srcname="Crab"'+ \ |
| 104 | 104 | ' caldb="'+self._caldb+'" irf="'+self._irf+'"'+ \ |
| 105 | 105 | ' errors=yes'+ \ |
| 106 | - ' outmap="cttsmap_cmd1.fits"'+ \ | |
| 107 | - ' nxpix=5 nypix=5 binsz=0.02'+ \ | |
| 106 | + ' outmap="cttsmap_cmd3.fits"'+ \ | |
| 107 | + ' nxpix=3 nypix=3 binsz=0.02'+ \ | |
| 108 | 108 | ' coordsys="CEL" proj="CAR" xref=83.63 yref=22.01'+ \ |
| 109 | - ' logfile="cttsmap_cmd1.log" chatter=1' | |
| 109 | + ' logfile="cttsmap_cmd3.log" chatter=1' | |
| 110 | 110 | |
| 111 | 111 | # Check if execution was successful |
| 112 | 112 | self.test_assert(self._execute(cmd) == 0, |
| 113 | 113 | 'Check successful execution from command line') |
| 114 | 114 | |
| 115 | + # Check result file | |
| 116 | + self._check_result_file('cttsmap_cmd3.fits') | |
| 117 | + | |
| 115 | 118 | # Setup cttsmap --help option |
| 116 | 119 | cmd = cttsmap+' --help' |
| 117 | 120 | |
| ... | ... | @@ -281,7 +284,7 @@ class Test(test): |
| 281 | 284 | nmaps = 1 |
| 282 | 285 | else: |
| 283 | 286 | nmaps = 0 |
| 284 | - | |
| 287 | + | |
| 285 | 288 | # Check dimensions |
| 286 | 289 | self.test_value(tsmap.nmaps(), nmaps, 'Check number of maps') |
| 287 | 290 | self.test_value(tsmap.nx(), nx, 'Check for number of X pixels') | ... | ... |