Bug #1238
Check map size in obsutils.cntmap
Status: | Closed | Start date: | 07/01/2014 | |
---|---|---|---|---|
Priority: | Low | Due date: | ||
Assigned To: | Buehler Rolf | % Done: | 100% | |
Category: | - | |||
Target version: | 3rd coding sprint | |||
Duration: |
Description
In case the ROI of an observation was bigger than the area covered by the defined countsmap in obsutils.cntmap there was a crash: “IndexError: *** ERROR in GSkymap::operator(int&, int&): Sky map pixel index 40076 is outside the valid range [0,39999]”. This is fixed by adding the following check at line 198 in obsutils.py:
- Set pixel
maxpixel=nxpix*nypix
if pixel < maxpixel:
map[pixel] += 1.0
Recurrence
No recurrence.
History
#1 Updated by Buehler Rolf about 10 years ago
A more general fix would be to add a fill method to GSkymap.
#2 Updated by Knödlseder Jürgen about 10 years ago
- Status changed from New to Feedback
- % Done changed from 80 to 100
I made the change and pushed it into devel
. For the more general fix, I added an action to GammaLib (#1245). If you’re happy with it you may take the action.
#3 Updated by Knödlseder Jürgen about 10 years ago
- Status changed from Feedback to Resolved
- Target version set to 3rd coding sprint
#4 Updated by Knödlseder Jürgen about 10 years ago
- Status changed from Resolved to Closed