TLDR: If my code fails to detect a rare astrophysical event, we
will have to wait ~1-2 years for another chance, and Dr. Hervet
misses out on a $98,000 grant.
Why did I do it?
Blazars flare only once every year or two. By constantly monitoring
the energy output, we can anticipate one of these rare events. By
catching a flare early, Dr. Hervet can trigger a Target of
Opportunity request to several telescopes to set aside all other
observations and immediately focus on Mrk421. This focus
would gather in depth data on Blazar behavior during a flare,
which currently doesn't exist.
What did I accomplish?
I wrote a python script that gathers data from 4 different
telescopes:
VERITAS,
SWIFT-XRT,
NICER,
and
MAXI-RIKEN.
Then, it analyzes the data to detect if a flare is about
to occur, and if a flare is detected, it composes and sends an alert
email.
What did I learn?
The most challenging part of this project was building a program
that has such robust error handling there is no chance of missing
flare. To implement this behavior, I employed several methods:
First, I worked to keep the code as modular and simple as possible.
That let me analyze and test every function individually. Second,
every function has the ability to return a special error type. In
the event of an error, everyone on the mailing list is notified
that what exactly went wrong, so manual observation can be used until
the error is resolved. Finally, I have been maintaining the
software to adjust to changes in the APIs or URLs it depends on.