<commit_before>.. doctest-skip-all

Astroquery
==========

This is the documentation for the Astroquery affiliated package of astropy_.

Code and issue tracker are on `GitHub <https://github.com/astropy/astroquery>`_.

Introduction
------------

Astroquery is a set of tools for querying astronomical web forms and databases.

There are two other packages with complimentary functionality as Astroquery:
`astropy.vo <http://docs.astropy.org/en/latest/vo/index.html>`_ is in the Astropy core and
`pyvo <https://pyvo.readthedocs.org/en/latest/>`_ is an Astropy affiliated package.
They are more oriented to general `virtual observatory <http://www.virtualobservatory.org>`_
discovery and queries, whereas Astroquery has web service specific interfaces.

Check out the :doc:`gallery` for some nice examples.

Installation
------------
Astroquery must be installed from source:

.. code-block:: bash

    $ git clone git@github.com:astropy/astroquery.git
    $ cd astroquery
    $ python setup.py install

pip install also works:

.. code-block:: bash

    $ pip install git+http://github.com/astropy/astroquery.git#egg=astroquery

Requirements
````````````

The following packages are required for astroquery installation & use:

* `numpy <http://www.numpy.org>`_
* astropy_ (v>=0.3)
* `requests <http://docs.python-requests.org/en/latest/>`_
* `keyring <https://pypi.python.org/pypi/keyring>`_ (required only for the
  `~astroquery.eso` module)

Using astroquery
----------------

All astroquery modules are supposed to follow the same API.  In its simplest form, the API involves
queries based on coordinates or object names.  Some simple examples, using SIMBAD:

.. code-block:: python

    >>> from astroquery.simbad import Simbad
    >>> result_table = Simbad.query_object("m1")
    >>> result_table.pprint(show_unit=True)
    MAIN_ID      RA         DEC     RA_PREC ... COO_QUAL COO_WAVELENGTH     COO_BIBCODE
              "h:m:s"     "d:m:s"           ...
    ------- ----------- ----------- ------- ... -------- -------------- -------------------
      M   1 05 34 31.94 +22 00 52.2       6 ...        C              R 2011A&A...533A..10L



All query tools allow coordinate-based queries:

.. code-block:: python

    >>> from astropy import coordinates
    >>> import astropy.units as u
    >>> # works only for ICRS coordinates:
    >>> c = coordinate.SkyFrame("05h35m17.3s -05h23m28s", frame='icrs')
    >>> r = 5 * u.arcminute
    >>> result_table = Simbad.query_region(c, radius=r)
    >>> result_table.pprint(show_unit=True)
       MAIN_ID           RA           DEC      ... COO_QUAL COO_WAVELENGTH     COO_BIBCODE
                      "h:m:s"       "d:m:s"    ...
    -------------- ------------- ------------- ... -------- -------------- -------------------
         HD  38875 05 34 59.7297 -80 51 09.082 ...        A              O 2007A&A...474..653V
    TYC 9390-799-1 05 33 58.2222 -80 50 18.575 ...        B                1998A&A...335L..65H


For additional guidance and examples, read the documentation for the individual services below.

Available Services
------------------

If you're new to Astroquery, a good place to start is the :doc:`gallery`:

.. toctree::
  :maxdepth: 1

  gallery

The following modules have been completed using a common API:

.. toctree::
  :maxdepth: 1

  simbad/simbad.rst
  vizier/vizier.rst
  irsa/irsa_dust.rst
  ned/ned.rst
  splatalogue/splatalogue.rst
  irsa/irsa.rst
  ukidss/ukidss.rst
  magpis/magpis.rst
  nrao/nrao.rst
  besancon/besancon.rst
  nist/nist.rst
  nvas/nvas.rst
  gama/gama.rst
  eso/eso.rst

These others are functional, but do not follow a common & consistent API:

.. toctree::
  :maxdepth: 1

  fermi/fermi.rst
  sdss/sdss.rst
  alfalfa/alfalfa.rst
  sha/sha.rst
  lamda/lamda.rst
  ogle/ogle.rst
  open_exoplanet_catalogue/open_exoplanet_catalogue.rst

Catalog, Archive, and Other
---------------------------

