Repository navigation
Archive SIMBAD
CDS astronomical database: basic data, cross-identifications, bibliography and measurements for objects outside the solar system.
-
Module name:
simbad -
Python class:
astroquery.simbad.Simbad - Functions: 20
Call any function below with the astroquery_execute MCP tool. Descriptions are taken from the upstream astroquery/astropy docstrings.
| Function | Summary |
|---|---|
add_votable_fields |
Add columns to the output of a SIMBAD query. |
clear_cache |
Clear the cache of SIMBAD. |
get_field_description |
Displays a description of the VOTable field. |
get_votable_fields |
Display votable fields. |
list_columns |
Get the list of SIMBAD columns. |
list_linked_tables |
Expose the tables that can be non-obviously linked with the given table. |
list_tables |
List the names and descriptions of the tables in SIMBAD. |
list_votable_fields |
List all options to add columns to SIMBAD's output. |
list_wildcards |
Displays the available wildcards that may be used in SIMBAD queries and |
query_bibcode |
Query the references corresponding to a given bibcode. |
query_bibobj |
Query all the objects mentioned in an article. |
query_catalog |
Query a whole catalog. |
query_criteria |
Deprecated: v0.4.8 |
query_hierarchy |
Query either the parents or the children of the object. |
query_object |
Query SIMBAD for the given object. |
query_objectids |
Query SIMBAD with an object name. |
query_objects |
Query SIMBAD for the specified list of objects. |
query_region |
Query SIMBAD in a cone around the specified coordinates. |
query_tap |
Query SIMBAD TAP service. |
reset_votable_fields |
Reset the output of the query_*** methods to default. |
Add columns to the output of a SIMBAD query.
Simbad.add_votable_fields(*args)Call via MCP
astroquery_execute(
module_name="simbad",
function_name="add_votable_fields",
params={},
)The list of possible arguments and their description for this method
can be printed with list_votable_fields.
The methods affected by this:
-
query_object, -
query_objects, -
query_region, -
query_catalog, -
query_hierarchy, -
query_bibobj, -
query_criteria.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
*args |
str | The arguments to be added. |
Examples
>>> from astroquery.simbad import Simbad
>>> simbad = Simbad()
>>> simbad.add_votable_fields('sp_type', 'sp_qual', 'sp_bibcode')
>>> simbad.get_votable_fields()
['basic.main_id', 'basic.ra', 'basic.dec', 'basic.coo_err_maj', 'basic.coo_err_min', ...Clear the cache of SIMBAD.
Simbad.clear_cache()Call via MCP
astroquery_execute(
module_name="simbad",
function_name="clear_cache",
params={},
)Parameters
No parameters.
Displays a description of the VOTable field.
Simbad.get_field_description(field_name)Call via MCP
astroquery_execute(
module_name="simbad",
function_name="get_field_description",
params={"field_name": "<field_name>"},
)This can be replaced by the output of list_votable_fields.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
field_name (required)
|
Examples
>>> from astroquery.simbad import Simbad
>>> options = Simbad.list_votable_fields()
>>> description_dimensions = options[options["name"] == "dimensions"]["description"]
>>> description_dimensions.data.data[0]
'all fields related to object dimensions'Display votable fields.
Simbad.get_votable_fields()Call via MCP
astroquery_execute(
module_name="simbad",
function_name="get_votable_fields",
params={},
)Parameters
No parameters.
Get the list of SIMBAD columns.
Simbad.list_columns(*tables: str, keyword=None, get_query_payload=False)Call via MCP
astroquery_execute(
module_name="simbad",
function_name="list_columns",
params={},
)Add tables names to restrict to some tables. Call the function without any parameter to get all columns names from all tables. The keyword argument looks for columns in the selected SIMBAD tables that contain the given keyword. The keyword search is not case-sensitive.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
*tables |
str | ||
keyword |
str | None |
A keyword to look for in column names, table names, or descriptions. |
get_query_payload |
bool | False |
When set to True the method returns the HTTP request parameters without querying SIMBAD. The ADQL string is in the 'QUERY' key of the payload. Defaults to False. |
Returns
Table —
Examples
>>> from astroquery.simbad import Simbad
>>> Simbad.list_columns("ids", "ident")
<Table length=4>
table_name column_name datatype ... unit ucd
object object object ... object object
---------- ----------- -------- ... ------ -----------
ident id VARCHAR ... meta.id
ident oidref BIGINT ... meta.record
ids ids VARCHAR ... meta.id
ids oidref BIGINT ... meta.record
>>> from astroquery.simbad import Simbad
>>> Simbad.list_columns(keyword="filter")
<Table length=5>
table_name column_name datatype ... unit ucd
object object object ... object object
----------- ----------- ----------- ... ------ ---------------------------
filter description UNICODECHAR ... meta.note;instr.filter
filter filtername VARCHAR ... instr.bandpass;instr.filter
filter unit VARCHAR ... meta.unit
flux filter VARCHAR ... instr.bandpass;instr.filter
mesDiameter filter CHAR ... instr.bandpass;instr.filter
>>> from astroquery.simbad import Simbad
>>> Simbad.list_columns("basic", keyword="object")
<Table length=4>
table_name column_name datatype ... unit ucd
object object object ... object object
---------- ----------- -------- ... ------ -----------------
basic main_id VARCHAR ... meta.id;meta.main
basic otype_txt VARCHAR ... src.class
basic oid BIGINT ... meta.record
basic otype VARCHAR ... src.classExpose the tables that can be non-obviously linked with the given table.
Simbad.list_linked_tables(table: str, *, get_query_payload=False)Call via MCP
astroquery_execute(
module_name="simbad",
function_name="list_linked_tables",
params={"table": "<table>"},
)This list contains only the links where the column names are not the same in the
two tables. For example every oidref column of any table can be joined with
any other oidref. The same goes for every otype column even if this is not
returned by this method.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
table (required)
|
str | One of SIMBAD's tables name | |
get_query_payload |
bool | False |
When set to True the method returns the HTTP request parameters without querying SIMBAD. The ADQL string is in the 'QUERY' key of the payload. Defaults to False. |
Returns
Table — The information necessary to join the given table to an other.
Examples
>>> from astroquery.simbad import Simbad
>>> Simbad.list_linked_tables("otypes")
<Table length=2>
from_table from_column target_table target_column
object object object object
---------- ----------- ------------ -------------
otypedef otype otypes otype
otypes oidref basic oidList the names and descriptions of the tables in SIMBAD.
Simbad.list_tables(*, get_query_payload=False)Call via MCP
astroquery_execute(
module_name="simbad",
function_name="list_tables",
params={},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
get_query_payload |
bool | False |
When set to True the method returns the HTTP request parameters without querying SIMBAD. The ADQL string is in the 'QUERY' key of the payload. Defaults to False. |
Returns
Table —
List all options to add columns to SIMBAD's output.
Simbad.list_votable_fields()Call via MCP
astroquery_execute(
module_name="simbad",
function_name="list_votable_fields",
params={},
)They are of four types:
- "column of basic": a column of the basic table. There fields can also be explored with
list_columns. - "table": a table other than basic that has a declared direct join
- "bundle of basic columns": a pre-selected bundle of columns of basic. Ex: "parallax" will add all columns relevant to parallax
- "filter name": an optical filter name
Parameters
No parameters.
Examples
>>> from astroquery.simbad import Simbad
>>> options = Simbad.list_votable_fields()
>>> # to print only the available bundles of columns
>>> options[options["type"] == "bundle of basic columns"][["name", "description"]]
<Table length=8>
name description
object object
------------- ----------------------------------------------------
coordinates all fields related with coordinates
dim major and minor axis, angle and inclination
dimensions all fields related to object dimensions
morphtype all fields related to the morphological type
parallax all fields related to parallaxes
propermotions all fields related with the proper motions
sp all fields related with the spectral type
velocity all fields related with radial velocity and redshiftDisplays the available wildcards that may be used in SIMBAD queries and
Simbad.list_wildcards()Call via MCP
astroquery_execute(
module_name="simbad",
function_name="list_wildcards",
params={},
)their usage.
Parameters
No parameters.
Examples
>>> from astroquery.simbad import Simbad
>>> Simbad.list_wildcards()
*: Any string of characters (including an empty one)
?: Any character (exactly one character)
[abc]: Exactly one character taken in the list. Can also be defined by a range of characters: [A-Z]
[^0-9]: Any (one) character not in the list.Query the references corresponding to a given bibcode.
Simbad.query_bibcode(bibcode, *, wildcard=False, abstract=False, criteria=None, get_query_payload=False, async_job=False, verbose=None, cache=None)Call via MCP
astroquery_execute(
module_name="simbad",
function_name="query_bibcode",
params={"bibcode": "<bibcode>"},
)Wildcards may be used to specify bibcodes.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
bibcode (required)
|
str | The bibcode of the article to be queried | |
wildcard |
bool, defaults to False | False |
When it is set to True it implies that the object is specified with wildcards. |
abstract |
bool, defaults to False | False |
When this is set to True, the abstract of the article is also included to the result. |
criteria |
str | None |
Criteria to be applied to the query. These should be written in the ADQL syntax in a single string. See example. |
get_query_payload |
bool | False |
When set to True the method returns the HTTP request parameters without querying SIMBAD. The ADQL string is in the 'QUERY' key of the payload. Defaults to False. |
async_job |
bool | False |
When set to True, the query will be executed in asynchronous mode. This is better for very long queries, as it prevents transient failures to abort the query execution. Defaults to False. |
verbose |
None |
||
cache |
None |
Returns
Table — Query results table
Examples
>>> from astroquery.simbad import Simbad
>>> simbad = Simbad()
>>> simbad.ROW_LIMIT = 5
>>> simbad.query_bibcode("2016PhRvL.*", wildcard=True,
... criteria="title LIKE '%gravitational wave%coalescence.'")
<Table length=1>
bibcode doi journal ... volume year
object object object ... int32 int16
------------------- ------------------------------ ------- ... ------ -----
2016PhRvL.116x1103A 10.1103/PhysRevLett.116.241103 PhRvL ... 116 2016Query all the objects mentioned in an article.
Simbad.query_bibobj(bibcode, *, criteria=None, get_query_payload=False, async_job=False, verbose=False)Call via MCP
astroquery_execute(
module_name="simbad",
function_name="query_bibobj",
params={"bibcode": "<bibcode>"},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
bibcode (required)
|
str | the bibcode of the article | |
criteria |
None |
||
get_query_payload |
bool | False |
When set to True the method returns the HTTP request parameters without querying SIMBAD. The ADQL string is in the 'QUERY' key of the payload. Defaults to False. |
async_job |
bool | False |
When set to True, the query will be executed in asynchronous mode. This is better for very long queries, as it prevents transient failures to abort the query execution. Defaults to False. |
verbose |
False |
Returns
Table — Query results table
Query a whole catalog.
Simbad.query_catalog(catalog, *, criteria=None, get_query_payload=False, async_job=False, verbose=False, cache=True)Call via MCP
astroquery_execute(
module_name="simbad",
function_name="query_catalog",
params={"catalog": "<catalog>"},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
catalog (required)
|
str | The name of the catalog. This is case-dependant. | |
criteria |
str | None |
Criteria to be applied to the query. These should be written in the ADQL syntax in a single string. See example. |
get_query_payload |
bool | False |
When set to True the method returns the HTTP request parameters without querying SIMBAD. The ADQL string is in the 'QUERY' key of the payload. Defaults to False. |
async_job |
bool | False |
When set to True, the query will be executed in asynchronous mode. This is better for very long queries, as it prevents transient failures to abort the query execution. Defaults to False. |
verbose |
False |
||
cache |
True |
Returns
Table — The result of the query to SIMBAD.
Examples
>>> from astroquery.simbad import Simbad
>>> simbad = Simbad()
>>> simbad.ROW_LIMIT = 5
>>> simbad.query_catalog("GSC", criteria="pmra > 50 and pmra < 100")
<Table length=5>
main_id ra ... coo_bibcode catalog_id
deg ...
object float64 ... object object
--------------- --------------- ... ------------------- ---------------
HD 26053 61.84326890626 ... 2020yCat.1350....0G GSC 04725-00973
TYC 8454-1081-1 345.11163189562 ... 2020yCat.1350....0G GSC 08454-01081
HD 10158 24.86286094434 ... 2020yCat.1350....0G GSC 00624-00340
CD-22 1862 73.17988827324 ... 2020yCat.1350....0G GSC 05911-00222
BD+02 4434 327.90220788982 ... 2020yCat.1350....0G GSC 00548-00194Notes
Catalogs can be very large. Configuring SimbadClass.ROW_LIMIT allows to
restrict the output.
No description in upstream docstring.
Simbad.query_criteria(*args, get_query_payload=False, **kwargs)Call via MCP
astroquery_execute(
module_name="simbad",
function_name="query_criteria",
params={},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
*args |
String arguments passed directly to SIMBAD's script (e.g., 'region(box, GAL, 10.5 -10.5, 0.5d 0.5d)') | ||
get_query_payload |
bool | False |
When set to True the method returns the HTTP request parameters without querying SIMBAD. The ADQL string is in the 'QUERY' key of the payload. Defaults to False. |
**kwargs |
Keyword / value pairs passed to SIMBAD's script engine (e.g., {'otype'='SNR'} will be rendered as otype=SNR) |
Returns
Table — Query results table
Examples
Can be replaced by the `criteria` argument that was added in the
other query_*** methods
>>> from astroquery.simbad import Simbad
>>> Simbad(ROW_LIMIT=5).query_region('M1', '2d', criteria="otype='G..'")
<Table length=5>
main_id ra ... coo_wavelength coo_bibcode
deg ...
object float64 ... str1 object
------------ ----------------- ... -------------- -------------------
LEDA 136099 85.48166666666667 ... 1996A&AS..117....1S
LEDA 136047 83.66958333333332 ... 1996A&AS..117....1S
LEDA 136057 84.64499999999998 ... 1996A&AS..117....1S
LEDA 1630996 83.99208333333333 ... O 2003A&A...412...45P
2MFGC 4574 84.37534166666669 ... I 2006AJ....131.1163S
Or by custom-written ADQL queries
>>> from astroquery.simbad import Simbad
>>> Simbad.query_tap("SELECT TOP 5 main_id, sp_type"
... " FROM basic WHERE sp_type < 'F3'")
<Table length=5>
main_id sp_type
object object
----------- -------
HD 24033B (A)
HD 70218B (A)
HD 128284B (A/F)
CD-34 5319 (A/F)
HD 80593 (A0)VQuery either the parents or the children of the object.
Simbad.query_hierarchy(name, hierarchy, *, detailed_hierarchy=True, criteria=None, get_query_payload=False, async_job=False)Call via MCP
astroquery_execute(
module_name="simbad",
function_name="query_hierarchy",
params={"name": "<name>", "hierarchy": "<hierarchy>"},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
name (required)
|
str | name of the object | |
hierarchy (required)
|
str | Can take the values "parents" to return the parents of the object (ex: a galaxy cluster is a parent of a galaxy), the value "children" to return the children of an object (ex: stars can be children of a globular cluster), or the value "siblings" to return the object that share a parent with the given one (ex: the stars of an open cluster are all siblings). | |
detailed_hierarchy |
bool | True |
Whether to add the two extra columns 'hierarchy_bibcode' that gives the article in which the hierarchy link is mentioned, and 'membership_certainty'. membership_certainty is an integer that reflects the certainty of the hierarchy link according to the authors. Ranges between 0 and 100 where 100 means that the authors were certain of the classification. Defaults to False. |
criteria |
str | None |
Criteria to be applied to the query. These should be written in the ADQL syntax in a single string. See example. |
get_query_payload |
bool | False |
When set to True the method returns the HTTP request parameters without querying SIMBAD. The ADQL string is in the 'QUERY' key of the payload. Defaults to False. |
async_job |
bool | False |
When set to True, the query will be executed in asynchronous mode. This is better for very long queries, as it prevents transient failures to abort the query execution. Defaults to False. |
Returns
Table — Query results table
Examples
>>> from astroquery.simbad import Simbad
>>> parent = Simbad.query_hierarchy("2MASS J18511048-0615470",
... detailed_hierarchy=False,
... hierarchy="parents")
>>> parent[["main_id", "ra", "dec"]]
<Table length=1>
main_id ra dec
deg deg
object float64 float64
--------- ------- -------
NGC 6705 282.766 -6.272Query SIMBAD for the given object.
Simbad.query_object(object_name, *, wildcard=False, criteria=None, get_query_payload=False, async_job=False, verbose=False)Call via MCP
astroquery_execute(
module_name="simbad",
function_name="query_object",
params={"object_name": "<object_name>"},
)Object names may also be specified with wildcards. See examples below.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
object_name (required)
|
str | name of object to be queried. | |
wildcard |
boolean | False |
When it is set to True it implies that the object is specified with wildcards. This parameter will render the query case-sensitive. Defaults to False. |
criteria |
str | None |
Criteria to be applied to the query. These should be written in the ADQL syntax in a single string. See example. |
get_query_payload |
bool | False |
When set to True the method returns the HTTP request parameters without querying SIMBAD. The ADQL string is in the 'QUERY' key of the payload. Defaults to False. |
async_job |
bool | False |
When set to True, the query will be executed in asynchronous mode. This is better for very long queries, as it prevents transient failures to abort the query execution. Defaults to False. |
verbose |
False |
Returns
Table — The result of the query to SIMBAD.
Examples
Get the dimensions of a specific galaxy
>>> from astroquery.simbad import Simbad
>>> simbad = Simbad()
>>> simbad.add_votable_fields("dim")
>>> result = simbad.query_object("m101")
>>> result["main_id", "ra", "dec", "galdim_majaxis", "galdim_minaxis", "galdim_bibcode"]
<Table length=1>
main_id ra dec ... galdim_minaxis galdim_bibcode
deg deg ... arcmin
object float64 float64 ... float32 object
------- ------------------ -------- ... -------------- -------------------
M 101 210.80242916666668 54.34875 ... 20.89 2003A&A...412...45P
Get 5 NGC objects that are clusters of stars
>>> from astroquery.simbad import Simbad
>>> simbad = Simbad()
>>> simbad.ROW_LIMIT = 5
>>> ngc_clusters = simbad.query_object("NGC*", wildcard=True, criteria="otype='Cl*..'")
>>> ngc_clusters
<Table length=5>
main_id ra ... coo_bibcode matched_id
deg ...
object float64 ... object object
--------- ----------------- ... ------------------- ----------
NGC 2024 85.42916666666667 ... 2003A&A...397..177B NGC 2024
NGC 1826 76.39174999999999 ... 2011AJ....142...48W NGC 1826
NGC 2121 87.05495833333332 ... 2011AJ....142...48W NGC 2121
NGC 2019 82.98533333333333 ... 1999AcA....49..521P NGC 2019
NGC 1777 73.95 ... 2008MNRAS.389..678B NGC 1777Query SIMBAD with an object name.
Simbad.query_objectids(object_name, *, criteria=None, get_query_payload=False, async_job=False, verbose=None, cache=None)Call via MCP
astroquery_execute(
module_name="simbad",
function_name="query_objectids",
params={"object_name": "<object_name>"},
)This returns a table of all names associated with that object.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
object_name (required)
|
str | name of object to be queried | |
criteria |
str | None |
an additional criteria to constrain the result. As the output of this method has only one column, these criteria can only be imposed on the column ident.id. |
get_query_payload |
bool | False |
When set to True the method returns the HTTP request parameters without querying SIMBAD. The ADQL string is in the 'QUERY' key of the payload. Defaults to False. |
async_job |
bool | False |
When set to True, the query will be executed in asynchronous mode. This is better for very long queries, as it prevents transient failures to abort the query execution. Defaults to False. |
verbose |
None |
||
cache |
None |
Returns
Table — The result of the query to SIMBAD.
Examples
Get all the names of the Bubble Nebula
>>> from astroquery.simbad import Simbad
>>> Simbad.query_objectids("bubble nebula")
<Table length=8>
id
object
------------------------------
[ABB2014] WISE G112.212+00.229
LBN 548
NGC 7635
SH 2-162
[KC97c] G112.2+00.2b
[L89b] 112.237+00.226
GRS G112.22 +00.22
NAME Bubble Nebula
Get the NGC name of M101
>>> from astroquery.simbad import Simbad
>>> Simbad.query_objectids("m101", criteria="ident.id LIKE 'NGC%'")
<Table length=1>
id
object
---------
NGC 5457Query SIMBAD for the specified list of objects.
Simbad.query_objects(object_names, *, wildcard=False, criteria=None, get_query_payload=False, async_job=False, verbose=False, cache=False)Call via MCP
astroquery_execute(
module_name="simbad",
function_name="query_objects",
params={"object_names": "<object_names>"},
)Object names may be specified with wildcards.
If one of the object_names is not found in SIMBAD, the corresponding line is
returned empty in the output (see Giga Cluster in the example).
In the output, the column user_specified_id is the input object name.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
object_names (required)
|
sequence of strs | names of objects to be queried | |
wildcard |
boolean | False |
When True, the names may have wildcards in them. Defaults to False. |
criteria |
str | None |
Criteria to be applied to the query. These should be written in the ADQL syntax in a single string. See example. |
get_query_payload |
bool | False |
When set to True the method returns the HTTP request parameters without querying SIMBAD. The ADQL string is in the 'QUERY' key of the payload. Defaults to False. |
async_job |
bool | False |
When set to True, the query will be executed in asynchronous mode. This is better for very long queries, as it prevents transient failures to abort the query execution. Defaults to False. |
verbose |
False |
||
cache |
False |
Returns
Table — The result of the query to SIMBAD.
Examples
>>> from astroquery.simbad import Simbad
>>> clusters = Simbad.query_objects(["Boss Great Wall", "Great Attractor",
... "Giga Cluster", "Coma Supercluster"])
>>> clusters[["main_id", "ra", "dec", "user_specified_id"]]
<Table length=4>
main_id ra dec user_specified_id
deg deg
object float64 float64 object
---------------------- ------- ------- -----------------
NAME Boss Great Wall 163.0 52.0 Boss Great Wall
NAME Great Attractor 158.0 -46.0 Great Attractor
-- -- Giga Cluster
NAME Coma Supercluster 170.75 23.9 Coma SuperclusterQuery SIMBAD in a cone around the specified coordinates.
Simbad.query_region(coordinates, radius=<Quantity 2. arcmin>, *, criteria=None, get_query_payload=False, async_job=False, equinox=None, epoch=None, cache=None)Call via MCP
astroquery_execute(
module_name="simbad",
function_name="query_region",
params={"coordinates": "<coordinates>"},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
coordinates (required)
|
str or astropy.coordinates object |
The identifier or coordinates around which to query. | |
radius |
str or Quantity
|
<Quantity 2. arcmin> |
the radius of the region. Defaults to 2 arcmin. |
criteria |
str | None |
Criteria to be applied to the query. These should be written in the ADQL syntax in a single string. |
get_query_payload |
bool | False |
When set to True the method returns the HTTP request parameters without querying SIMBAD. The ADQL string is in the 'QUERY' key of the payload. Defaults to False. |
async_job |
bool | False |
When set to True, the query will be executed in asynchronous mode. This is better for very long queries, as it prevents transient failures to abort the query execution. Defaults to False. |
equinox |
None |
||
epoch |
None |
||
cache |
None |
Returns
Table — The result of the query to SIMBAD.
Examples
Look for largest galaxies in two cones
>>> from astroquery.simbad import Simbad
>>> from astropy.coordinates import SkyCoord
>>> simbad = Simbad()
>>> simbad.ROW_LIMIT = 5
>>> simbad.add_votable_fields("otype", "dim")
>>> coordinates = SkyCoord([SkyCoord(186.6, 12.7, unit=("deg", "deg")),
... SkyCoord(170.75, 23.9, unit=("deg", "deg"))])
>>> result = simbad.query_region(coordinates, radius="2d5m",
... criteria="otype = 'Galaxy..' AND galdim_majaxis>8.5")
>>> result.sort("galdim_majaxis", reverse=True)
>>> result["main_id", "otype", "galdim_majaxis"]
<Table length=5>
main_id otype galdim_majaxis
arcmin
object object float32
------------ ------ --------------
LEDA 41362 GiC 11.0
M 86 GiG 10.47
LEDA 40917 AG? 10.3
M 87 AGN 9.12
NGC 4438 LIN 8.91Notes
It is very inefficient to call this within a loop. Creating an SkyCoord
object with a list of coordinates will be way faster.
Query SIMBAD TAP service.
Simbad.query_tap(query: str, *, maxrec=10000, async_job=False, get_query_payload=False, **uploads)Call via MCP
astroquery_execute(
module_name="simbad",
function_name="query_tap",
params={"query": "<query>"},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
query (required)
|
str | A string containing the query written in the Astronomical Data Query Language (ADQL). | |
maxrec |
int, default: 10000 | 10000 |
The number of records to be returned. Its maximum value is given by hardlimit. |
async_job |
bool | False |
When set to True, the query will be executed in asynchronous mode. This is better for very long queries, as it prevents transient failures to abort the query execution. Defaults to False. |
get_query_payload |
bool, default=False | False |
When set to True the method returns the HTTP request parameters without querying SIMBAD. The ADQL string is in the 'QUERY' key of the payload. |
**uploads |
Table | VOTableFile | DALResults
|
Any number of local tables to be used in the query. In the query, these tables are referred as TAP_UPLOAD.table_alias where TAP_UPLOAD is imposed and table_alias is the keyword name you chose. The maximum number of lines for the uploaded tables is 200000. |
Returns
Table — The response returned by Simbad.
Notes
A TAP (Table Access Protocol) service allows to query data tables with queries written in ADQL (Astronomical Data Query Language), a flavor of the more general SQL (Structured Query Language). For more documentation about writing ADQL queries, you can read its official documentation (ADQL documentation) or the Simbad ADQL cheat sheet. See also: a graphic representation of Simbad's tables and their relations.
See Also
list_tables : The list of SIMBAD's tables. list_columns : SIMBAD's columns list, can be restricted to some tables and some keyword. list_linked_tables : Given a table, expose non-obvious possible joins with other tables.
Examples
To see the five oldest papers referenced in SIMBAD
>>> from astroquery.simbad import Simbad
>>> Simbad.query_tap("SELECT top 5 bibcode, title "
... "FROM ref ORDER BY bibcode")
<Table length=5>
bibcode ...
object ...
------------------- ...
1850CDT..1784..227M ...
1857AN.....45...89S ...
1861MNRAS..21...68B ...
1874MNRAS..34...75S ...
1877AN.....89...13W ...
Get the type for a list of objects
>>> from astroquery.simbad import Simbad
>>> Simbad.query_tap("SELECT main_id, otype"
... " FROM basic WHERE main_id IN ('m10', 'm13')")
<Table length=2>
main_id otype
object object
------- ------
M 10 GlC
M 13 GlC
Upload a table to use in a query
>>> from astroquery.simbad import Simbad
>>> from astropy.table import Table
>>> letters_table = Table([["a", "b", "c"]], names=["alphabet"])
>>> Simbad.query_tap("SELECT TAP_UPLOAD.my_table_name.* from TAP_UPLOAD.my_table_name",
... my_table_name=letters_table)
<Table length=3>
alphabet
str1
--------
a
b
cReset the output of the query_*** methods to default.
Simbad.reset_votable_fields()Call via MCP
astroquery_execute(
module_name="simbad",
function_name="reset_votable_fields",
params={},
)They will be included in the output of the following methods:
-
query_object, -
query_objects, -
query_region, -
query_catalog, -
query_hierarchy, -
query_bibobj, -
query_criteria.
Parameters
No parameters.
Auto-generated from source docstrings on each release. Do not edit here — changes are overwritten.