astro query:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- astroquery v0.4.11 »
- Solar System Services (`astroquery.solarsystem`) »
- SBDBClass

# SBDBClass

class astroquery.solarsystem.SBDBClass

  Bases: `BaseQuery`

  A class for querying the JPL Small-Body Database Browser service.

  Methods Summary

  `query`(*args, **kwargs) | Queries the service and returns a table object.
  `query_async`(targetid, *[, id_type, ...]) | This method queries the JPL Small-Body Database Browser and returns an `OrderedDict` with all queried information.
  `schematic`(d, *[, _prepend]) | Formats the provided dictionary `d` into a human-readable tree structure schematic.

  Methods Documentation

  query(*args, **kwargs)

    Queries the service and returns a table object.

    This method queries the JPL Small-Body Database Browser and returns an `OrderedDict` with all queried information.

    Parameters:
      targetid: str

        Target identifier or search string (if `id_type='search'`)

      id_type: str, optional

        Defines the type of identifier provided through `targetid`: `'search'` for a search string (designations, numbers, and names in varius forms, including MPC packed form and case-insensitive names; wildcard character `'*'` is allowed), `'spk'` for a spice kernel id, or `'desig'` for an object designation. Default value: `'search'`

      neo_only: boolean, optional

        If `True`, only output for Near-Earth Objects (NEOs) is returned. Default value: `False`.

      alternate_id: boolean, optional

        Return alternate identifiers (designations and Spice kernel ids) if `True`. Default: `False`

      full_precision: boolean, optional

        Provide results using full precision. Default: `False`

      solution_epoch: boolean, optional

        Output orbit data at the JPL orbit-solution epoch instead of the standard MPC epoch. Default: `False`

      covariance: str or ``None``, optional

        Output the orbital covariance (if available) in the full matrix form when `mat`, in the upper-triangular vector-stored form when `vec`, or in the upper-triangular vector-stored square-root form when `src`; provide no covariance when `None`. Default: `None`

      validity: boolean, optional

        Provide the validity ranges of the orbital elements as Julian Dates. Default: `False`

      alternate_orbit: boolean, optional

        Provide alternate orbits, if available. Default: `False`

      phys: boolean, optional

        Provide physical property information, if available. Default: `False`

      close_approach: boolean, optional

        Output information on close approaches with the major planets. Default: `False`

      radar: boolean, optional

        Provide information on radar observations of the target. Default: `False`

      virtual_impactor: boolean, optional

        Provide information on a potential virtual impactor nature of the target from the JPL Sentry system. Default: `False`

      discovery: boolean, optional

        Output discovery circumstances and IAU name citation data. Default: `False`

      get_query_payload: bool, optional

        This should default to `False`. When set to `True` the method should return the HTTP request parameters as a dict.

      get_raw_response boolean, optional

        Return raw data as obtained by JPL SBDB without parsing the data. Default: `False`

      get_uri boolean, optional

        Add the query URI to the output as `query_uri` field. Default: `False`

      cache bool

        Defaults to True. If set overrides global caching behavior. See caching documentation.

    Returns:
      table A `Table` object.

    Examples

        >>> from astroquery.jplsbdb import SBDB
        >>> sbdb = SBDB.query('3552')
        >>> print(sbdb)
        OrderedDict([('object', OrderedDict([('shortname', '3552 Don Quixote'), ('neo', True), ... ])

  query_async(targetid, *, id_type='search', neo_only=False, alternate_id=False, full_precision=False, solution_epoch=False, covariance=None, validity=False, alternate_orbit=False, phys=False, close_approach=False, radar=False, virtual_impactor=False, discovery=False, get_query_payload=False, get_raw_response=False, get_uri=False, cache=True)

    This method queries the JPL Small-Body Database Browser and returns an `OrderedDict` with all queried information.

    Parameters:
      targetid: str

        Target identifier or search string (if `id_type='search'`)

      id_type: str, optional

        Defines the type of identifier provided through `targetid`: `'search'` for a search string (designations, numbers, and names in varius forms, including MPC packed form and case-insensitive names; wildcard character `'*'` is allowed), `'spk'` for a spice kernel id, or `'desig'` for an object designation. Default value: `'search'`

      neo_only: boolean, optional

        If `True`, only output for Near-Earth Objects (NEOs) is returned. Default value: `False`.

      alternate_id: boolean, optional

        Return alternate identifiers (designations and Spice kernel ids) if `True`. Default: `False`

      full_precision: boolean, optional

        Provide results using full precision. Default: `False`

      solution_epoch: boolean, optional

        Output orbit data at the JPL orbit-solution epoch instead of the standard MPC epoch. Default: `False`

      covariance: str or ``None``, optional

        Output the orbital covariance (if available) in the full matrix form when `mat`, in the upper-triangular vector-stored form when `vec`, or in the upper-triangular vector-stored square-root form when `src`; provide no covariance when `None`. Default: `None`

      validity: boolean, optional

        Provide the validity ranges of the orbital elements as Julian Dates. Default: `False`

      alternate_orbit: boolean, optional

        Provide alternate orbits, if available. Default: `False`

      phys: boolean, optional

        Provide physical property information, if available. Default: `False`

      close_approach: boolean, optional

        Output information on close approaches with the major planets. Default: `False`

      radar: boolean, optional

        Provide information on radar observations of the target. Default: `False`

      virtual_impactor: boolean, optional

        Provide information on a potential virtual impactor nature of the target from the JPL Sentry system. Default: `False`

      discovery: boolean, optional

        Output discovery circumstances and IAU name citation data. Default: `False`

      get_query_payload: bool, optional

        This should default to `False`. When set to `True` the method should return the HTTP request parameters as a dict.

      get_raw_response boolean, optional

        Return raw data as obtained by JPL SBDB without parsing the data. Default: `False`

      get_uri boolean, optional

        Add the query URI to the output as `query_uri` field. Default: `False`

      cache bool

        Defaults to True. If set overrides global caching behavior. See caching documentation.

    Returns:
      res `OrderedDict`

        A dictionary holding all the parsed data.

    Examples

        >>> from astroquery.jplsbdb import SBDB
        >>> sbdb = SBDB.query('3552')
        >>> print(sbdb)
        OrderedDict([('object', OrderedDict([('shortname', '3552 Don Quixote'), ('neo', True), ... ])

  schematic(d, *, _prepend='+--')

    Formats the provided dictionary `d` into a human-readable tree structure schematic. In order to display the structure properly, the resulting `outstring` should be passed to the `print` function.

    Parameters:
      d dict, optional

        Input dictionary that is to be formatted .

      _prepend str

        for internal use only

    Returns:
      outstring str

        The formatted string based on `d`.

    Notes

    All non-ASCII unicode characters are removed from `outstring`.

    Examples

        >>> from astroquery.jplsbdb import SBDB
        >>> sbdb = SBDB.query(3552)
        >>> print(SBDB.schematic(sbdb))
        +-+ object:
        | +-- shortname: 3552 Don Quixote
        | +-- neo: True
        | +-+ orbit_class:
        | | +-- name: Amor
        ...
        | +-- pe_used: DE431
        | +-- last_obs: 2018-07-05
        | +-- moid: 0.334 AU
        | +-- n_dop_obs_used: None