A second index of the services by the type of data they serve.  Some services
perform many tasks and are listed more than once.

Catalogs
~~~~~~~~

The first serve catalogs, which generally return one row of information for
each source (though they may return many catalogs that *each* have one row
for each source)

.. toctree::
  :maxdepth: 1

  alfalfa/alfalfa.rst
  gama/gama.rst
  irsa/irsa.rst
  irsa/irsa_dust.rst
  ned/ned.rst
  ogle/ogle.rst
  open_exoplanet_catalogue/open_exoplanet_catalogue.rst
  sdss/sdss.rst
  sha/sha.rst
  simbad/simbad.rst
  ukidss/ukidss.rst
  vizier/vizier.rst

Archives
~~~~~~~~

Archive services provide data, usually in FITS images or spectra.  They will
generally return a table listing the available data first.

.. toctree::
  :maxdepth: 1

  alfalfa/alfalfa.rst
  eso/eso.rst
  fermi/fermi.rst
  irsa/irsa.rst
  magpis/magpis.rst
  ned/ned.rst
  nrao/nrao.rst
  nvas/nvas.rst
  sdss/sdss.rst
  sha/sha.rst
  ukidss/ukidss.rst

Simulations
~~~~~~~~~~~

Simulation services query databases of simulated or synthetic data

.. toctree::
  :maxdepth: 1

  besancon/besancon.rst

Other
~~~~~

There are other astronomically significant services, e.g. line list and
atomic/molecular cross section and collision rate services, that don't fit the
above categories.  

.. toctree::
  :maxdepth: 1

  lamda/lamda.rst
  nist/nist.rst
  splatalogue/splatalogue.rst


Developer documentation
-----------------------

The modules and their maintainers are listed on the
`Maintainers <https://github.com/astropy/astroquery/wiki/Maintainers>`_
wiki page.


The :doc:`api` is intended to be kept as consistent as possible, such
that any web service can be used with a minimal learning curve imposed on the
user.

.. toctree::
   :maxdepth: 1
<commit_msg>docs: title level consistency<commit_after>.. doctest-skip-all

Astroquery
==========

This is the documentation for the Astroquery affiliated package of astropy_.

Code and issue tracker are on `GitHub <https://github.com/astropy/astroquery>`_.

Introduction
------------

Astroquery is a set of tools for querying astronomical web forms and databases.

There are two other packages with complimentary functionality as Astroquery:
`astropy.vo <http://docs.astropy.org/en/latest/vo/index.html>`_ is in the Astropy core and
`pyvo <https://pyvo.readthedocs.org/en/latest/>`_ is an Astropy affiliated package.
They are more oriented to general `virtual observatory <http://www.virtualobservatory.org>`_
discovery and queries, whereas Astroquery has web service specific interfaces.

Check out the :doc:`gallery` for some nice examples.

Installation
------------
Astroquery must be installed from source:

.. code-block:: bash

    $ git clone <EMAIL>.com:astropy/astroquery.git
    $ cd astroquery
    $ python setup.py install

pip install also works:

.. code-block:: bash

    $ pip install git+http://github.com/astropy/astroquery.git#egg=astroquery

Requirements
````````````

The following packages are required for astroquery installation & use:

* `numpy <http://www.numpy.org>`_
* astropy_ (v>=0.3)
* `requests <http://docs.python-requests.org/en/latest/>`_
* `keyring <https://pypi.python.org/pypi/keyring>`_ (required only for the
  `~astroquery.eso` module)

Using astroquery
----------------

All astroquery modules are supposed to follow the same API.  In its simplest form, the API involves
queries based on coordinates or object names.  Some simple examples, using SIMBAD:

.. code-block:: python

    >>> from astroquery.simbad import Simbad
    >>> result_table = Simbad.query_object("m1")
    >>> result_table.pprint(show_unit=True)
    MAIN_ID      RA         DEC     RA_PREC ... COO_QUAL COO_WAVELENGTH     COO_BIBCODE
              "h:m:s"     "d:m:s"           ...
    ------- ----------- ----------- ------- ... -------- -------------- -------------------
      M   1 05 34 31.94 +22 00 52.2       6 ...        C              R 2011A&A...533A..10L



All query tools allow coordinate-based queries:

