Allow multiple search positions in MastMissions#3540
Conversation
fix docs build Add PR number to changelog Remove unnecessary reference to objectname
c129b57 to
f40a1a5
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3540 +/- ##
==========================================
+ Coverage 72.66% 72.76% +0.10%
==========================================
Files 219 219
Lines 20478 20543 +65
==========================================
+ Hits 14880 14948 +68
+ Misses 5598 5595 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bsipocz
left a comment
There was a problem hiding this comment.
Some comments, the documentation example needs to be fixed otherwise it looks good.
Thanks!
| assert result == ['10.684 41.269'] | ||
|
|
||
| # List of coordinate objects | ||
| coords = [SkyCoord(10.684, 41.269, unit='deg'), SkyCoord(83.6331, 22.0145, unit='deg')] |
There was a problem hiding this comment.
I suppose this would also work with a vector SkyCoord as opposed to a list of singletons?
There was a problem hiding this comment.
It does not! Good catch. I'll make that change.
| 210.80227 54.34895 OBQU010F0 NUCLEUS+HODGE602 2012-05-24T09:09:18.570000 2012-05-24T09:12:24.570000 0.022143836477276503 PUBLIC | ||
| 210.80227 54.34895 OBQU01070 NUCLEUS+HODGE602 2012-05-24T08:00:00.553000 2012-05-24T08:03:06.553000 0.04381046755938432 PUBLIC | ||
| >>> select_cols = ["sci_targname", "sci_pep_id", "sci_status"] | ||
| >>> results = missions.query_criteria(coordinates=[SkyCoord(245.89675, -26.52575, unit='deg'), "205.54842 28.37728"], |
There was a problem hiding this comment.
This example errors out when remote tests are run, could you please have a look at it?
|
|
||
| @class_or_instance | ||
| def query_criteria_async(self, *, coordinates=None, objectname=None, radius=3*u.arcmin, | ||
| @deprecated_renamed_argument('objectname', 'object_names', since='0.4.11') |
There was a problem hiding this comment.
there are a couple more of these objectname kwargs, would you mind changing them to the snake case, too? (not in this PR, but sometime, for the sake of API consistency)
There was a problem hiding this comment.
Yes, this is in our plans! Catalogs will change with the new version, and I can make another PR for Observations and Cutouts.
bsipocz
left a comment
There was a problem hiding this comment.
Thank you, this all looks good now!
MastMissionsquery functions now support single or multiple targets viacoordinatesandobject_names(including combined use inquery_criteria).Notes:
objectnamekeyword is deprecated in favor ofobject_names.query_criteriano longer requires that a non-positional criterion be provided.query_regionandquery_objectcallquery_criteria. Docs now emphasize thatquery_regionandquery_objectare convenience wrappers.