Skip to content
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

Partial rewrite of the MOCServer module #3139

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,34 @@ ipac.irsa
- Add more robust handling of errors returned in Most.query_object() responses.
[#3140]

mocserver
^^^^^^^^^

- Switch to https instead of http for the default url (allows pyodide to use the module) [#3139]

- Add ``TimeMOC`` and ``STMOC`` as possible entries in ``MOCServer.query_region`` to
allow temporal and space-time searches [#3139]

- ``return_moc`` now allows to ask for a Time-MOC or a Space-Time MOC rather than only
Space-MOCs [#3139]

- Fix query by MOC that would write a file ``moc.fits`` where the method was executed
in overwriting mode (potentially deleting data if there was a conflicting file) [#3139]

- Returned tables now have a default list of fields instead of the > 130 columns returned
previously. The full list of fields can be displayed with the new method
``MOCServer.list_fields`` [#3139]

- Add ``casesensitive`` parameter in the queries (previously, this was hardcoded
to ``True``) [#3139]

- Add ``spacesys`` parameter to the queries to allow to filter on the different bodies
or frames. The list of available space systems can be printed with the new method
``MOCServer.list_spacesys`` [#3139]

- Add ``query_hips`` method, which is convenient to filter only Hierarchical progressive
surveys [#3139]

mpc
^^^

Expand Down
28 changes: 18 additions & 10 deletions astroquery/mocserver/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
CDS MOCServer Query Tool
------------------------
"""CDS MOCServer Query Tool.
----------------------------

:Author: Matthieu Baumann ([email protected])

Expand All @@ -13,8 +12,9 @@
Note: If the access to MOCs with the MOCServer tool was helpful for your research,
the following acknowledgment would be appreciated::

This research has made use of the MOCServer, a tool developed at CDS, Strasbourg, France aiming at retrieving
MOCs/meta-data from known data-sets. MOC is an IVOA standard described in the following paper :
This research has made use of the MOCServer, a tool developed at CDS, Strasbourg,
France aiming at retrieving MOCs/meta-data from known data-sets. MOC is an IVOA
standard described in :
http://www.ivoa.net/documents/MOC/20140602/REC-MOC-1.0-20140602.pdf
"""

Expand All @@ -24,14 +24,12 @@


class Conf(_config.ConfigNamespace):
"""
Configuration parameters for ``astroquery.template_module``.
"""
"""Configuration parameters for ``astroquery.template_module``."""

server = _config.ConfigItem(
[
"http://alasky.unistra.fr/MocServer/query",
"http://alaskybis.unistra.fr/MocServer/query",
"https://alasky.unistra.fr/MocServer/query",
"https://alaskybis.unistra.fr/MocServer/query",
],
"Name of the template_module server to use.",
)
Expand All @@ -40,6 +38,16 @@ class Conf(_config.ConfigNamespace):
30, "Time limit for connecting to template_module server."
)

default_fields = [
"ID",
"obs_title",
"obs_description",
"nb_rows",
"obs_regime",
"bib_reference",
"dataproduct_type",
]


conf = Conf()

Expand Down
Loading
Loading