astro query:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- astroquery v0.4.11 »
- JPL Spectroscopy Queries (astroquery.jplspec) »
- JPLSpecClass

# JPLSpecClass

class astroquery.jplspec.JPLSpecClass

  Bases: `BaseQuery`

  Attributes Summary

  `TIMEOUT` |
  `URL` |

  Methods Summary

  `get_species_table`(*[, catfile]) | A directory of the catalog is found in a file called 'catdir.cat.' Each element of this directory is an 80-character record with the following format:
  `query_lines`(*args, **kwargs) | Queries the service and returns a table object.
  `query_lines_async`(min_frequency, ...[, ...]) | Creates an HTTP POST request based on the desired parameters and returns a response.

  Attributes Documentation

  TIMEOUT = 60
  URL = 'https://spec.jpl.nasa.gov/cgi-bin/catform'

  Methods Documentation

  get_species_table(*, catfile='catdir.cat')

    A directory of the catalog is found in a file called ‘catdir.cat.’ Each element of this directory is an 80-character record with the following format:

    TAG, NAME, NLINE, QLOG, VER
    (I6,X, A13, I6, 7F7.4, I2)
    Parameters:
      catfile str, name of file, default ‘catdir.cat’

        The catalog file, installed locally along with the package

    Returns:
      Table: `Table`
        TAG : The species tag or molecular identifier.
        NAME : An ASCII name for the species.
        NLINE : The number of lines in the catalog.
        QLOG : A seven-element vector containing the base 10 logarithm of the partition function for temperatures of 300 K, 225 K, 150 K, 75 K, 37.5 K, 18.75 K, and 9.375 K, respectively.
        VER : The version of the calculation for this species in the catalog. The version number is followed by * if the entry is newer than the last edition of the catalog.
  query_lines(*args, **kwargs)

    Queries the service and returns a table object.

    Creates an HTTP POST request based on the desired parameters and returns a response.

    Parameters:
      min_frequency `astropy.units`

        Minimum frequency (or any spectral() equivalent)

      max_frequency `astropy.units`

        Maximum frequency (or any spectral() equivalent)

      min_strength int, optional

        Minimum strength in catalog units, the default is -500

      max_lines int, optional

        Maximum number of lines to query, the default is 2000. The most the query allows is 100000

      molecule list, string of regex if parse_name_locally=True, optional

        Identifiers of the molecules to search for. If this parameter is not provided the search will match any species. Default is ‘All’.

      flags int, optional

        Regular expression flags. Default is set to 0

      parse_name_locally bool, optional

        When set to True it allows the method to parse through catdir.cat in order to match the regex inputted in the molecule parameter and request the corresponding tags of the matches instead. Default is set to False

      get_query_payload bool, optional

        When set to `True` the method should return the HTTP request parameters as a dict. Default value is set to False

      cache bool

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

    Returns:
      table A `Table` object.

    Examples

        >>> table = JPLSpec.query_lines(min_frequency=100*u.GHz,
        ...                             max_frequency=200*u.GHz,
        ...                             min_strength=-500, molecule=18003)
        >>> print(table)
            FREQ     ERR    LGINT    DR    ELO    GUP  TAG   QNFMT   QN'      QN"
        ----------- ------ -------- --- --------- --- ------ ----- -------- --------
        115542.5692 0.6588 -13.2595   3 4606.1683  35  18003  1404 17 810 0 18 513 0
         139614.293   0.15  -9.3636   3 3080.1788  87 -18003  1404 14 6 9 0 15 312 0
         177317.068   0.15 -10.3413   3 3437.2774  31 -18003  1404 15 610 0 16 313 0
         183310.087  0.001  -3.6463   3  136.1639   7 -18003  1404  3 1 3 0  2 2 0 0

  query_lines_async(min_frequency, max_frequency, *, min_strength=-500, max_lines=2000, molecule='All', flags=0, parse_name_locally=False, get_query_payload=False, cache=True)

    Creates an HTTP POST request based on the desired parameters and returns a response.

    Parameters:
      min_frequency `astropy.units`

        Minimum frequency (or any spectral() equivalent)

      max_frequency `astropy.units`

        Maximum frequency (or any spectral() equivalent)

      min_strength int, optional

        Minimum strength in catalog units, the default is -500

      max_lines int, optional

        Maximum number of lines to query, the default is 2000. The most the query allows is 100000

      molecule list, string of regex if parse_name_locally=True, optional

        Identifiers of the molecules to search for. If this parameter is not provided the search will match any species. Default is ‘All’.

      flags int, optional

        Regular expression flags. Default is set to 0

      parse_name_locally bool, optional

        When set to True it allows the method to parse through catdir.cat in order to match the regex inputted in the molecule parameter and request the corresponding tags of the matches instead. Default is set to False

      get_query_payload bool, optional

        When set to `True` the method should return the HTTP request parameters as a dict. Default value is set to False

      cache bool

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

    Returns:
      response `requests.Response`

        The HTTP response returned from the service.

    Examples

        >>> table = JPLSpec.query_lines(min_frequency=100*u.GHz,
        ...                             max_frequency=200*u.GHz,
        ...                             min_strength=-500, molecule=18003)
        >>> print(table)
            FREQ     ERR    LGINT    DR    ELO    GUP  TAG   QNFMT   QN'      QN"
        ----------- ------ -------- --- --------- --- ------ ----- -------- --------
        115542.5692 0.6588 -13.2595   3 4606.1683  35  18003  1404 17 810 0 18 513 0
         139614.293   0.15  -9.3636   3 3080.1788  87 -18003  1404 14 6 9 0 15 312 0
         177317.068   0.15 -10.3413   3 3437.2774  31 -18003  1404 15 610 0 16 313 0
         183310.087  0.001  -3.6463   3  136.1639   7 -18003  1404  3 1 3 0  2 2 0 0