-
Notifications
You must be signed in to change notification settings - Fork 0
DM-35052: Fix single visit restriction for Prompt Processing #22
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3644dc5
Fix obsolete HSC config.
kfindeisen aabcc55
Fix broken GHA builds.
kfindeisen f3c0821
Merge duplicate visit modules.
kfindeisen 54ac716
Factor out shared raw path definitions.
kfindeisen 4b8fa6a
Move all metadata to raw "directory".
kfindeisen 81a7984
Support a broader subset of HSC-COSMOS inputs to upload.py.
kfindeisen 230098e
Clarify documentation for make_remote_butler.py.
kfindeisen d32e0bb
Add more raws to input dataset.
kfindeisen 253f778
Remove upload.py support for arbitrarily large numbers of groups.
kfindeisen 42f87df
Stop overwriting exposure ID of uploaded files.
kfindeisen bf7ad83
Process only the requested exposure IDs in run_pipeline.
kfindeisen 63b7e69
Avoid hardcoded collection names in MiddlewareInterface.
kfindeisen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,15 @@ | ||
# Config override for lsst.pipe.tasks.calibrate.CalibrateTask | ||
# This config is for the ap_verify datasets that use gaia/panstarrs as their | ||
# refcat names. | ||
from lsst.meas.algorithms import LoadIndexedReferenceObjectsTask | ||
|
||
# Use gaia for astrometry (phot_g_mean for everything, as that is the broadest | ||
# band with the most depth) | ||
# Use panstarrs for photometry (grizy filters) | ||
for refObjLoader in (config.astromRefObjLoader, | ||
config.photoRefObjLoader,): | ||
refObjLoader.retarget(LoadIndexedReferenceObjectsTask) | ||
# band with the most depth). | ||
|
||
config.connections.astromRefCat = "gaia" | ||
config.astromRefObjLoader.ref_dataset_name = config.connections.astromRefCat | ||
config.astromRefObjLoader.filterMap = { | ||
"u": "phot_g_mean", | ||
"g": "phot_g_mean", | ||
"r": "phot_g_mean", | ||
"i": "phot_g_mean", | ||
"z": "phot_g_mean", | ||
"y": "phot_g_mean", | ||
"VR": "phot_g_mean"} | ||
config.astromRefObjLoader.anyFilterMapsToThis = "phot_g_mean" | ||
config.astromRefObjLoader.filterMap = {} | ||
|
||
# Use panstarrs for photometry (grizy filters). | ||
config.connections.photoRefCat = "panstarrs" | ||
config.photoRefObjLoader.ref_dataset_name = config.connections.photoRefCat | ||
config.photoRefObjLoader.filterMap = { | ||
"u": "g", | ||
# TODO: workaround for DM-29186 | ||
# "g": "g", | ||
# "r": "r", | ||
# "i": "i", | ||
# "z": "z", | ||
# "y": "y", | ||
"VR": "g"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# This file is part of prompt_prototype. | ||
# | ||
# Developed for the LSST Data Management System. | ||
# This product includes software developed by the LSST Project | ||
# (https://www.lsst.org). | ||
# See the COPYRIGHT file at the top-level directory of this distribution | ||
# for details of code ownership. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
"""Common definitions of raw paths. | ||
This module provides tools to convert raw paths into exposure metadata and | ||
vice versa. | ||
""" | ||
|
||
__all__ = ["RAW_REGEXP", "get_raw_path"] | ||
|
||
import re | ||
|
||
# Format for filenames of raws uploaded to image bucket: | ||
# instrument/detector/group/snap/expid/filter/*.(fits, fz, fits.gz) | ||
RAW_REGEXP = re.compile( | ||
r"(?P<instrument>.*?)/(?P<detector>\d+)/(?P<group>.*?)/(?P<snap>\d+)/(?P<expid>.*?)/(?P<filter>.*?)/" | ||
r"[^/]+\.f" | ||
) | ||
|
||
|
||
def get_raw_path(instrument, detector, group, snap, exposure_id, filter): | ||
kfindeisen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"""The path on which to store raws in the image bucket. | ||
""" | ||
return ( | ||
f"{instrument}/{detector}/{group}/{snap}/{exposure_id}/{filter}" | ||
f"/{instrument}-{group}-{snap}" | ||
f"-{exposure_id}-{filter}-{detector}.fz" | ||
) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These two lines are technically not necessary, since DM-27013 is done.
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 didn't know that, but for configuration that depends on the input data, I prefer to be explicit instead of trusting that the defaults match up with I really need.