-
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
Add support for dynamic limits via effective t_ccd #271
Conversation
@jskrist - FYI see this PR. It adds two top-level attributes. John Scott stated that he was not especially interested in seeing these in ORviewer reporting, but they are there. I will include the effective temperature in the sparkles reports, and presumably @jeanconn will include them in starcheck reporting. |
With apologies, I tossed in the entirely-unrelated 0bf3901, because it falls in perfectly to the new set_attrs_from_kwargs method. No unit test, but it works:
|
Still not quite working the way I expect
|
Yck, I'll investigate. (BTW, more of the traceback would help in the future). |
Gotcha. I'll plan to come back around to this with more (and better debug info) if the issue isn't reproducible for you or if that was just a bad plug-in-the-args try on my part. (I don't think there was anything else screwed up in my workspace at the time). |
This is interesting because the new code reveals an ambiguity that was swept under the rug previously, namely which t_ccd to use for scaling the dark current. Before this code was just using
So perhaps just reverting to the old behavior is right. |
Ah. I was wondering about that (with the attribute structure I couldn't remember if there were two copies of the dark map or not). As you saw from my first broken review, I was trying to confirm that at least something reasonable was done with the dark map. Sounds like at some point we should figure out how do separate out the dark map scaling so that it is easier to have the "right" scaled dark map for acq and guide temperatures, but that the more conservative one should be OK for now. |
The other mystery being why my tests were passing. |
Duh, because I passed in the dark current explicitly. |
proseco/tests/test_catalog.py
Outdated
t_ccd_guide = t_ccd_acq - 0.1 | ||
|
||
kwargs = mod_std_info(stars=stars, dark=dark, | ||
t_ccd_acq=t_ccd_acq, t_ccd_guide=t_ccd_guide) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe your tests were passing because you were passing t_ccd from STD_INFO and t_ccd_acq and t_ccd_guide?
Ah. That makes even more sense. And is somewhat related to my comment on PR #274. |
Your exact example didn't work for other reasons, but this now runs:
|
Great! And "Your exact example didn't work for other reasons," yeah, when poking around at console generally I just keep adding keywords until the warnings go away... |
So I'm a little confused about how this ended up? I agree that if there can be only one temperature for the dark current that it should be the warmer one and the max guide temperature should be warmer than the acq temperature... but where is the code that sets t_ccd to be t_ccd_guide (I must be missing it)? And the t_ccd_eff_acq seems a bit ambiguous if it ends up being the "checking" temperature for the catalog but the imposters are made with the dark current from the t_ccd_eff_guide. But not a show-stopper. Otherwise I have not been able to make this code break since fixes. |
5057577
to
4dbfe52
Compare
t_ccd_acq = t_ccd - 1 | ||
ccd_kwargs = {'t_ccd_acq': t_ccd_acq, 't_ccd_guide': t_ccd_guide} | ||
|
||
kwargs = mod_std_info(stars=stars, dark=dark, **ccd_kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeanconn - look here and at the tests below Hopefully at least the API now makes sense. The implementation is not that tricky either but there are some obfuscations that must be traversed...
This adds two top-level attributes
t_ccd_eff_acq
andt_ccd_eff_guide
to capture the effective T_ccd that gets used in downstream processing. It leavest_ccd_acq
andt_ccd_guide
as the user-supplied values.In the
acqs
andguides
andfids
objects,t_ccd_acq/guide
is always the effective temperature. The idea is that those "low-level" objects don't need to fuss about this detail of how we implement dynamic limits. These objects just do their job of selecting stars for a given CCD temperature. This is all illustrated in the tests.This also adds a
version
attribute to ACATable.Closes #257