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
Tootile #422
Conversation
@geordie666 : thanks for agreeing to review this PR! As said in slack, there are two parts:
About the "original" part, on fiberassign: About the "added" part, on creating the |
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 reviewed the PR for content, although I didn't check whether the code actually runs (under the assumption that Anand must have tried that, already.
I've supplied a handful of comments for consideration.
I think the aspect of the code that makes me most nervous is the potential for a user to provide their preferred bit-names from the desi_mask
and scnd_mask
. I think we should always default to SCND_ANY
for the desi_mask
for tertiary targets and always default to one of the TOO
bit-names for the scnd_mask
. Otherwise we could break the unique correspondence between primary targets and an associated bit-name.
I know that enforcing, e.g., DESI_TARGET=SCND_ANY
could make processing downstream a little harder for folks proposing tertiary programs. But, I don't like the thought of, e.g., LRG
in the DESI_TARGET
column referring to different selections for primary and tertiary programs. It's too easy for a future user to not check on release=8888
in decode_targetid
and think that a tertiary target that has bit-name LRG
set refers to the exact-same-selection as a primary target with bit-name LRG
set.
My preferred method for proposers of tertiary targets to handle "different bits" would be for them to create their own designations/bits in a row-by-row parallel file, to which they could match on TARGETID
.
Oh, and my personal view is that If a proposer of tertiary targets wants to "try out" and refine their selection before we process official tiles, I think that's easier if the whole procedure is handled by I appreciate that much of the past slowness for rapid-turnaround of special programs is ameliorated by using the ToO mechanism, though. So, I'm happy to revisit this and port parts of the code to |
thanks a lot @geordie666 for the careful review — and very relevant comments! but already one clarification, about the I agree that we could hard-code for now those in |
I understand that about one of us running the pipeline — but there's always the possibility that we train someone else to use the software, or you and I are both on vacation, etc. Better to be safe, I think, and not allow any "unfortunate" uses of the code if we don't intend to be overly flexible. |
again, thanks a log @geordie666 for the review. besides, I ve also pushed few commits correcting small things:
lastly: cori has been more cooperative tonight, and I ve double-check that I can reproduce all main tiles. |
oh, and if informative, here how the content of the column format:
the header:
and one the first row:
|
This looks good to me, pending any feedback from Eddie. |
# AR PRIORITY_INIT | ||
sel = (prio["TERTIARY_TARGET"] == tertiary_target) & ( | ||
prio["NUMOBS_DONE_MIN"] == 0 | ||
) |
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 checking my understanding than anything---do you want to assert that sel.sum() == 1 around here?
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.
you correctly understood the logic!
I m actually doing that check exactly (and few others) in assert_tertiary_prio()
, which verifies that the file is as expected:
fiberassign/py/fiberassign/fba_tertiary_io.py
Lines 331 to 345 in e2f7cfc
sel = (prio["TERTIARY_TARGET"] == tertiary_target) & ( | |
prio["NUMOBS_DONE_MIN"] == 0 | |
) | |
if sel.sum() == 0: | |
msg = "NUMOBS_DONE_MIN=0 case not set for TERTIARY_TARGET={}".format( | |
tertiary_target | |
) | |
log.error(msg) | |
raise IOError(msg) | |
if sel.sum() > 1: | |
msg = "NUMOBS_DONE_MIN=0 case appearing {} times for TERTIARY_TARGET={}".format( | |
sel.sum(), tertiary_target | |
) | |
log.error(msg) | |
raise IOError(msg) |
(I also do a similar check for the tertiary-targets-PROGNUM.fits file).
thanks for looking so carefully at the code.
I'm happy to merge. |
I'm happy to merge, too. |
thanks both for all the feedback. fiberassign/py/fiberassign/fba_tertiary_io.py Line 633 in e2f7cfc
shall we want to set EXTNAME="TERTIARY" instead? or just keep "TOO" ?
|
I think for this ToO file that is the processed result of the tertiary- input file, it's best to keep this looking as much like a normal ToO file as possible. i.e., EXTNAME=ToO makes sense to me. I guess I'd also add that since this is an ecsv file and can have only one extension, I'm not sure anyone will know what the EXTNAME is. |
ok perfect, let s keep |
This PR adds three arguments to fba_launch, to handle the creation of ToO-dedicated tiles:
targ_std_only
: only picks the standard stars from the MTL ledgers (fba_launch_io.create_mtl());too_tile
: accepts ToO targets for dedicated tiles (fba_launch_io.create_too());goaltype
: allows one to manually set goaltype (which was previously tied to program).The default values make those changes backwards-compatible for the Main survey.
Example of invocation:
As this M31 tile is outside the DR9 footprint, we need to query the BACKUP program to:
However, it will be observed in dark program, hence: