Commit 7459a657f4ab82bac4bc555b8353383f83ed46f2
1 parent
75e6edfb
Don't pass -1.0 as ra and dec to ctselect, use UNDEF instead.
Showing
1 changed file
with
3 additions
and
3 deletions
pyext/ctools/obsutils.py
| @@ -584,9 +584,9 @@ def spectrum(obs, source, ebounds): | @@ -584,9 +584,9 @@ def spectrum(obs, source, ebounds): | ||
| 584 | 584 | ||
| 585 | # Clone observations and reset energy thresholds | 585 | # Clone observations and reset energy thresholds |
| 586 | select = ctools.ctselect(obs) | 586 | select = ctools.ctselect(obs) |
| 587 | - select["ra"].real(-1.0) | ||
| 588 | - select["dec"].real(-1.0) | ||
| 589 | - select["rad"].real(-1.0) | 587 | + select["ra"].value("UNDEF") |
| 588 | + select["dec"].value("UNDEF") | ||
| 589 | + select["rad"].value("UNDEF") | ||
| 590 | select["tmin"].real(0.0) | 590 | select["tmin"].real(0.0) |
| 591 | select["tmax"].real(0.0) | 591 | select["tmax"].real(0.0) |
| 592 | select["emin"].real(ebounds.emin(i).TeV()) | 592 | select["emin"].real(ebounds.emin(i).TeV()) |