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
DM-22655: Genericize gen2to3.py to be useable with any gen2 repo #202
Conversation
25118e6
to
55b5e80
Compare
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
"""Convert a gen2 butler repo to gen 3. See | ||
`lsst.obs.base.ConvertRepoConfig` for most of the config options. |
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.
Quick note. Please use the new scheme for writing scripts when you create new ones. We now have minimalist scripts in bin.src and place the argument parsing and main in the module itself. Please see https://community.lsst.org/t/new-tools-for-documenting-ad-hoc-scripts-in-the-lsst-science-pipelines/3784
2d9efd8
to
809c479
Compare
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.
Looks good but unfortunately I have lots of comments and questions. Please also follow up on moving the code in bin.src into the module following current practice.
b3e9824
to
b4c1804
Compare
This script is based of one built by Jim Bosch for ci_hsc. Add bin/ to .gitignore
Better error messages on failed skymaps. Pull out skymap dict population so we can reuse it.
DECam raw and Community Pipeline calibs are stored in multi-extension FITS files, which we handle by stripping 'ccdnum' from the gen2 template and then scanning the file for what HDUs it contains. * Strip off `[HDU]` from filenames * Change Builders, Handlers, and expandDataIds to support multi-HDU FITS. * In expandDataIds, strip the items we can't get the full dataId for (e.g. not in the gen2 calibRegistry) and prevent repeating FileDatasets.
In the default configuration, `isDatasetTypeIncluded` returns True for any input, but we can't do `os.listdir` on a nonexistent directory, so we also have to check that any refcats are configured to convert.
Some templates were magically expanded in the gen2 mapper: we need to support converting those here, without duplicating walker entries.
Gen2 was inconsistent in its use of filter names in calibReigstries, so we need multiple ways of managing that conversion.
htm.depth=7 is what we've settled on for all our refcats, not just ci_hsc.
77d6768
to
f12b267
Compare
No description provided.