Simbad Database#

The Simbad database is a very commonly used database of astronomical objects. It is maintained by the CDS (Centre de Données astronomiques de Strasbourg) and is available at http://simbad.u-strasbg.fr/simbad/.

It provides objects identification across multiple catalogs, photometry for several filters and states of the art astrometry. This data comes from several sources, compiled by the CDS.

SourcesCatalog from Simbad#

To generate a SourcesCatalog from any Simbad query, use the SimbadSourcesCatalog class or simply by simbad interfaces. During the instance creation, instead of pass the data itself, you must pass a query center, a search radius and (optionally) the list of photometric band you want to retrieve. The query will be performed and the data will be downloaded and stored in the instance and can be accessed just like any other SourcesCatalog.

In [1]: from astropop.catalogs import simbad

In [2]: simbad_sources = simbad.simbad(center='Sirius', radius='1 arcmin',
   ...:                                band=['g'])
   ...: 

In [3]: simbad_sources.table()
Out[3]: 
<Table length=8>
             id                      ra         ...    g    g_error
                                    deg         ...                
           str28                  float64       ... float32 float32
---------------------------- ------------------ ... ------- -------
                   * alf CMa         101.287155 ...     nan     nan
                 * alf CMa B 101.28876708333333 ...     nan     nan
Gaia DR3 2947050466531872640 101.29146374999999 ...     nan     nan
[TSA98] J064510.77-164237.51 101.29487499999999 ...     nan     nan
[TSA98] J064511.57-164240.56 101.29820833333333 ...     nan     nan
[TSA98] J064511.97-164240.59         101.299875 ...     nan     nan
                [BCL2000]  7 101.29308333333333 ...     nan     nan
[TSA98] J064510.48-164203.49 101.29366666666667 ...     nan     nan
In [4]: simbad_sources = simbad.SimbadSourcesCatalog(center='Sirius',
   ...:                                              radius='1 arcmin',
   ...:                                              band=['B', 'V'])
   ...: 

In [5]: simbad_sources.table()
Out[5]: 
<Table length=8>
             id                      ra         ...    V    V_error
                                    deg         ...                
           str28                  float64       ... float32 float32
---------------------------- ------------------ ... ------- -------
                   * alf CMa         101.287155 ...   -1.46     nan
                 * alf CMa B 101.28876708333333 ...    8.44     nan
Gaia DR3 2947050466531872640 101.29146374999999 ...     nan     nan
[TSA98] J064510.77-164237.51 101.29487499999999 ...     nan     nan
[TSA98] J064511.57-164240.56 101.29820833333333 ...     nan     nan
[TSA98] J064511.97-164240.59         101.299875 ...     nan     nan
                [BCL2000]  7 101.29308333333333 ...     nan     nan
[TSA98] J064510.48-164203.49 101.29366666666667 ...     nan     nan

The default behavior of the catalog is that whe no photometric band is passed, no photometric information will be retrieved. For a list of all available filters, see available_filters property.

Also, additionally to the SourcesCatalog methods, SimbadSourcesCatalog have coordinates_bibcode and magnitudes_bibcode properties that returns the bibcode of the coordinates and photometry data, respectively.

In [6]: simbad_sources.coordinates_bibcode()
Out[6]: 
array(['2007A&A...474..653V', '2020yCat.1350....0G',
       '2020yCat.1350....0G', '1998AJ....115.2587T',
       '1998AJ....115.2587T', '1998AJ....115.2587T',
       '2000A&A...360..991B', '1998AJ....115.2587T'], dtype=object)

In [7]: simbad_sources.magnitudes_bibcode('V')
Out[7]: array(['2002yCat.2237....0D', '', '', '', '', '', '', ''], dtype=object)

The full original query table is accessed using query_table property.

Identifying Sources in Simbad#

The simbad module provides an additional method for identify a source or a list of sources based on their RA and Dec coordinates. This is done using simbad_query_id method.

In [8]: from astropop.catalogs.simbad import simbad_query_id

In [9]: simbad_query_id(101.287155, -16.716115833333333, limit_angle='1 arcsec')
Out[9]: 'alf CMa'

In [10]: simbad_query_id(ra=[101.287155, 101.28876708333333],
   ....:                 dec=[-16.716115833333333, -16.716867777777775],
   ....:                 limit_angle='1 arcsec')
   ....: 
Out[10]: ['alf CMa', 'alf CMa B']

See that a limit_angle must be provided. This is the maximum distance between the coordinates and the object coordinates to be considered a match. If no match is found, an empty string name is returned.

The default behavior is to use the MAIN_ID column as name. But you can choose a priority order to get the name of the star. Example: if you want to get only HD, HYP and TYC names, in this priority order, you can do with name_order parameter:

In [11]: simbad_query_id(101.287155, -16.716115833333333, limit_angle='1 arcsec',
   ....:                 name_order=['HD', 'HYP', 'TYC'])
   ....: 
Out[11]: 'HD 48915'

Warning

This function is vectorized using vectorize. So, each object will get an individual server query. So, even if this method is able to query more than one object, it is very slow and not recomended for high number of sources.

astropop.catalogs.simbad Module#

Query and match objects in Simbad database.

Functions#

simbad_query_id(ra, dec, limit_angle[, ...])

Query name ids for a star in Simbad.

Classes#

SimbadSourcesCatalog(center, radius[, band])

Sources catalog from Simbad plataform.

simbad

alias of SimbadSourcesCatalog