ENH: adding SSA method for IRSA#3076
Conversation
|
I'm testing this out now. See #3092 for related work. First, the format is not the same as ssa only wants a 2-tuple, not a 3-tuple But it looks like right now, this is not yet functional (it is labeled |
|
Yeap, whatever I have here is just a dump of the first draft that I came up with during some meeting or such by mostly just copying over sia, without cleaning up and making it ssa specific. Realistically this won't get done before the next quarter (and will need some server-side stuff, too, e.g. caching some queries) |
e6679a4 to
9e4a5a0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3076 +/- ##
==========================================
+ Coverage 68.31% 69.07% +0.75%
==========================================
Files 231 232 +1
Lines 19199 19605 +406
==========================================
+ Hits 13116 13542 +426
+ Misses 6083 6063 -20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@keflavich - this is ready for review. There may be corners of uncovered API, and some missing parsing on the pyvo side, I've opened issues for a couple of those, but the basic examples should work here. I'm also planning to make this more user friendly, e.g. adding the |
keflavich
left a comment
There was a problem hiding this comment.
Minor suggestions & questions. Fine to merge, but it might be nice to make some small doc improvements.
| >>> arp220_spectra = Irsa.query_ssa(pos=coord).to_table() | ||
|
|
||
| Without specifying the collection, the query returns results from multiple | ||
| collections. For example this target has spectra from Sofia as well as from |
There was a problem hiding this comment.
SOFIA is an acronym, right?
| collections. For example this target has spectra from Sofia as well as from | |
| collections. For example this target has spectra from SOFIA as well as from |
| pos : `~astropy.coordinates.SkyCoord` class or sequence of two floats | ||
| the position of the center of the circular search region. | ||
| assuming icrs decimal degrees if unit is not specified. | ||
| diameter : `~astropy.units.Quantity` class or scalar float |
There was a problem hiding this comment.
why diameter instead of radius? radius is more common across the rest of our API
There was a problem hiding this comment.
inherited from SSA API, but I agree that I need to change this to be radius instead.
| format : str | ||
| the image format(s) of interest. "all" indicates | ||
| all available formats; "graphic" indicates | ||
| graphical images (e.g. jpeg, png, gif; not FITS); | ||
| "metadata" indicates that no images should be | ||
| returned--only an empty table with complete metadata. |
There was a problem hiding this comment.
is ('all', 'graphic', 'metadata') a complete set of valid options? If so, it would be helpful to indicate that. If not, can we document what is allowed here or in the main docs?
There was a problem hiding this comment.
I copied this from the pyvo docs, looking at the IRSA SSA metadata, these are the actual options:
<OPTION value="ALL"/>
<OPTION value="COMPLIANT"/>
<OPTION value="NATIVE"/>
<OPTION value="VOTABLE"/>
<OPTION value="FITS"/>
<OPTION value="XML"/>
<OPTION value="GRAPHIC"/>
<OPTION value="METADATA"/>
However, some of these are known not to be working (e.g. metadata), and now as I test them some of them are not working as expected. (e.g. FITS).
So this may need an upstream fix (either at the server on in pyvo), and here, I may just remove this kwarg for now and hard-wire to return all results in this first iteration.
There was a problem hiding this comment.
so, now I hardwired 'all', and opened a follow-up to address this properly. xref: #3234
| coord = SkyCoord.from_name("Eta Carina") | ||
| result = Irsa.query_ssa(pos=coord) | ||
| assert len(result) > 260 | ||
| collections = set(unique(result.to_table(), keys='dataid_collection')['dataid_collection']) |
There was a problem hiding this comment.
is set(unique( redundant? I'd imagine so
7482617 to
2eeada5
Compare
|
I've addressed all the review issues here and opened follow-up for the format issues. So I'll go ahead with the merge so we can try and sort out if there is anything needed for the next release (in ~2 weeks time). |
Addig SSA access to spectral holdings. The
query_ssamethod is a very thin wrapper of pyvo, so while any issues recovered with it is appreciated, we may ultimately need to propagate those upstream rather than adding workaround for the PR.closes #3061