Skip to content

Commit 2915239

Browse files
authored
Merge pull request #3258 from cds-astro/fix-upstream-changes
[SIMBAD] Fix upstream changes
2 parents e538fe4 + b5d419b commit 2915239

File tree

4 files changed

+26
-34
lines changed

4 files changed

+26
-34
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/query_tap.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ some tables, add their name. To get the columns of the tables ``ref`` and ``bibl
142142
table_name column_name datatype ... unit ucd
143143
object object object ... object object
144144
---------- ----------- ----------- ... ------ --------------------
145-
biblio biblio TEXT ... meta.record;meta.bib
145+
biblio biblio VARCHAR ... meta.record;meta.bib
146146
biblio oidref BIGINT ... meta.record;meta.id
147+
ref "year" SMALLINT ... meta.note;meta.bib
147148
ref abstract UNICODECHAR ... meta.record
148149
ref bibcode CHAR ... meta.bib.bibcode
149150
ref doi VARCHAR ... meta.code;meta.bib
@@ -154,7 +155,6 @@ some tables, add their name. To get the columns of the tables ``ref`` and ``bibl
154155
ref page INTEGER ... meta.bib.page
155156
ref title UNICODECHAR ... meta.title
156157
ref volume INTEGER ... meta.bib.volume
157-
ref year SMALLINT ... meta.note;meta.bib
158158

159159
`~astroquery.simbad.SimbadClass.list_columns` can also be called with a keyword argument.
160160
This returns columns from any table for witch the given keyword is either in the table name,

docs/simbad/simbad-er.gv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ graph "Simbad Relational Database" {
22
node [color=lightgray penwidth=6 shape=box style=filled]
33
graph [esep="+0" mode=major overlap=false sep=0 splines=polyline]
44
edge [color=lightgray labelOverlay="100%" penwidth=7]
5-
"Measurement tables" [label="{mesHerschel | mesXmm | mesVelocities | mesVar | mesRot | mesPM | mesPLX | mesIUE | mesISO | mesFe_h | mesDiameter | mesDistance | mesSpT }" fontsize=16 shape=record]
5+
"Measurement tables" [label="{mesHerschel | mesXmm | mesVelocities | mesVar | mesRot | mesPM | mesPLX | mesIUE | mesISO | mesFe_h | mesDiameter | mesDistance | mesSpT | mesOtype }" fontsize=16 shape=record]
66
basic -- "Measurement tables" [color="#9EADC8" tooltip="oid:oidref"]
77
allfluxes [fontsize=16 tooltip="all flux/magnitudes U,B,V,I,J,H,K,u_,g_,r_,i_,z_"]
88
alltypes [fontsize=16 tooltip="all object types concatenated with pipe"]
@@ -38,4 +38,4 @@ graph "Simbad Relational Database" {
3838
ref -- journals [color="#F4B6C2" tooltip="journal:journal"]
3939
alltypes -- basic [color="#FE9599" tooltip="oidref:oid"]
4040
otypes -- basic [color="#FFF196" tooltip="oidref:oid"]
41-
}
41+
}

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)