-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
ENH: adding SSA method for IRSA #3076
base: main
Are you sure you want to change the base?
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% 68.30% -0.01%
==========================================
Files 231 231
Lines 19199 19211 +12
==========================================
+ Hits 13116 13123 +7
- Misses 6083 6088 +5 ☔ View full report in Codecov by Sentry. |
@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 |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why diameter instead of radius? radius is more common across the rest of our API
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is set(unique(
redundant? I'd imagine so
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.
sure 🤦♀️
Addig SSA access to spectral holdings. The
query_ssa
method 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