ADACS-Australia/TraceT

Circum polar sources cause the 'test' xml (and maybe the real ones) to break

Closed this issue · 0 comments

This event: https://mwa-trigger.duckdns.org/event_group_details/139/
Corresponds to a real GRB which is at -69 DEC.
The calculation of set_utc_time here

obs_source_altaz = obs_source.transform_to(AltAz(obstime=next_24h, location=location))
for altaz, time in zip(obs_source_altaz, next_24h):
if altaz.alt.deg <1.:
# source below horizon so record time
set_time_utc = time
break

currently assumes that a source will eventually set, which is not always true.

This causes an error in the parsing of test xml files to break and give a server error.
I suspect it might cause errors elsewhere (any time a user is being sent an email), which may interfere with the actual triggering.

Suggested solution (which is live on the web-app) is to set set_utc_time to None before entering the for loop.