-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add includes_for_obsid helper function #311
Conversation
@jeanconn - are you planning to review this then? |
No, I was actively reviewing this item 😄 |
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 looks good and works for me.
def includes_for_obsid(obsid): | ||
""" | ||
Return a dict with the include_ids_acq, include_halfws_acq and include_ids_guide | ||
lists for the as-run flight catalog of ``obsid``. Useful for forcing catalog. |
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 note that get_starcheck_catalog has both as-run catalogs and has ingested latest-version catalogs for obsids that haven't actually run yet. But that does not apply to this PR.
|
||
ok = np.in1d(cat['type'], ('ACQ', 'BOT')) | ||
out['include_ids_acq'] = cat['id'][ok].tolist() | ||
out['include_halfws_acq'] = cat['halfw'][ok].tolist() |
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 looks good as I don't see any way the ids and the halfwidths can end up with mismatched indexes.
""" | ||
from mica.starcheck import get_starcheck_catalog | ||
|
||
obs = get_starcheck_catalog(obsid) |
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.
Could use get_starcat here but get_starcheck_catalog is fine.
Closes #309. (Supercedes).