Skip to content

WIP pickle dark cal image params #201

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

Closed
wants to merge 1 commit into from
Closed

WIP pickle dark cal image params #201

wants to merge 1 commit into from

Conversation

taldcroft
Copy link
Member

Would close #200, except that it turns out that this opens a can of worms and I'm thinking it isn't worth the trouble.

I went into this trying to develop a re-usable structure that could be applied to stars as well and would allow unpickling to just work. But some problems:

  • For a supplied dark map (either ACAImage or ndarray image) this should be pickled as an ACAImage. Unfortunately it turns out ACAImage doesn't roundtrip through pickle because the meta is lost. It would be feasible to fix ACAImage (requiring a new release of Ska3) or monkey patch the class. Ugh.
  • Even for the nominal case of dark taken from mica, where unpickling would recognize the special tuple in dark, there is an issue that aca, aca.acqs, aca.guides, and aca.fids would all find themselves seeing that tuple and running the function to individually get a dark value. Not so nice.

Then I realized that to first order what is being pickled here in the production case isn't really getting us that much closer to the actual dark map used in selection. The kwargs are guaranteed to be the same, and there is still the need for post-processing to add the bad pixels.

So leaving this open for the moment for pondering, but I don't recommend this for 4.3.1. It still needs testing which isn't so trivial.

@jeanconn
Copy link
Contributor

The most interesting edge case, is when stars are selected, and then the dark map is updated before the loads are approved, right? So it seems like this can be handled on the starcheck side to some extent. Worst case we could do the currently-duplicate-code bad pixel check twice (with dark current from a week ago and dark current now) and warn on any really bad hot pixel hits that star selection should be done again.

@taldcroft
Copy link
Member Author

Closing this. If for some reason we end up with a hard driver for this then this PR will still be here for examination.

@taldcroft taldcroft closed this Feb 7, 2019
@taldcroft taldcroft deleted the pickle-dark branch February 7, 2019 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include dark cal, agasc, and maybe agasc supplement version info in pickle
2 participants