Commit e123f946a1dcc99192be325d544b64c2c14ec5ca
1 parent
21710d59
Remove cntcube parameter.
Now the counts cube can be specified as the inobs parameter, and the script then first checks if a model cube is also given. There is not check whether both cubes are identical though. This needs to be done.
Showing
1 changed file
with
2 additions
and
7 deletions
scripts/csresmap.py
| ... | ... | @@ -145,7 +145,7 @@ class csresmap(ctools.cscript): |
| 145 | 145 | if gammalib.is_fits(self["inobs"].filename()): |
| 146 | 146 | cta = gammalib.GCTAObservation() |
| 147 | 147 | cta.load(self["inobs"].filename()) |
| 148 | - if self.obs[0].eventtype() == "CountsCube": | |
| 148 | + if cta.eventtype() == "CountsCube": | |
| 149 | 149 | self.m_skip_binning = True |
| 150 | 150 | |
| 151 | 151 | # If we have a counts cube, then ask whether we also have a model |
| ... | ... | @@ -249,18 +249,13 @@ class csresmap(ctools.cscript): |
| 249 | 249 | self.log(str(self.obs)) |
| 250 | 250 | self.log("\n") |
| 251 | 251 | |
| 252 | - countmap = gammalib.GSkymap() | |
| 253 | - modelmap = gammalib.GSkymap() | |
| 254 | - | |
| 255 | 252 | # Use input file directly if given |
| 256 | 253 | if self.m_use_maps: |
| 257 | - countmap = gammalib.GSkymap(self.m_cntcube) | |
| 254 | + countmap = gammalib.GSkymap(self["inobs"].filename()) | |
| 258 | 255 | modelmap = gammalib.GSkymap(self.m_modcube) |
| 259 | 256 | |
| 260 | 257 | else: |
| 261 | 258 | |
| 262 | - cta_counts_cube = gammalib.GCTAEventCube() | |
| 263 | - | |
| 264 | 259 | if self.m_skip_binning: |
| 265 | 260 | cta_counts_cube = gammalib.GCTAEventCube(self.obs[0].events().clone()) |
| 266 | 261 | ... | ... |