Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/astropy/astroquery into hea…
Browse files Browse the repository at this point in the history
…sarc-unit-issue
  • Loading branch information
volodymyrss committed Feb 4, 2022
2 parents 2435084 + 27515e4 commit ee7932c
Show file tree
Hide file tree
Showing 52 changed files with 1,145 additions and 455 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ jobs:
python: 3.x
toxenv: codestyle

- name: docs build
os: ubuntu-latest
python: 3.8
toxenv: build_docs
toxargs: -v

- name: oldest dependencies
os: ubuntu-latest
python: 3.7
Expand All @@ -41,20 +35,20 @@ jobs:

- name: astropy dev with all dependencies with coverage
os: ubuntu-latest
python: 3.9
toxenv: py39-test-alldeps-devastropy-cov
python: '3.10'
toxenv: py310-test-alldeps-devastropy-cov
toxargs: -v

- name: Python 3.7 with all optional dependencies (MacOS X)
- name: Python 3.8 with all optional dependencies (MacOS X)
os: macos-latest
python: 3.7
toxenv: py37-test-alldeps
python: 3.8
toxenv: py38-test-alldeps
toxargs: -v

- name: Python 3.8 with mandatory dependencies (Windows)
- name: Python 3.9 with mandatory dependencies (Windows)
os: windows-latest
python: 3.8
toxenv: py38-test
python: 3.9
toxenv: py39-test
toxargs: -v

steps:
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ python:
path: .
extra_requirements:
- docs
- all_lt_39
- all

sphinx:
fail_on_warning: true
Expand Down
52 changes: 49 additions & 3 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@
0.4.5 (unreleased)
0.4.6 (unreleased)
==================

New Tools and Services
----------------------


Service fixes and enhancements
------------------------------
esa.xmm_newton
^^^^^^^^^^^^^^

