Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't check the OCAT for "hot" ACIS observations if there are no observations (vehicle loads) #48

Merged
merged 3 commits into from
Feb 16, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions acis_thermal_check/acis_obs.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ def fetch_ocat_data(obsid_list):
"determine which observations can go to -109 C. " \
"Any violations of eligible observations should " \
"be hand-checked."
# If no obsids were found (vehicle-only load) do not bother
# with this check
if len(obsid_list) == 0:
return None
# The following uses a request call to the obscat which explicitly
# asks for text formatting so that the output can be ingested into
# an AstroPy table.
Expand Down Expand Up @@ -244,6 +248,10 @@ def find_obsid_intervals(cmd_states, load_start):
# Now we add the stuff we get from ocat_data
obsids = [e["obsid"] for e in obsid_interval_list]
ocat_data = fetch_ocat_data(obsids)
# For a vehicle load, or if the connection to the ocat server
# fails (rare), we will get no data from the ocat so we only
# add this info if we need to. In the case of a failed connection
# to the OCAT server, -109 C checks should be done by hand
if ocat_data is not None:
ocat_keys = list(ocat_data.keys())
ocat_keys.remove("obsid")
Expand Down