.. code-block:: python

    >>> from astropy import coordinates
    >>> import astropy.units as u
    >>> # works only for ICRS coordinates:
    >>> c = coordinate.SkyFrame("05h35m17.3s -05h23m28s", frame='icrs')
    >>> r = 5 * u.arcminute
    >>> result_table = Simbad.query_region(c, radius=r)
    >>> result_table.pprint(show_unit=True)
       MAIN_ID           RA           DEC      ... COO_QUAL COO_WAVELENGTH     COO_BIBCODE
                      "h:m:s"       "d:m:s"    ...
    -------------- ------------- ------------- ... -------- -------------- -------------------
         HD  38875 05 34 59.7297 -80 51 09.082 ...        A              O 2007A&A...474..653V
    TYC 9390-799-1 05 33 58.2222 -80 50 18.575 ...        B                1998A&A...335L..65H


For additional guidance and examples, read the documentation for the individual services below.

Available Services
==================

If you're new to Astroquery, a good place to start is the :doc:`gallery`:

.. toctree::
  :maxdepth: 1

  gallery

The following modules have been completed using a common API:

.. toctree::
  :maxdepth: 1

  simbad/simbad.rst
  vizier/vizier.rst
  irsa/irsa_dust.rst
  ned/ned.rst
  splatalogue/splatalogue.rst
  irsa/irsa.rst
  ukidss/ukidss.rst
  magpis/magpis.rst
  nrao/nrao.rst
  besancon/besancon.rst
  nist/nist.rst
  nvas/nvas.rst
  gama/gama.rst
  eso/eso.rst

These others are functional, but do not follow a common & consistent API:

.. toctree::
  :maxdepth: 1

  fermi/fermi.rst
  sdss/sdss.rst
  alfalfa/alfalfa.rst
  sha/sha.rst
  lamda/lamda.rst
  ogle/ogle.rst
  open_exoplanet_catalogue/open_exoplanet_catalogue.rst

Catalog, Archive, and Other
===========================

A second index of the services by the type of data they serve.  Some services
perform many tasks and are listed more than once.

Catalogs
--------

The first serve catalogs, which generally return one row of information for
each source (though they may return many catalogs that *each* have one row
for each source)

.. toctree::
  :maxdepth: 1

  alfalfa/alfalfa.rst
  gama/gama.rst
  irsa/irsa.rst
  irsa/irsa_dust.rst
  ned/ned.rst
  ogle/ogle.rst
  open_exoplanet_catalogue/open_exoplanet_catalogue.rst
  sdss/sdss.rst
  sha/sha.rst
  simbad/simbad.rst
  ukidss/ukidss.rst
  vizier/vizier.rst

Archives
--------

Archive services provide data, usually in FITS images or spectra.  They will
generally return a table listing the available data first.

.. toctree::
  :maxdepth: 1

  alfalfa/alfalfa.rst
  eso/eso.rst
  fermi/fermi.rst
  irsa/irsa.rst
  magpis/magpis.rst
  ned/ned.rst
  nrao/nrao.rst
  nvas/nvas.rst
  sdss/sdss.rst
  sha/sha.rst
  ukidss/ukidss.rst

Simulations
-----------

Simulation services query databases of simulated or synthetic data

.. toctree::
  :maxdepth: 1

  besancon/besancon.rst

Other
-----

There are other astronomically significant services, e.g. line list and
atomic/molecular cross section and collision rate services, that don't fit the
above categories.  

.. toctree::
  :maxdepth: 1

  lamda/lamda.rst
  nist/nist.rst
  splatalogue/splatalogue.rst


Developer documentation
-----------------------

The modules and their maintainers are listed on the
`Maintainers <https://github.com/astropy/astroquery/wiki/Maintainers>`_
wiki page.


The :doc:`api` is intended to be kept as consistent as possible, such
that any web service can be used with a minimal learning curve imposed on the
user.

.. toctree::
   :maxdepth: 1

{'fraction_non_alphanumeric': 0.14450409222916483, 'fraction_numerical': 0.021297192642787996, 'mean_word_length': 2.5434985968194574, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 82, 'https://': 8, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '176159', 'n_tokens_mistral': 4085, 'n_tokens_neox': 3660, 'n_words': 1081}