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
Vette Frame object #386
Vette Frame object #386
Conversation
…ub/desispec into vette_frame # Conflicts: # doc/changes.rst
Pinging @rstaten for test failure issue on XWSigma test. |
Is it possible to make progress on this PR (i.e. the failing |
temporary xwsigma fix
…ub/desispec into vette_frame # Conflicts: # doc/changes.rst
Not to disappoint, I'll give a minor quibble: changes.rst calls this file Provided that the tests now pass, please consider that renaming, then go ahead and merge. For consideration: in similar functions in desimodel, the results of the file are cached so that future calls to the loader don't have to re-read from disk when asking for the same file. If we start fetching these parameters a lot we should do that to limit I/O. |
Passing now. @sbailey , be sure to take a look at the |
Added a test, made params a global (in desispec.io.params), |
Just a quick comment- if we have thousands of processes that all call "read_params" to load a tiny yaml file, then what happens? Can we be certain that read_params is not called during normal pipeline operations? I guess if we are running from a docker image maybe this matters less, but we should avoid touching the disk except when necessary during pipeline running. Obviously calling Frame.vette() is fine from a QA process running after a given pipeline step. |
I think this is a very good point. If we are concerned about I/O then |
@profxj et al, If this is in relation to the params governing QAs, then it may be useful to keep in mind that the quicklook QAs take their params as dicts in a configuration file. We are substantially updating that right now, but there are already examples in the quicklook github for this. All of the params have been planned to be configurable. It would be very useful for offline and quicklook to use the same approach, again assuming this thread is referring to the reduction QA params. |
It is not referring to QA (today), but we can conflate |
@rkehoe -- Please let me know if you are ok with this PR. |
@profxj I do not think the QA params discussion should delay your PR, so please do your merge. We will be asking for a merge on the QuickLook PR very soon, and this will hopefully help a discussion of this topic. |
Very good. @sbailey , merge if you are happy. |
I fixed parameter caching; the previous implementation would have ignored the "filename" argument if the parameters had been previously read from a different filename. We may never have hit that situation, but as long as "filename" is an option we should have it fully working. I added tests for this case too. I also fixed "vette" -> "vet" (past tense is "vetted", but present tense if "vet"). OK to merge when tests pass. |
Merging. |
Code to vette the sanctity of a Frame object.
Currently only checks data shape and FLAVOR in meta
Also brings in the concept of parameter files into desispec.
I suspect @sbailey will suggest a modified architecture.
Deprecates the use of 'dark', 'bright', etc. for FLAVOR type.
All are captured by 'science'.