Bug #2682
error raised when executing ctselect with data roi and desired roi being the same
Status: | Closed | Start date: | 09/19/2018 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | Tibaldo Luigi | % Done: | 100% | |
Category: | - | |||
Target version: | 1.6.0 | |||
Duration: |
Description
The issue was reported by A. Specovius via email on 08/08/2018
ValueError: *** ERROR in ctselect::run(): Invalid value. Invalid RoI selection: the new RoI must be enclosed in the original RoI
It seems that ctselect has a not covered case namely rad==roi_rad (I) and distance not exactly zero due to numerics (II).
In this case the first check (line 932 ff)
if ((distance < 1.e-4) && (rad > roi_radius)) {
rad = roi_radius;
}
will fail due to (I) and if then the distance is not exactly zero due to numerical limitations the second check
else if ((distance + rad) > roi_radius) {
will also fail due to (II) and the whole tool will raise an error.
Somehow the second check should also account for numerical limitations concerning the distance variable, shouldn’t it?
This is a bug introduced in #2501.
Solution to be implemented:- add equal case in first check, numerical tolerance in second
- specify in user manual that rad=UNDEF is the recommended way to skip spatial selection (as opposed to re-enter the data ROI)
Recurrence
No recurrence.
History
#1 Updated by Knödlseder Jürgen about 6 years ago
I actually stumbled over this when analysing the H.E.S.S. data.
#2 Updated by Tibaldo Luigi about 6 years ago
- Status changed from New to Pull request
- % Done changed from 0 to 100
#3 Updated by Knödlseder Jürgen about 6 years ago
- Status changed from Pull request to Closed
Merged into devel
.