Aller au contenu

omnilab/simbad Référence de l’API

Étage
Fournisseur · Omnilab
Version
1.x
Suite de conformité
non branchée
Vérifié en réel
Son README ne le dit pas
Licence
MIT
composer require omnilab/simbad:1.x-dev

Lue dans les fichiers PHP du paquet au commit 1e4d5398d109 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.

Omnilab\Simbad

  • SimbadSource class

    SIMBAD, the CDS's database of astronomical objects beyond the solar system, through its TAP service (simbad.cds.unistra.fr/simbad/sim-tap), in ADQL: an object by any of its identifiers ("M31", "Betelgeuse", "HD 39801", "alf Ori" - SIMBAD resolves them); its main identifier, type, ICRS coordinates, proper motion, parallax, radial velocity and redshift, spectral and morphological types, magnitudes, and its other designations - its Gaia DR3 one among its identifiers, which omnilab/gaia reads; a search by identifier or by name.

    5 methods · 2 constants

  • SimbadSourceFactory class

    SIMBAD: astronomical objects beyond the solar system by any of their identifiers, their type, position, motion, magnitudes and designations - no key needed.

    3 options

Omnilab\Simbad

SimbadSource class

final class SimbadSource extends HttpSource SimbadSource.php:37

SIMBAD, the CDS's database of astronomical objects beyond the solar system, through its TAP service (simbad.cds.unistra.fr/simbad/sim-tap), in ADQL: an object by any of its identifiers ("M31", "Betelgeuse", "HD 39801", "alf Ori" - SIMBAD resolves them); its main identifier, type, ICRS coordinates, proper motion, parallax, radial velocity and redshift, spectral and morphological types, magnitudes, and its other designations - its Gaia DR3 one among its identifiers, which omnilab/gaia reads; a search by identifier or by name.

TAP rather than the script interface: one ADQL query joins the object, its identifiers, its magnitudes and its type's description, and the answer is JSON with typed columns, where a script answers text to parse.

No key, no account. One call per entity, one per search page. SIMBAD blacklists a client that sends more than about five to ten queries a second: the calls are spaced by 0.2 s by default.

const BASE_URI = 'https://simbad.cds.unistra.fr/simbad/sim-tap/'
const MAX_MATCHES = 200

The most objects a search reads (ADQL 2.0 has no OFFSET: the pages are cut from them).

SimbadSource::__construct()

public function __construct(HttpClientInterface $http, readonly int $synonyms = 50, string $baseUri = self::BASE_URI, array $headers = [], float $throttle = 0.2)
$synonyms

how many other designations to keep (0: none)

SimbadSource::getName()

public function getName(): string

SimbadSource::capabilities()

public function capabilities(): array

SimbadSource::entity()

public function entity(Identifier|string $id): ?Entity

An object by any identifier SIMBAD knows it under; the string is SIMBAD's to resolve.

public function search(Query $query): Page

The objects an identifier names (SIMBAD resolves it, case and spaces as they come) and those with a name that holds the text ("andromeda": M 31, Andromeda I, II, III...): the one the identifier names first, then the most cited. SIMBAD matches names in their own case: the text is tried as written and with each word capitalised.

SimbadSourceFactory class

final class SimbadSourceFactory extends SourceFactory SimbadSourceFactory.php:21

SIMBAD: astronomical objects beyond the solar system by any of their identifiers, their type, position, motion, magnitudes and designations - no key needed.

options: mailto: 'support@glitchr.io' # in the User-Agent: whom the CDS writes to before it blocks a caller synonyms: 50 # how many other designations to keep (0: none) throttle: 0.2 # seconds between two calls: SIMBAD blacklists beyond about 5 to 10 queries a second base_uri: 'https://simbad.cds.unistra.fr/simbad/sim-tap/' # or a mirror's TAP service

Options

OptionDefault
synonyms50
throttle0.2
base_uriSimbadSource::BASE_URI