- Add option to download proprietary data [#2251]

esa.jwst
^^^^^^^^^^

- Minor fixes, documentation updated. [#2257]

gaia
^^^^

- The ``query_object()`` and ``query_object_async()`` methods of
``astroquery.gaia.Gaia`` no longer ignore their ``columns`` argument when
``radius`` is specified. [#2249]

mast
^^^^

- Adding moving target functionality to ``astroquery.mast.Tesscut`` [#2121]


Infrastructure, Utility and Other Changes and Additions
-------------------------------------------------------




0.4.5 (2021-12-24)
==================

New Tools and Services
Expand All @@ -7,7 +45,7 @@ New Tools and Services
esa.jwst
^^^^^^^^^^

- New module to provide access to eJWST Science Archive metadata and datasets. [#2140, #2238, #2243]
- New module to provide access to eJWST Science Archive metadata and datasets. [#2140, #2238]


Service fixes and enhancements
Expand All @@ -16,7 +54,12 @@ Service fixes and enhancements
eso
^^^

- Add option to retrieve_data from an earlier archive query [#1614]
- Add option to retrieve_data from an earlier archive query. [#1614]

jplhorizons
^^^^^^^^^^^

- Fix result parsing issues by disabling caching of failed queries. [#2253]

sdss
^^^^
Expand All @@ -29,6 +72,9 @@ Infrastructure, Utility and Other Changes and Additions
- Adding ``--alma-site`` pytest option for testing to have a control over
which specific site to test. [#2224]

- The function ``astroquery.utils.download_list_of_fitsfiles()`` has been
deprecated. [#2247]

utils.tap
^^^^^^^^^

Expand Down
16 changes: 16 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ Please see `astropy's contributing guildelines
<http://www.astropy.org/contribute.html>`__ for a general guide to the
workflow involving git, etc. Everything below is astroquery-specific.

We strongly encourage draft pull requests to be opened early in development.
If you are thinking of contributing a new module, please open a pull request
as soon as you start developing code and mark it as a Draft PR on github.


New Features
------------
We welcome any and all new features! If you have your own little query tool
Expand Down Expand Up @@ -55,6 +60,17 @@ method is a wrapper around the `requests.request` function that provides
important astroquery-specific utility, including caching, HTTP header
generation, progressbars, and local writing-to-disk.

Dependencies
------------
New contributions are generally not allowed to bring along additional dependencies.

The astropy ecosystem tools should be used whenever possible.
For example, `astropy.table` should be used for table handling,
or `astropy.units` for unit and quantity
handling.



.. _astroquery API: docs/api.rst
.. _template: docs/template.rst
.. _requests: http://docs.python-requests.org/en/master/
68 changes: 4 additions & 64 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,76 +88,17 @@ Using astroquery
----------------

Importing astroquery on its own doesn't get you much: you need to import each
sub-module specifically. Check out the `docs`_
to find a list of the tools available. The `API`_
shows the standard suite of tools common to most modules, e.g. `query_object`
and `query_region`.
sub-module specifically. See the documentation for a list of `Available
Services <https://astroquery.readthedocs.io/en/latest/#available-services>`_.
The `API`_ shows the standard suite of tools common to most modules, e.g.
`query_object` and `query_region`.

To report bugs and request features, please use the issue tracker. Code
contributions are very welcome, though we encourage you to follow the `API`_
and `contributing guidelines
<https://github.com/astropy/astroquery/blob/main/CONTRIBUTING.rst>`_ as much
as possible.

List of Modules
---------------

The following modules have been completed using a common API:

* `ALMA Archive <http://astroquery.readthedocs.io/en/latest/alma/alma.html>`_
* `Atomic Line List <http://astroquery.readthedocs.io/en/latest/atomic/atomic.html>`_: A collection of more than 900,000 atomic transitions.
* `Besancon <http://astroquery.readthedocs.io/en/latest/besancon/besancon.html>`_: Model of stellar population synthesis in the Galaxy.
* `CDS MOC Service <https://astroquery.readthedocs.io/en/latest/cds/cds.html>`_: A collection of all-sky survey coverage maps.
* `CADC <https://astroquery.readthedocs.io/en/latest/cadc/cadc.html>`_: Canadian Astronomy Data Centre.
* `CASDA <https://astroquery.readthedocs.io/en/latest/casda/casda.html>`_: CSIRO ASKAP Science Data Archive.
* `ESASky <http://astroquery.readthedocs.io/en/latest/esasky/esasky.html>`_: ESASky is a science driven discovery portal providing easy visualizations and full access to the entire sky as observed with ESA Space astronomy missions.
* `ESO Archive <http://astroquery.readthedocs.io/en/latest/eso/eso.html>`_
* `FIRST <http://astroquery.readthedocs.io/en/latest/image_cutouts/first/first.html>`_: Faint Images of the Radio Sky at Twenty-cm. 20-cm radio images of the extragalactic sky from the VLA.
* `Gaia <http://astroquery.readthedocs.io/en/latest/gaia/gaia.html>`_: European Space Agency Gaia Archive.
* `ESA XMM <https://astroquery.readthedocs.io/en/latest/esa/xmm_newton.html>`_: European Space Agency XMM-Newton Science Archive.
* `ESA Hubble <https://astroquery.readthedocs.io/en/latest/esa/hubble.html>`_: European Space Agency Hubble Science Archive.
* `ESA ISO <https://astroquery.readthedocs.io/en/latest/esa/iso.html>`_: European Space Agency ISO Data Archive.
* `GAMA database <http://astroquery.readthedocs.io/en/latest/gama/gama.html>`_
* `Gemini <http://astroquery.readthedocs.io/en/latest/gemini/gemini.html>`_: Gemini Archive.
* `HEASARC <http://astroquery.readthedocs.io/en/latest/heasarc/heasarc.html>`_: NASA's High Energy Astrophysics Science Archive Research Center.
* `IBE <http://astroquery.readthedocs.io/en/latest/ibe/ibe.html>`_: IRSA Image Server program interface (IBE) Query Tool provides access to the 2MASS, WISE, and PTF image archives.
* `IRSA <http://astroquery.readthedocs.io/en/latest/irsa/irsa.html>`_: NASA/IPAC Infrared Science Archive. Science products for all of NASA's infrared and sub-mm missions.
* `IRSA dust <http://astroquery.readthedocs.io/en/latest/irsa/irsa_dust.html>`_: Galactic dust reddening and extinction maps from IRAS 100 um data.
* `MAGPIS <http://astroquery.readthedocs.io/en/latest/magpis/magpis.html>`_: Multi-Array Galactic Plane Imaging Survey. 6 and 20-cm radio images of the Galactic plane from the VLA.
* `MAST <http://astroquery.readthedocs.io/en/latest/mast/mast.html>`_: Barbara A. Mikulski Archive for Space Telescopes.
* `Minor Planet Center <http://astroquery.readthedocs.io/en/latest/mpc/mpc.html>`_
* `NASA ADS <http://astroquery.readthedocs.io/en/latest/nasa_ads/nasa_ads.html>`_: SAO/NASA Astrophysics Data System.
* `NED <http://astroquery.readthedocs.io/en/latest/ned/ned.html>`_: NASA/IPAC Extragalactic Database. Multiwavelength data from both surveys and publications.
* `NIST <http://astroquery.readthedocs.io/en/latest/nist/nist.html>`_: National Institute of Standards and Technology (NIST) atomic lines database.
* `NRAO <http://astroquery.readthedocs.io/en/latest/nrao/nrao.html>`_: Science data archive of the National Radio Astronomy Observatory. VLA, JVLA, VLBA and GBT data products.
* `NVAS archive <http://astroquery.readthedocs.io/en/latest/nvas/nvas.html>`_
* `Simbad <http://astroquery.readthedocs.io/en/latest/simbad/simbad.html>`_: Basic data, cross-identifications, bibliography and measurements for astronomical objects outside the solar system.
* `Skyview <http://astroquery.readthedocs.io/en/latest/skyview/skyview.html>`_: NASA SkyView service for imaging surveys.
* `Splatalogue <http://astroquery.readthedocs.io/en/latest/splatalogue/splatalogue.html>`_: National Radio Astronomy Observatory (NRAO)-maintained (mostly) molecular radio and millimeter line list service.
* `UKIDSS <http://astroquery.readthedocs.io/en/latest/ukidss/ukidss.html>`_: UKIRT Infrared Deep Sky Survey. JHK images of 7500 sq deg. in the northern sky.
* `Vamdc <http://astroquery.readthedocs.io/en/latest/vamdc/vamdc.html>`_: VAMDC molecular line database.
* `Vizier <http://astroquery.readthedocs.io/en/latest/vizier/vizier.html>`_: Set of 11,000+ published, multiwavelength catalogues hosted by the CDS.
* `VO Simple Cone Search <http://astroquery.readthedocs.io/en/latest/vo_conesearch/vo_conesearch.html>`_
* `xMatch <http://astroquery.readthedocs.io/en/latest/xmatch/xmatch.html>`_: Cross-identify sources between very large data sets or between a user-uploaded list and a large catalogue.

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

* `Alfalfa <http://astroquery.readthedocs.io/en/latest/alfalfa/alfalfa.html>`_: Arecibo Legacy Fast ALFA survey; extragalactic HI radio data.
* `CosmoSim <http://astroquery.readthedocs.io/en/latest/cosmosim/cosmosim.html>`_: The CosmoSim database provides results from cosmological simulations performed within different projects: the MultiDark project, the BolshoiP project, and the CLUES project.
* `Exoplanet Orbit Database <http://astroquery.readthedocs.io/en/latest/exoplanet_orbit_database/exoplanet_orbit_database.html>`_
* `Fermi <http://astroquery.readthedocs.io/en/latest/fermi/fermi.html>`_: Fermi gamma-ray telescope archive.
* `HITRAN <http://astroquery.readthedocs.io/en/latest/hitran/hitran.html>`_: Access to the high-resolution transmission molecular absorption database.
* `JPL Horizons <http://astroquery.readthedocs.io/en/latest/jplhorizons/jplhorizons.html>`_: JPL Solar System Dynamics Horizons Service.
* `JPL SBDB <http://astroquery.readthedocs.io/en/latest/jplsbdb/jplsbdb.html>`_: JPL Solar System Dynamics Small-Body Database Browser Service.
* `Lamda <http://astroquery.readthedocs.io/en/latest/lamda/lamda.html>`_: Leiden Atomic and Molecular Database; energy levels, radiative transitions, and collisional rates for astrophysically relevant atoms and molecules.
* `NASA Exoplanet Archive <http://astroquery.readthedocs.io/en/latest/nasa_exoplanet_archive/nasa_exoplanet_archive.html>`_
* `OAC API <http://astroquery.readthedocs.io/en/latest/oac/oac.html>`_: Open Astronomy Catalog REST API Service.
* `Ogle <http://astroquery.readthedocs.io/en/latest/ogle/ogle.html>`_: Optical Gravitational Lensing Experiment III; information on interstellar extinction towards the Galactic bulge.
* `Open Expolanet Catalog (OEC) <http://astroquery.readthedocs.io/en/latest/open_exoplanet_catalogue/open_exoplanet_catalogue.html>`_
* `SDSS <http://astroquery.readthedocs.io/en/latest/sdss/sdss.html>`_: Sloan Digital Sky Survey data, including optical images, spectra, and spectral templates.
* `SHA <http://astroquery.readthedocs.io/en/latest/sha/sha.html>`_: Spitzer Heritage Archive; infrared data products from the Spitzer Space Telescope.


Citing Astroquery
-----------------

Expand Down Expand Up @@ -188,7 +129,6 @@ Maintained by `Adam Ginsburg`_ and `Brigitta Sipocz <https://github.com/bsipocz>
.. _Download Stable ZIP: https://github.com/astropy/astroquery/zipball/stable
.. _Download Stable TAR: https://github.com/astropy/astroquery/tarball/stable
.. _View on Github: https://github.com/astropy/astroquery/
.. _docs: http://astroquery.readthedocs.io
.. _Documentation: http://astroquery.readthedocs.io
.. _[email protected]: mailto:[email protected]
.. _Adam Ginsburg: http://www.adamgginsburg.com
Expand Down
8 changes: 8 additions & 0 deletions astroquery/alma/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from astropy.utils.exceptions import AstropyDeprecationWarning
from astropy import units as u
from astropy.time import Time
from pyvo.dal.sia2 import SIA_PARAMETERS_DESC

from ..exceptions import LoginError
from ..utils import commons
Expand Down Expand Up @@ -397,6 +398,7 @@ def query_sia(self, pos=None, band=None, time=None, pol=None,
Parameters
----------
_SIA2_PARAMETERS
Returns
-------
Expand Down Expand Up @@ -424,6 +426,12 @@ def query_sia(self, pos=None, band=None, time=None, pol=None,
maxrec=maxrec,
**kwargs)

# SIA_PARAMETERS_DESC contains links that Sphinx can't resolve.
for var in ('POLARIZATION_STATES', 'CALIBRATION_LEVELS'):
SIA_PARAMETERS_DESC = SIA_PARAMETERS_DESC.replace(f'`pyvo.dam.obscore.{var}`',
f'pyvo.dam.obscore.{var}')
query_sia.__doc__ = query_sia.__doc__.replace('_SIA2_PARAMETERS', SIA_PARAMETERS_DESC)

def query_tap(self, query, maxrec=None):
"""
Send query to the ALMA TAP. Results in pyvo.dal.TapResult format.
Expand Down
9 changes: 0 additions & 9 deletions astroquery/esa/hubble/tests/test_esa_hubble_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,12 @@
"""
import tempfile

import unittest
import os

import pytest
from astropy.tests.helper import remote_data
from requests.models import Response
from astroquery.esa.hubble import ESAHubble
from astroquery.utils.testing_tools import MockResponse
from astropy import coordinates
from unittest.mock import MagicMock
from astropy.table.table import Table
import shutil
import random
from PIL import Image


esa_hubble = ESAHubble()

Expand Down
11 changes: 0 additions & 11 deletions astroquery/esa/jwst/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,17 +647,6 @@ def login(self, *, user=None, password=None, credentials_file=None,
if token:
self.set_token(token=token)

def login_gui(self, *, verbose=False):
"""Performs a login using a GUI dialog
TAP+ only
Parameters
----------
verbose : bool, optional, default 'False'
flag to display information about the process
"""
return self.__jwsttap.login_gui(verbose)

def logout(self, *, verbose=False):
"""Performs a logout
TAP+ only
Expand Down
3 changes: 2 additions & 1 deletion astroquery/esa/jwst/data_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
"""

from astropy.utils import data
from . import conf

__all__ = ['JwstDataHandler']


class JwstDataHandler:
def __init__(self, base_url=None):
if base_url is None:
self.base_url = "http://jwstdummydata.com"
self.base_url = conf.JWST_DATA_SERVER
else:
self.base_url = base_url

Expand Down
8 changes: 0 additions & 8 deletions astroquery/esa/jwst/tests/test_jwsttap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1002,14 +1002,6 @@ def test_login(self):
tap.login(user='test_user', password='test_password')
dummyTapHandler.check_call('login', parameters)

def test_login_gui(self):
dummyTapHandler = DummyTapHandler()
tap = JwstClass(tap_plus_handler=dummyTapHandler, show_messages=False)
parameters = {}
parameters['verbose'] = False
tap.login_gui()
dummyTapHandler.check_call('login_gui', parameters)

def test_logout(self):
dummyTapHandler = DummyTapHandler()
tap = JwstClass(tap_plus_handler=dummyTapHandler, show_messages=False)
Expand Down
6 changes: 3 additions & 3 deletions astroquery/esa/xmm_newton/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class Conf(_config.ConfigNamespace):
"""
Configuration parameters for `astroquery.esa.xmm_newton`.
"""
DATA_ACTION = _config.ConfigItem("http://nxsa.esac.esa.int/"
DATA_ACTION = _config.ConfigItem("https://nxsa.esac.esa.int/"
"nxsa-sl/servlet/data-action?",
"Main url for retriving XSA files")
DATA_ACTION_AIO = _config.ConfigItem("http://nxsa.esac.esa.int/"
DATA_ACTION_AIO = _config.ConfigItem("https://nxsa.esac.esa.int/"
"nxsa-sl/servlet/data-action-aio?",
"Main url for retriving XSA files")
METADATA_ACTION = _config.ConfigItem("http://nxsa.esac.esa.int/"
METADATA_ACTION = _config.ConfigItem("https://nxsa.esac.esa.int/"
"nxsa-sl/servlet/"
"metadata-action?",
"Main url for retriving XSA metadata")
Expand Down
Loading

0 comments on commit ee7932c

Please sign in to comment.