-
-
Notifications
You must be signed in to change notification settings - Fork 53
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: Make regtap service aware #386
Changes from all commits
ad302d9
af6c2bd
da72a06
66e3c34
7015144
fd230e1
cd52fb3
112b8a4
2da23d9
b5715fa
8ca5285
23a76ef
170a79b
e0f997f
1bbc88f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -130,7 +130,7 @@ you would say: | |||||||
... registry.Freetext("supernova")) | ||||||||
|
||||||||
After that, ``resources`` is an instance of | ||||||||
:py:class:`pyvo.registry.RegistryResults`, which you can iterate over. In | ||||||||
:py:class:`pyvo.registry.regtap.RegistryResults`, which you can iterate over. In | ||||||||
interactive data discovery, however, it is usually preferable to use the | ||||||||
``to_table`` method for an overview of the resources available: | ||||||||
|
||||||||
|
@@ -155,9 +155,9 @@ And to look for tap resources *in* a specific cone, you would do | |||||||
... registry.Spatial((SkyCoord("23d +3d"), 3), intersect="enclosed"), | ||||||||
... includeaux=True) # doctest: +IGNORE_OUTPUT | ||||||||
<DALResultsTable length=1> | ||||||||
ivoid res_type short_name res_title ... intf_types intf_roles alt_identifier | ||||||||
... | ||||||||
object object object object ... object object object | ||||||||
ivoid res_type short_name res_title ... intf_types intf_roles alt_identifier | ||||||||
... | ||||||||
object object object object ... object object object | ||||||||
------------------------------ ----------------- ------------- ------------------------------------------- ... ------------ ---------- -------------------------------- | ||||||||
ivo://cds.vizier/j/apj/835/123 vs:catalogservice J/ApJ/835/123 Globular clusters in NGC 474 from CFHT obs. ... vs:paramhttp std doi:10.26093/cds/vizier.18350123 | ||||||||
|
||||||||
|
@@ -183,7 +183,7 @@ are not), but it is rather clunky, and in the real VO short name | |||||||
collisions should be very rare. | ||||||||
|
||||||||
Use the ``get_service`` method of | ||||||||
:py:class:`pyvo.registry.RegistryResource` to obtain a DAL service | ||||||||
:py:class:`pyvo.registry.regtap.RegistryResource` to obtain a DAL service | ||||||||
object for a particular sort of interface. | ||||||||
To query the fourth match using simple cone search, you would | ||||||||
thus say: | ||||||||
|
@@ -513,6 +513,44 @@ and then you can run: | |||||||
{'flashheros.data': <VODataServiceTable name="flashheros.data">... 29 columns ...</VODataServiceTable>, 'ivoa.obscore': <VODataServiceTable name="ivoa.obscore">... 0 columns ...</VODataServiceTable>} | ||||||||
|
||||||||
|
||||||||
Alternative Registries | ||||||||
====================== | ||||||||
|
||||||||
There are several RegTAP services in the VO. PyVO by default uses the | ||||||||
one at the TAP access URL http://reg.g-vo.org/tap. You can use | ||||||||
alternative ones, for instance, because they are nearer to you or | ||||||||
because the default endpoint is down. | ||||||||
|
||||||||
You can pre-select the URL by setting the ``IVOA_REGISTRY`` environment | ||||||||
variable to the TAP access URL of the service you would like to use. In | ||||||||
a bash-like shell, you would say:: | ||||||||
|
||||||||
export IVOA_REGISTRY="http://vao.stsci.edu/RegTAP/TapService.aspx" | ||||||||
Comment on lines
+519
to
+528
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know that you don't yet want review, so I leave only one comment: we should be able to do this with a more programatic way, from inside the python interpreter. |
||||||||
|
||||||||
before starting python (or the notebook processor). | ||||||||
|
||||||||
Within a Python session, you can use the | ||||||||
`pyvo.registry.choose_RegTAP_service` function, which also takes the | ||||||||
TAP access URL. | ||||||||
|
||||||||
As long as you have on working registry endpoint, you can find the other | ||||||||
RegTAP services using: | ||||||||
|
||||||||
.. We probably shouldn't test the result of the next code block; this | ||||||||
will change every time someone registers a new RegTAP service... | ||||||||
|
||||||||
.. doctest-remote-data:: | ||||||||
|
||||||||
>>> res = registry.search(datamodel="regtap") | ||||||||
>>> print("\n".join(sorted(r.get_interface("tap").access_url | ||||||||
... for r in res))) | ||||||||
Comment on lines
+545
to
+546
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nitpick: we can have longer lines
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mhhh... I actually prefer broken lines and the loop expression on an extra line... |
||||||||
http://dc.zah.uni-heidelberg.de/tap | ||||||||
http://gavo.aip.de/tap | ||||||||
http://voparis-rr.obspm.fr/tap | ||||||||
https://vao.stsci.edu/RegTAP/TapService.aspx | ||||||||
|
||||||||
|
||||||||
|
||||||||
Reference/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.
As this is user facing, I would think the information that now it's possible to use other registries is important to list, or to list as well.
That being said, I would go ahead and merge this as is so I can go ahead and do more tests and cleanups, but please do advise a rephrasing and I'll fix up the changelog before the release.