-
Notifications
You must be signed in to change notification settings - Fork 0
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
Plot IR flag fraction in monitor_win_perigee + style improvements #12
Conversation
I'm getting this now on head ska from fido,
|
It looks like I'm seeing this because the fetch of quat_aoattqt results in an Msid object with different length vals and times.
|
Oh, I probably need sot/cheta#260 |
@jeanconn - I think I have addressed your review comments. I changed a few docstrings to make things a bit less confusing, but overall it is not worth the effort to entirely excise the whole Kalman drops concept. This is addressed with a note at the top of the code. I re-ran the functional testing with the seven time ranges and confirmed that the plots are still as expected. |
Description
monitor_win_perigee.py
is the trending code that makes the composite plot reflecting ionizing radiation near perigee using ACA / OBC telemetry in NPNT and ACA monitor window image data in NMAN.Previously the code was taking a short-cut and using
8 - AOKALSTR
as a proxy for the count of IR flags, but this is distorted by times when a slot is not tracked and can also reflect other flags or problems.Instead the new code directly counts the IR flags in telemetry to give an apples-to-apples comparison between NPNT and NMAN data. In addition the code is more careful now about normalization and the quantity that gets plotted is the fraction of available images that have the IR flag set. In the case of NPNT this requires both
AOACASEQ == "KALM"
and that the image tracking flag is set.An unrelated change was just tidying a few style issue that
ruff
highlighted inkalman_perigee_mon.py
. There is one slightly non-trivial change usinglines.extend
. I wasn't 100% sure of this behavior but it works and I did functional testing:Functional testing
monitor_win_perigee.py
Ran the following from with the repo in Ska3:
This gave the expected results for instance:
kalman_perigee_mon.py
Expected outputs:
Validation of IR fraction compared to Kalman drops
From https://gist.github.com/taldcroft/524136904910254ff3eed0bd224764b5 there is this plot:
From the new code for the same month of 2022-Jan we get:
For an IR flag fraction of 0.1 we would expect the above plot to show about 48 Kalman drops / minute (0.1 * 8 * 60), but instead we see rates 2 to 3 times higher. The answer is that if you look at the raw data many/most of the Kalman drops come from a star being not tracked (the red X's below).
From https://cxc.cfa.harvard.edu/mta/ASPECT/kalman_watch3/perigees/2022/Jan-12/index.html there is this plot:
The new code only considers readouts when a star is being tracked and the IR flag could be set. So the two quantities are telling us different things: