Closed taldcroft closed 3 years ago
Sorry about the whitespace changes. My editor just does that. When looking at the diffs you can click the settings icon and hide whitespace-only changes.
I like this. I was wondering if we'd want to put the characteristics fetching into chandra_aca or some such instead of proseco, but this seems fine.
I added another commit to just wrap every function in a decorator that does the right exception handling. This should really be a separate PR, but I messed up originally by bundling that first change in utils.py
in one commit with the other stuff. Probably not worth the effort to clean that up.
Do we want to add the used version of chandra_models to some output? It isn't a critical element for starcheck, but we do have the stdout like
#####################################################################
# calc_ccd_temps run at Mon Jun 28 10:03:30 2021 by jeanconn
# Continuity run_start_time = 2021:179:14:03:30.276
# calc_ccd_temps version = 13.10.1.dev4+g20f2e89
# kadi version = 5.6.0
#####################################################################
Adding the chandra_models version is a good idea will do.
I'll hold on final review until the version is in there (which I can also do?), but I've reviewed and played with this some more and I'm good with it.
I moved the import up to the top and passed it to the plotting routine. stdout log output now looks like
#####################################################################
# calc_ccd_temps run at Wed Jun 30 12:18:15 2021 by jeanconn
# Continuity run_start_time = 2021:181:16:18:15.029
# calc_ccd_temps version = 13.10.1.dev6+g96c4006
# chandra_models version = 3.35.1
# kadi version = 5.6.0
#####################################################################
Description
This uses the
proseco.characteristics
module to get the ACA planning and penalty limits from the latest release ofchandra_models
in$SKA/data/chandra_models
.This also includes an improvement to the exception handling for some Python functions that get called from perl.
Testing
Functional testing of planning limit
Used local dev version of proseco (https://github.com/sot/proseco/pull/356) @ f889746 along with a local version of
chandra_models
that has https://github.com/sot/chandra_models/pull/74 @ edcec9a. With this:The output shows the red and yellow limits lines at -5.8 and -6.8 C respectively, and shows expected INFO messages like
>> INFO : Effective acq temperature -5.6 C
.Functional testing of exception handling
Modified one function that is wrapped in the new decorator to raise an exception (
return 1 / 0
) and confirmed the expected output and stop to processing.