Skip to content

Commit 4cf7aa4

Browse files
committed
fix: upstream bug in VOLLT fixed which changes SIMBAD's output
1 parent e538fe4 commit 4cf7aa4

File tree

2 files changed

+22
-30
lines changed

2 files changed

+22
-30
lines changed

astroquery/simbad/tests/test_simbad_remote.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,8 @@ def test_simbad_flux_qual(self):
116116
simbad_instance = Simbad()
117117
simbad_instance.add_votable_fields("flux")
118118
response = simbad_instance.query_object('algol', criteria="filter='V'")
119-
# this is bugged, it should be "flux.qual", see https://github.com/gmantele/vollt/issues/154
120-
# when the issue upstream in vollt (the TAP software used in SIMBAD) is fixed we can rewrite this test
121-
assert "qual" in response.colnames
122-
# replace "filter" by "flux.filter" when upstream bug is fixed
123-
assert response["filter"][0] == "V"
119+
assert "flux.qual" in response.colnames
120+
assert response["flux.filter"][0] == "V"
124121

125122
def test_query_object(self):
126123
self.simbad.ROW_LIMIT = 5

docs/simbad/simbad_evolution.rst

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ See a more elaborated example:
9191
>>> simbad.add_votable_fields("otype", "alltypes")
9292
>>> result = simbad.query_catalog("M", criteria=CriteriaTranslator.parse(old_criteria))
9393
>>> result.sort("catalog_id")
94-
>>> result[["main_id", "catalog_id", "otype", "otypes"]]
94+
>>> result[["main_id", "catalog_id", "otype", "alltypes.otypes"]]
9595
<Table length=11>
96-
main_id catalog_id otype otypes
97-
object object object object
96+
main_id catalog_id otype alltypes.otypes
97+
object object object object
9898
--------- ---------- ------ ----------------------------------------
9999
M 1 M 1 SNR HII|IR|Psr|Rad|SNR|X|gam
100100
M 24 M 24 As* As*|Cl*|GNe
@@ -249,26 +249,23 @@ A query for fluxes would then look like:
249249
However, this quick access does not allow to retrieve the flux error or the bibcode of the
250250
article from which the information is extracted. To do so, prefer the ``flux`` votable field:
251251

252-
.. this will fail when upstream bug https://github.com/gmantele/vollt/issues/154 is fixed.
253-
.. "filter" should be replaced by "flux.filter" and "bibcode" by "flux.bibcode".
254-
255252
.. doctest-remote-data::
256253

257254
>>> from astroquery.simbad import Simbad
258255
>>> simbad = Simbad()
259256
>>> simbad.add_votable_fields("flux")
260257
>>> result = simbad.query_object("BD-16 5701")
261-
>>> result[["main_id", "flux", "flux_err", "filter", "bibcode"]]
258+
>>> result[["main_id", "flux", "flux_err", "flux.filter", "flux.bibcode"]]
262259
<Table length=6>
263-
main_id flux flux_err filter bibcode
264-
object float32 float32 object object
265-
----------- --------- -------- ------ -------------------
266-
BD-16 5701 10.322191 0.002762 G 2020yCat.1350....0G
267-
BD-16 5701 10.6 0.06 V 2000A&A...355L..27H
268-
BD-16 5701 9.205 0.023 J 2003yCat.2246....0C
269-
BD-16 5701 8.879 0.042 H 2003yCat.2246....0C
270-
BD-16 5701 8.777 0.02 K 2003yCat.2246....0C
271-
BD-16 5701 11.15 0.07 B 2000A&A...355L..27H
260+
main_id flux flux_err flux.filter flux.bibcode
261+
object float32 float32 object object
262+
----------- --------- -------- ----------- -------------------
263+
BD-16 5701 10.322191 0.002762 G 2020yCat.1350....0G
264+
BD-16 5701 10.6 0.06 V 2000A&A...355L..27H
265+
BD-16 5701 9.205 0.023 J 2003yCat.2246....0C
266+
BD-16 5701 8.879 0.042 H 2003yCat.2246....0C
267+
BD-16 5701 8.777 0.02 K 2003yCat.2246....0C
268+
BD-16 5701 11.15 0.07 B 2000A&A...355L..27H
272269

273270
This gives more details than the quick view. Each line corresponds to a unique filter.
274271
The ``bibcode`` column corresponds to the article in which the flux information was found.
@@ -280,14 +277,12 @@ We could also add a criteria to restrict the filters in the output:
280277
>>> simbad = Simbad()
281278
>>> simbad.add_votable_fields("flux")
282279
>>> result = simbad.query_object("BD-16 5701", criteria="filter IN ('U', 'B', 'G')")
283-
>>> result[["main_id", "flux", "flux_err", "filter", "bibcode"]]
280+
>>> result[["main_id", "flux", "flux_err", "flux.filter", "flux.bibcode"]]
284281
<Table length=2>
285-
main_id flux flux_err filter bibcode
286-
object float32 float32 object object
287-
----------- --------- -------- ------ -------------------
288-
BD-16 5701 11.15 0.07 B 2000A&A...355L..27H
289-
BD-16 5701 10.322191 0.002762 G 2020yCat.1350....0G
290-
291-
There was no match for ``U``, but the information is there for ``B`` and ``G``.
282+
main_id flux flux_err flux.filter flux.bibcode
283+
object float32 float32 object object
284+
----------- --------- -------- ----------- -------------------
285+
BD-16 5701 11.15 0.07 B 2000A&A...355L..27H
286+
BD-16 5701 10.322191 0.002762 G 2020yCat.1350....0G
292287

293-
.. replace ``bibcode`` by ``flux.bibcode`` here when https://github.com/gmantele/vollt/issues/154 is fixed.
288+
There was no match for ``U``, but the information is there for ``B`` and ``G``.

0 commit comments

Comments
 (0)