Skip to content
Snippets Groups Projects
Commit fe153395 authored by Branson Craig Stephens's avatar Branson Craig Stephens
Browse files

Added checks that ra_min, ra_max, dec_min, dec_max fall within allowed boundaries.

parent 64590cbb
No related branches found
No related tags found
No related merge requests found
......@@ -383,7 +383,6 @@ def create_eel(d, event, user):
gpsmin = 100000000000
gpsmax = 0
for i in range(nList):
print i
try:
ra = float(ratok[i])
except:
......@@ -416,6 +415,13 @@ def create_eel(d, event, user):
raise ValueError('Cannot read duration list element %d'%i)
if gps-w < gpsmin: gpsmin = gps-w
if gps+w > gpsmax: gpsmax = gps+w
# Make sure the min/max ra and dec are within bounds:
ramin = max(0.0, ramin)
ramax = min(360.0, ramax)
decmin = max(-90.0, decmin)
decmax = min(90.0, decmax)
eel.ra = (ramin+ramax)/2
eel.raWidth = ramax-ramin
eel.dec = (decmin+decmax)/2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment