Skip to content

Commit 44017b3

Browse files
ManonMarchandbsipocz
authored andcommitted
refactor: rewrite the mocserver module
this is mainly motivated by the new support for time mocs and space-time mocs upstream
1 parent 3c228d7 commit 44017b3

File tree

12 files changed

+1562
-819
lines changed

12 files changed

+1562
-819
lines changed

CHANGES.rst

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,39 @@ jplspec
1919

2020
- minor improvement to lookuptable behavior [#3173,#2901]
2121

22+
mocserver
23+
^^^^^^^^^
24+
25+
- Switch to https instead of http for the default url (allows pyodide to use the
26+
module) [#3139]
27+
28+
- Add ``TimeMOC`` and ``STMOC`` as possible entries in ``MOCServer.query_region`` to
29+
allow temporal and space-time searches [#3139]
30+
31+
- ``return_moc`` now allows to ask for a Time-MOC or a Space-Time MOC rather than only
32+
Space-MOCs [#3139]
33+
34+
- Fix query by MOC that would write a file ``moc.fits`` where the method was executed
35+
in overwriting mode (potentially deleting data if there was a conflicting file) [#3139]
36+
37+
- Returned tables now have a default list of fields instead of the > 130 columns returned
38+
previously. The full list of fields can be displayed with the new method
39+
``MOCServer.list_fields`` [#3139]
40+
41+
- Add ``casesensitive`` parameter in the queries (previously, this was hardcoded
42+
to ``True``) [#3139]
43+
44+
- Add ``spacesys`` parameter to the queries to allow to filter on the different bodies
45+
or frames. The list of available space systems can be printed with the new method
46+
``MOCServer.list_spacesys`` [#3139]
47+
48+
- Add ``query_hips`` method, which is convenient to filter only Hierarchical progressive
49+
surveys [#3139]
50+
2251
simbad
2352
^^^^^^
2453

25-
- Fixed adding a list of fluxes with the deprecated notation
54+
- Fixed adding a list of fluxes with the deprecated notation
2655
``Simbad.add_votable_fields("flux(U)", "flux(J)")`` [#3186]
2756

2857
- Support more of the 0.4.7 votable fields. Raise more significant error messages

astroquery/mocserver/__init__.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2-
"""
3-
CDS MOCServer Query Tool
4-
------------------------
2+
"""CDS MOCServer Query Tool.
3+
----------------------------
54
65
:Author: Matthieu Baumann ([email protected])
76
@@ -13,8 +12,9 @@
1312
Note: If the access to MOCs with the MOCServer tool was helpful for your research,
1413
the following acknowledgment would be appreciated::
1514
16-
This research has made use of the MOCServer, a tool developed at CDS, Strasbourg, France aiming at retrieving
17-
MOCs/meta-data from known data-sets. MOC is an IVOA standard described in the following paper :
15+
This research has made use of the MOCServer, a tool developed at CDS, Strasbourg,
16+
France aiming at retrieving MOCs/meta-data from known data-sets. MOC is an IVOA
17+
standard described in :
1818
http://www.ivoa.net/documents/MOC/20140602/REC-MOC-1.0-20140602.pdf
1919
"""
2020

@@ -24,12 +24,11 @@
2424

2525

2626
class Conf(_config.ConfigNamespace):
27-
"""
28-
Configuration parameters for ``astroquery.template_module``.
29-
"""
27+
"""Configuration parameters for ``astroquery.template_module``."""
3028

3129
server = _config.ConfigItem(
3230
[
31+
"https://alasky.unistra.fr/MocServer/query",
3332
"http://alasky.unistra.fr/MocServer/query",
3433
"http://alaskybis.unistra.fr/MocServer/query",
3534
],
@@ -40,6 +39,16 @@ class Conf(_config.ConfigNamespace):
4039
30, "Time limit for connecting to template_module server."
4140
)
4241

42+
default_fields = [
43+
"ID",
44+
"obs_title",
45+
"obs_description",
46+
"nb_rows",
47+
"obs_regime",
48+
"bib_reference",
49+
"dataproduct_type",
50+
]
51+
4352

4453
conf = Conf()
4554

0 commit comments

Comments
 (0)