-
Notifications
You must be signed in to change notification settings - Fork 7
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-46562: Add bps templates for LSSTCam/LSSTComCam/LATISS calibration creation. #292
base: main
Are you sure you want to change the base?
Conversation
bps/templates/bps_flat.yaml
Outdated
output: ${USER_CALIB_PREFIX}${INSTRUMENT}/calib/${TICKET}/${TAG}/flatGen-${FLAT_BAND}.${RERUN} | ||
butlerConfig: ${REPO} | ||
inCollection: ${USER_CALIB_PREFIX}${INSTRUMENT}/calib/${TICKET}/${TAG},${RAW_COLLECTION},${CALIB_COLLECTIONS} | ||
dataQuery: ${!SELECTION_FLAT_BAND} |
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 this exclamation point is a typo.
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.
This is bash "indirection" which should allow one template to be used for all the flats with different selection variables. That's the idea, at least. I haven't gotten to testing this part yet!
bps/templates/README.md
Outdated
``` | ||
export FLAT_BAND=g | ||
export SELECTION_FLAT_BAND=SELECTION_FLAT_g | ||
export SELECTION_FLAT_g="instrument='LSSTComCam' and selection-string" |
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.
This uses selection-string
instead of selection_string
used elsewhere. Not really a "bug" as this is documentation.
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.
Actual comment: If we have a band variable, we should constrain the query to just that band. This will prevent future accidents where we generate a 15 input g flat and a 1 input r flat in the same collection because an endpoint was misread.
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.
True but not trivial because we need to know the physical filter in the constraint, so I can't easily template that generally for LATISS/LSSTComCam/LSSTCam. But we can put strong recommendation that SELECTION_FLAT_g
and friends include a physical filter constraint!
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 don't think we need to know the physical_filter
. I assume pipetask
and butler query-dimension-records
use the same resolver, so something like this should work:
butler query-dimension-records /repo/main exposure --where "instrument='LSSTComCam' AND physical_filter.band='g'" --limit 1
instrument id day_obs group physical_filter obs_id exposure_time dark_time observation_type observation_reason seq_num seq_start seq_end target_name science_program tracking_ra tracking_dec sky_angle azimuth zenith_angle has_simulated can_see_sky timespan (TAI)
---------- ------------- -------- -------------------- --------------- -------------------- ------------- --------------- ---------------- ------------------ ------- --------- ------- ----------- --------------- ----------- ------------ --------- ------- ------------ ------------- ----------- ------------------------------------------
LSSTComCam 2021040100003 20210401 CALSET_20210401_1601 g_07 CC_O_20210401_000003 1.0 1.5343017578125 flat flat 3 3 3 UNKNOWN unknown None None None None None False None [2021-04-01T16:24:36, 2021-04-01T16:24:37)
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.
"instrument='LSSTComCam' AND band='g'"
should work and is shorter.
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.
When getting a flat from a calib repo that doesn't work, so I guess I had assumed we needed it in the constraint as well.
bps/templates/bps_linearizer.yaml
Outdated
output: ${USER_CALIB_PREFIX}${INSTRUMENT}/calib/${TICKET}/${TAG}/linearizerGen.${RERUN} | ||
butlerConfig: ${REPO} | ||
inCollection: ${USER_CALIB_PREFIX}${INSTRUMENT}/calib/${TICKET}/${TAG},${RAW_COLLECTION},${CALIB_COLLECTIONS} | ||
dataQuery: ${SELECTION_PTC_LINEARIZER-$SELECTION_PTC} |
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.
This has a typo as well.
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.
More bash magic that is supposed to use $SELECTION_PTC_LINEARIZER
if it is set and otherwise use $SELECTION_PTC
. Also not yet tested if the bps vars support this...
Environment Variables | ||
--------------------- | ||
|
||
These are the environment variables that must be used. Examples are substituted in. |
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.
This should also note that selection_string
is a dummy variable here, and that it needs to be filled with something explicit. I was going to suggest putting in the information being used on DM-46562 (the ticket used below), but I see that's this ticket adding the BPS templates, not a generation ticket.
84105fc
to
2850fa2
Compare
2850fa2
to
b3c7170
Compare
No description provided.