diff --git a/CHANGES.rst b/CHANGES.rst index 16ebe881f4..f27a3fcd45 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -78,6 +78,13 @@ esasky - Added support for eROSITA downloads. [#3111] +eso +^^^ + +- Deprecate functions ``list_surveys`` and ``query_surveys`` in favor of ``list_collections`` and ``query_collections``. [#3138] + +- Use TAP backend instead of WDB. [#3141] + gaia ^^^^ diff --git a/astroquery/eso/core.py b/astroquery/eso/core.py index 421e6fd81a..2188aff646 100644 --- a/astroquery/eso/core.py +++ b/astroquery/eso/core.py @@ -1,53 +1,53 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst +""" +===================== +ESO Astroquery Module +===================== + +European Southern Observatory (ESO) + +""" import base64 import email import json import os.path +import pickle import re import shutil import subprocess import time import warnings -import webbrowser import xml.etree.ElementTree as ET -from io import BytesIO -from typing import List, Optional, Tuple, Dict, Set +from typing import List, Optional, Tuple, Dict, Set, Union +from dataclasses import dataclass +from datetime import datetime, timezone, timedelta +import astropy.table import astropy.utils.data +import astropy.units as u import keyring import requests.exceptions from astropy.table import Table, Column -from astropy.utils.decorators import deprecated_renamed_argument +from astropy.utils.decorators import deprecated, deprecated_renamed_argument from bs4 import BeautifulSoup +import pyvo -from astroquery import log +from astroquery import log, cache_conf from . import conf from ..exceptions import RemoteServiceError, NoResultsWarning, LoginError from ..query import QueryWithLogin from ..utils import schema +from .utils import py2adql, _split_str_as_list_of_str, \ + adql_sanitize_val, to_cache, eso_hash, are_coords_valid __doctest_skip__ = ['EsoClass.*'] -def _check_response(content): - """ - Check the response from an ESO service query for various types of error - - If all is OK, return True - """ - if b"NETWORKPROBLEM" in content: - raise RemoteServiceError("The query resulted in a network " - "problem; the service may be offline.") - elif b"# No data returned !" not in content: - return True - - class CalSelectorError(Exception): """ Raised on failure to parse CalSelector's response. """ - pass class AuthInfo: @@ -67,6 +67,22 @@ def expired(self) -> bool: return time.time() > self.expiration_time - 600 +@dataclass +class QueryOnField: + table_name: str + column_name: str + + +QueryOnInstrument = QueryOnField( + table_name="dbo.raw", # This should be ist. + column_name="instrument") + + +QueryOnCollection = QueryOnField( + table_name="ivoa.ObsCore", + column_name="obs_collection") + + class EsoClass(QueryWithLogin): ROW_LIMIT = conf.row_limit USERNAME = conf.username @@ -75,155 +91,87 @@ class EsoClass(QueryWithLogin): DOWNLOAD_URL = "https://dataportal.eso.org/dataPortal/file/" AUTH_URL = "https://www.eso.org/sso/oidc/token" GUNZIP = "gunzip" + USE_DEV_TAP = True - def __init__(self): + def __init__(self, timeout=None): super().__init__() - self._instrument_list = None - self._survey_list = None + self._instruments: Optional[List[str]] = None + self._collections: Optional[List[str]] = None self._auth_info: Optional[AuthInfo] = None + self.timeout = timeout + self._hash = None + # for future debugging + self._payload = None - def _activate_form(self, response, *, form_index=0, form_id=None, inputs={}, - cache=True, method=None): - """ - Parameters - ---------- - method: None or str - Can be used to override the form-specified method - """ - # Extract form from response - root = BeautifulSoup(response.content, 'html5lib') - if form_id is None: - form = root.find_all('form')[form_index] - else: - form = root.find_all('form', id=form_id)[form_index] - # Construct base url - form_action = form.get('action') - if "://" in form_action: - url = form_action - elif form_action.startswith('/'): - url = '/'.join(response.url.split('/', 3)[:3]) + form_action - else: - url = response.url.rsplit('/', 1)[0] + '/' + form_action - # Identify payload format - fmt = None - form_method = form.get('method').lower() - if form_method == 'get': - fmt = 'get' # get(url, params=payload) - elif form_method == 'post': - if 'enctype' in form.attrs: - if form.attrs['enctype'] == 'multipart/form-data': - fmt = 'multipart/form-data' # post(url, files=payload) - elif form.attrs['enctype'] == 'application/x-www-form-urlencoded': - fmt = 'application/x-www-form-urlencoded' # post(url, data=payload) - else: - raise Exception("enctype={0} is not supported!".format(form.attrs['enctype'])) - else: - fmt = 'application/x-www-form-urlencoded' # post(url, data=payload) - # Extract payload from form - payload = [] - for form_elem in form.find_all(['input', 'select', 'textarea']): - value = None - is_file = False - tag_name = form_elem.name - key = form_elem.get('name') - if tag_name == 'input': - is_file = (form_elem.get('type') == 'file') - value = form_elem.get('value') - if form_elem.get('type') in ['checkbox', 'radio']: - if form_elem.has_attr('checked'): - if not value: - value = 'on' - else: - value = None - elif tag_name == 'select': - if form_elem.get('multiple') is not None: - value = [] - if form_elem.select('option[value]'): - for option in form_elem.select('option[value]'): - if option.get('selected') is not None: - value.append(option.get('value')) - else: - for option in form_elem.select('option'): - if option.get('selected') is not None: - # bs4 NavigableString types have bad, - # undesirable properties that result - # in recursion errors when caching - value.append(str(option.string)) - else: - if form_elem.select('option[value]'): - for option in form_elem.select('option[value]'): - if option.get('selected') is not None: - value = option.get('value') - # select the first option field if none is selected - if value is None: - value = form_elem.select( - 'option[value]')[0].get('value') - else: - # survey form just uses text, not value - for option in form_elem.select('option'): - if option.get('selected') is not None: - value = str(option.string) - # select the first option field if none is selected - if value is None: - value = str(form_elem.select('option')[0].string) - - if key in inputs: - if isinstance(inputs[key], list): - # list input is accepted (for array uploads) - value = inputs[key] - else: - value = str(inputs[key]) - - if (key is not None): # and (value is not None): - if fmt == 'multipart/form-data': - if is_file: - payload.append( - (key, ('', '', 'application/octet-stream'))) - else: - if type(value) is list: - for v in value: - entry = (key, ('', v)) - # Prevent redundant key, value pairs - # (can happen if the form repeats them) - if entry not in payload: - payload.append(entry) - elif value is None: - entry = (key, ('', '')) - if entry not in payload: - payload.append(entry) - else: - entry = (key, ('', value)) - if entry not in payload: - payload.append(entry) - else: - if type(value) is list: - for v in value: - entry = (key, v) - if entry not in payload: - payload.append(entry) - else: - entry = (key, value) - if entry not in payload: - payload.append(entry) + @property + def timeout(self): + return self._timeout - # for future debugging - self._payload = payload - log.debug("Form: payload={0}".format(payload)) + # The logging module needs strings + # written in %s style. This wrappers + # are used for that purpose. + # [W1203 - logging-fstring-interpolation] + @staticmethod + def log_info(message): + "Wrapper for logging function" + log.info(message) - if method is not None: - fmt = method + @staticmethod + def log_warning(message): + "Wrapper for logging function" + log.warning(message) - log.debug("Method/format = {0}".format(fmt)) + @staticmethod + def log_error(message): + "Wrapper for logging function" + log.error(message) - # Send payload - if fmt == 'get': - response = self._request("GET", url, params=payload, cache=cache) - elif fmt == 'multipart/form-data': - response = self._request("POST", url, files=payload, cache=cache) - elif fmt == 'application/x-www-form-urlencoded': - response = self._request("POST", url, data=payload, cache=cache) + @staticmethod + def log_debug(message): + "Wrapper for logging function" + log.debug(message) + + @timeout.setter + def timeout(self, value): + if hasattr(value, 'to'): + self._timeout = value.to(u.s).value + else: + self._timeout = value - return response + @staticmethod + def tap_url() -> str: + url = "http://archive.eso.org/tap_obs" + if EsoClass.USE_DEV_TAP: + url = "http://dfidev5.hq.eso.org:8123/tap_obs" + return url + + def request_file(self, query_str: str): + h = eso_hash(query_str=query_str, url=self.tap_url()) + fn = self.cache_location.joinpath(h + ".pickle") + return fn + + def from_cache(self, query_str, cache_timeout): + table_file = self.request_file(query_str) + try: + if cache_timeout is None: + expired = False + else: + current_time = datetime.now(timezone.utc) + cache_time = datetime.fromtimestamp(table_file.stat().st_mtime, timezone.utc) + expired = current_time-cache_time > timedelta(seconds=cache_timeout) + if not expired: + with open(table_file, "rb") as f: + cached_table = pickle.load(f) + if not isinstance(cached_table, Table): + cached_table = None + else: + self.log_debug(f"Cache expired for {table_file} ...") + cached_table = None + except FileNotFoundError: + cached_table = None + if cached_table: + self.log_debug(f"Retrieved data from {table_file} ...") + return cached_table def _authenticate(self, *, username: str, password: str) -> bool: """ @@ -236,15 +184,15 @@ def _authenticate(self, *, username: str, password: str) -> bool: "client_secret": "clientSecret", "username": username, "password": password} - log.info(f"Authenticating {username} on 'www.eso.org' ...") + self.log_info(f"Authenticating {username} on 'www.eso.org' ...") response = self._request('GET', self.AUTH_URL, params=url_params) if response.status_code == 200: token = json.loads(response.content)['id_token'] self._auth_info = AuthInfo(username=username, password=password, token=token) - log.info("Authentication successful!") + self.log_info("Authentication successful!") return True else: - log.error("Authentication failed!") + self.log_error("Authentication failed!") return False def _get_auth_info(self, username: str, *, store_password: bool = False, @@ -271,8 +219,8 @@ def _get_auth_info(self, username: str, *, store_password: bool = False, return username, password - def _login(self, *, username: str = None, store_password: bool = False, - reenter_password: bool = False) -> bool: + def _login(self, *args, username: str = None, store_password: bool = False, + reenter_password: bool = False, **kwargs) -> bool: """ Login to the ESO User Portal. @@ -297,7 +245,7 @@ def _login(self, *, username: str = None, store_password: bool = False, def _get_auth_header(self) -> Dict[str, str]: if self._auth_info and self._auth_info.expired(): - log.info("Authentication token has expired! Re-authenticating ...") + self.log_info("Authentication token has expired! Re-authenticating ...") self._authenticate(username=self._auth_info.username, password=self._auth_info.password) if self._auth_info and not self._auth_info.expired(): @@ -305,7 +253,47 @@ def _get_auth_header(self) -> Dict[str, str]: else: return {} - def list_instruments(self, *, cache=True): + def query_tap_service(self, + query_str: str, + cache: Optional[bool] = None) -> Optional[astropy.table.Table]: + """ + returns an astropy.table.Table from an adql query string + Example use: + eso._query_tap_service("Select * from ivoa.ObsCore") + """ + if cache is None: # Global caching not overridden + cache = cache_conf.cache_active + + tap = pyvo.dal.TAPService(EsoClass.tap_url()) + table_to_return = None + + try: + if not cache: + with cache_conf.set_temp("cache_active", False): + table_to_return = tap.search(query_str).to_table() + else: + table_to_return = self.from_cache(query_str, cache_conf.cache_timeout) + if not table_to_return: + table_to_return = tap.search(query_str).to_table() + to_cache(table_to_return, self.request_file(query_str=query_str)) + + except pyvo.dal.exceptions.DALQueryError as e: + raise pyvo.dal.exceptions.DALQueryError(f"\n\n\ + Error executing the following query:\n\n{query_str}\n\n\ + See examples here: http://archive.eso.org/tap_obs/examples\n\n") from e + except Exception as e: + raise RuntimeError(f"\n\n\ + Unknown exception {e} while executing the\ + following query: \n\n{query_str}\n\n\ + See examples here: http://archive.eso.org/tap_obs/examples\n\n") from e + + if len(table_to_return) < 1: + warnings.warn("Query returned no results", NoResultsWarning) + return None + + return table_to_return + + def list_instruments(self, *, cache=True) -> List[str]: """ List all the available instrument-specific queries offered by the ESO archive. Returns @@ -316,117 +304,66 @@ def list_instruments(self, *, cache=True): See :ref:`caching documentation `. """ - if self._instrument_list is None: - url = "http://archive.eso.org/cms/eso-data/instrument-specific-query-forms.html" - instrument_list_response = self._request("GET", url, cache=cache) - root = BeautifulSoup(instrument_list_response.content, 'html5lib') - self._instrument_list = [] - for element in root.select("div[id=col3] a[href]"): - href = element.attrs["href"] - if u"http://archive.eso.org/wdb/wdb/eso" in href: - instrument = href.split("/")[-2] - if instrument not in self._instrument_list: - self._instrument_list.append(instrument) - return self._instrument_list - - def list_surveys(self, *, cache=True): - """ List all the available surveys (phase 3) in the ESO archive. + if self._instruments is None: + self._instruments = [] + query_str = ("select table_name from TAP_SCHEMA.tables " + "where schema_name='ist' order by table_name") + res = self.query_tap_service(query_str, cache=cache)["table_name"].data + self._instruments = list(map(lambda x: x.split(".")[1], res)) + return self._instruments + + def list_collections(self, *, cache=True) -> List[str]: + """ List all the available collections (phase 3) in the ESO archive. Returns ------- - survey_list : list of strings + collection_list : list of strings cache : bool Defaults to True. If set overrides global caching behavior. See :ref:`caching documentation `. """ - if self._survey_list is None: - survey_list_response = self._request( - "GET", "http://archive.eso.org/wdb/wdb/adp/phase3_main/form", - cache=cache) - root = BeautifulSoup(survey_list_response.content, 'html5lib') - self._survey_list = [] - collections_table = root.find('table', id='collections_table') - other_collections = root.find('select', id='collection_name_option') - # it is possible to have empty collections or other collections... - collection_elts = (collections_table.find_all('input', type='checkbox') - if collections_table is not None - else []) - other_elts = (other_collections.find_all('option') - if other_collections is not None - else []) - for element in (collection_elts + other_elts): - if 'value' in element.attrs: - survey = element.attrs['value'] - if survey and survey not in self._survey_list and 'Any' not in survey: - self._survey_list.append(survey) - return self._survey_list - - def query_surveys(self, *, surveys='', cache=True, - help=False, open_form=False, **kwargs): - """ - Query survey Phase 3 data contained in the ESO archive. + if self._collections is None: + self._collections = [] + c = QueryOnCollection.column_name + t = QueryOnCollection.table_name + query_str = f"select distinct {c} from {t}" + res = self.query_tap_service(query_str, cache=cache)[c].data - Parameters - ---------- - survey : string or list - Name of the survey(s) to query. Should beone or more of the - names returned by `~astroquery.eso.EsoClass.list_surveys`. If - specified as a string, should be a comma-separated list of - survey names. - cache : bool - Defaults to True. If set overrides global caching behavior. - See :ref:`caching documentation `. - - Returns - ------- - table : `~astropy.table.Table` or `None` - A table representing the data available in the archive for the - specified survey, matching the constraints specified in ``kwargs``. - The number of rows returned is capped by the ROW_LIMIT - configuration item. `None` is returned when the query has no - results. + self._collections = list(res) + return self._collections + def print_table_help(self, table_name: str) -> None: """ - - url = "http://archive.eso.org/wdb/wdb/adp/phase3_main/form" - if open_form: - webbrowser.open(url) - elif help: - self._print_surveys_help(url, cache=cache) - else: - survey_form = self._request("GET", url, cache=cache) - query_dict = kwargs - query_dict["wdbo"] = "csv/download" - if isinstance(surveys, str): - surveys = surveys.split(",") - query_dict['collection_name'] = surveys - if self.ROW_LIMIT >= 0: - query_dict["max_rows_returned"] = int(self.ROW_LIMIT) - else: - query_dict["max_rows_returned"] = 10000 - - survey_response = self._activate_form(survey_form, form_index=0, - form_id='queryform', - inputs=query_dict, cache=cache) - - content = survey_response.content - # First line is always garbage - content = content.split(b'\n', 1)[1] - log.debug("Response content:\n{0}".format(content)) - if _check_response(content): - table = Table.read(BytesIO(content), format="ascii.csv", - comment="^#") - return table - else: - warnings.warn("Query returned no results", NoResultsWarning) - - def query_main(self, *, column_filters={}, columns=[], - open_form=False, help=False, cache=True, **kwargs): + Prints the columns contained in a given table """ - Query raw data contained in the ESO archive. + help_query = ( + f"select column_name, datatype from TAP_SCHEMA.columns " + f"where table_name = '{table_name}'") + available_cols = self.query_tap_service(help_query) + nlines = len(available_cols) + 2 + n_ = astropy.conf.max_lines + astropy.conf.max_lines = nlines + self.log_info(f"\nColumns present in the table {table_name}:\n{available_cols}\n") + astropy.conf.max_lines = n_ + + def _query_instrument_or_collection(self, + query_on: QueryOnField, + primary_filter: Union[List[str], str], *, + ra: float = None, dec: float = None, radius: float = None, + column_filters: Dict = None, + columns: Union[List, str] = None, + print_help=False, cache=True, + **kwargs) -> astropy.table.Table: + """ + Query instrument- or collection-specific data contained in the ESO archive. + - instrument-specific data is raw + - collection-specific data is processed Parameters ---------- + instrument : string + Name of the instrument to query, one of the names returned by + `~astroquery.eso.EsoClass.list_instruments`. column_filters : dict Constraints applied to the query. columns : list of strings @@ -434,7 +371,7 @@ def query_main(self, *, column_filters={}, columns=[], open_form : bool If `True`, opens in your default browser the query form for the requested instrument. - help : bool + print_help : bool If `True`, prints all the parameters accepted in ``column_filters`` and ``columns`` for the requested ``instrument``. @@ -449,22 +386,88 @@ def query_main(self, *, column_filters={}, columns=[], specified instrument, matching the constraints specified in ``kwargs``. The number of rows returned is capped by the ROW_LIMIT configuration item. - """ - url = self.QUERY_INSTRUMENT_URL + "/eso_archive_main/form" - return self._query(url, column_filters=column_filters, columns=columns, - open_form=open_form, help=help, cache=cache, **kwargs) - - def query_instrument(self, instrument, *, column_filters={}, columns=[], - open_form=False, help=False, cache=True, **kwargs): + column_filters = column_filters or {} + columns = columns or [] + filters = {**dict(kwargs), **column_filters} + + if print_help: + self.print_table_help(query_on.table_name) + return + + if (('box' in filters.keys()) + or ('coord1' in filters.keys()) + or ('coord2' in filters.keys())): + message = 'box, coord1 and coord2 are deprecated; use ra, dec and radius instead' + raise ValueError(message) + + if not are_coords_valid(ra, dec, radius): + message = "Either all three (ra, dec, radius) must be present or none of them.\n" + message += f"Values provided: ra = {ra}, dec = {dec}, radius = {radius}" + raise ValueError(message) + + if isinstance(primary_filter, str): + primary_filter = _split_str_as_list_of_str(primary_filter) + + primary_filter = list(map(lambda x: f"'{x.strip()}'", primary_filter)) + where_collections_str = f"{query_on.column_name} in (" + ", ".join(primary_filter) + ")" + + where_constraints_strlist = [f"{k} = {adql_sanitize_val(v)}" + for k, v in filters.items()] + where_constraints = [where_collections_str] + where_constraints_strlist + query = py2adql(table=query_on.table_name, columns=columns, + ra=ra, dec=dec, radius=radius, + where_constraints=where_constraints, + top=self.ROW_LIMIT) + + return self.query_tap_service(query_str=query, cache=cache) + + @deprecated_renamed_argument(('open_form', 'help'), (None, 'print_help'), + since=['0.4.8', '0.4.8']) + def query_instrument(self, instrument: Union[List, str] = None, *, + ra: float = None, dec: float = None, radius: float = None, + column_filters: Dict = None, columns: Union[List, str] = None, + open_form=False, print_help=False, cache=True, + **kwargs) -> astropy.table.Table: + _ = open_form + return self._query_instrument_or_collection(query_on=QueryOnInstrument, + primary_filter=instrument, + ra=ra, dec=dec, radius=radius, + column_filters=column_filters, + columns=columns, + print_help=print_help, + cache=cache, + **kwargs) + + @deprecated_renamed_argument(('open_form', 'help'), (None, 'print_help'), + since=['0.4.8', '0.4.8']) + def query_collections(self, collections: Union[List, str] = None, *, + ra: float = None, dec: float = None, radius: float = None, + column_filters: Dict = None, columns: Union[List, str] = None, + open_form=False, print_help=False, cache=True, + **kwargs) -> astropy.table.Table: + column_filters = column_filters or {} + columns = columns or [] + _ = open_form + return self._query_instrument_or_collection(query_on=QueryOnCollection, + primary_filter=collections, + ra=ra, dec=dec, radius=radius, + column_filters=column_filters, + columns=columns, + print_help=print_help, + cache=cache, + **kwargs) + + @deprecated_renamed_argument(old_name='help', new_name='print_help', since='0.4.8') + def query_main(self, *, + ra: float = None, dec: float = None, radius: float = None, + column_filters=None, columns=None, + print_help=False, cache=True, **kwargs): """ - Query instrument-specific raw data contained in the ESO archive. + Query raw data contained in the ESO archive. Parameters ---------- - instrument : string - Name of the instrument to query, one of the names returned by - `~astroquery.eso.EsoClass.list_instruments`. column_filters : dict Constraints applied to the query. columns : list of strings @@ -489,55 +492,27 @@ def query_instrument(self, instrument, *, column_filters={}, columns=[], ROW_LIMIT configuration item. """ + column_filters = column_filters or {} + columns = columns or [] + filters = {**dict(kwargs), **column_filters} - url = self.QUERY_INSTRUMENT_URL + '/{0}/form'.format(instrument.lower()) - return self._query(url, column_filters=column_filters, columns=columns, - open_form=open_form, help=help, cache=cache, **kwargs) + where_constraints_strlist = [f"{k} = {adql_sanitize_val(v)}" for k, v in filters.items()] + where_constraints = where_constraints_strlist - def _query(self, url, *, column_filters={}, columns=[], - open_form=False, help=False, cache=True, **kwargs): + if print_help: + help_query = \ + "select column_name, datatype from TAP_SCHEMA.columns where table_name = 'dbo.raw'" + h = self.query_tap_service(help_query, cache=cache) + self.log_info(f"Columns present in the table: {h}") + return - table = None - if open_form: - webbrowser.open(url) - elif help: - self._print_query_help(url) - else: - instrument_form = self._request("GET", url, cache=cache) - query_dict = {} - query_dict.update(column_filters) - # TODO: replace this with individually parsed kwargs - query_dict.update(kwargs) - query_dict["wdbo"] = "csv/download" - - # Default to returning the DP.ID since it is needed for header - # acquisition - query_dict['tab_dp_id'] = kwargs.pop('tab_dp_id', 'on') - - for k in columns: - query_dict["tab_" + k] = True - if self.ROW_LIMIT >= 0: - query_dict["max_rows_returned"] = int(self.ROW_LIMIT) - else: - query_dict["max_rows_returned"] = 10000 - # used to be form 0, but now there's a new 'logout' form at the top - # (form_index = -1 and 0 both work now that form_id is included) - instrument_response = self._activate_form(instrument_form, - form_index=-1, - form_id='queryform', - inputs=query_dict, - cache=cache) - - content = instrument_response.content - # First line is always garbage - content = content.split(b'\n', 1)[1] - log.debug("Response content:\n{0}".format(content)) - if _check_response(content): - table = Table.read(BytesIO(content), format="ascii.csv", - comment='^#') - return table - else: - warnings.warn("Query returned no results", NoResultsWarning) + query = py2adql(table="dbo.raw", + columns=columns, + ra=ra, dec=dec, radius=radius, + where_constraints=where_constraints, + top=self.ROW_LIMIT) + + return self.query_tap_service(query_str=query, cache=cache) def get_headers(self, product_ids, *, cache=True): """ @@ -571,7 +546,7 @@ def get_headers(self, product_ids, *, cache=True): result = [] for dp_id in product_ids: response = self._request( - "GET", "http://archive.eso.org/hdr?DpId={0}".format(dp_id), + "GET", f"http://archive.eso.org/hdr?DpId={dp_id}", cache=cache) root = BeautifulSoup(response.content, 'html5lib') hdr = root.select('pre')[0].text @@ -606,10 +581,10 @@ def get_headers(self, product_ids, *, cache=True): columns.append(key) column_types.append(type(header[key])) # Add all missing elements - for i in range(len(result)): + for r in result: for (column, column_type) in zip(columns, column_types): - if column not in result[i]: - result[i][column] = column_type() + if column not in r: + r[column] = column_type() # Return as Table return Table(result) @@ -628,7 +603,7 @@ def _find_cached_file(filename: str) -> bool: files_to_check.append(filename.rsplit(".", 1)[0]) for file in files_to_check: if os.path.exists(file): - log.info(f"Found cached file {file}") + EsoClass.log_info(f"Found cached file {file}") return True return False @@ -642,7 +617,7 @@ def _download_eso_file(self, file_link: str, destination: str, filename = os.path.join(destination, filename) part_filename = filename + ".part" if os.path.exists(part_filename): - log.info(f"Removing partially downloaded file {part_filename}") + self.log_info(f"Removing partially downloaded file {part_filename}") os.remove(part_filename) download_required = overwrite or not self._find_cached_file(filename) if download_required: @@ -658,24 +633,23 @@ def _download_eso_files(self, file_ids: List[str], destination: Optional[str], destination = os.path.abspath(destination) os.makedirs(destination, exist_ok=True) nfiles = len(file_ids) - log.info(f"Downloading {nfiles} files ...") + self.log_info(f"Downloading {nfiles} files ...") downloaded_files = [] for i, file_id in enumerate(file_ids, 1): file_link = self.DOWNLOAD_URL + file_id - log.info(f"Downloading file {i}/{nfiles} {file_link} to {destination}") + self.log_info(f"Downloading file {i}/{nfiles} {file_link} to {destination}") try: filename, downloaded = self._download_eso_file(file_link, destination, overwrite) downloaded_files.append(filename) if downloaded: - log.info(f"Successfully downloaded dataset" - f" {file_id} to {filename}") + self.log_info(f"Successfully downloaded dataset {file_id} to {filename}") except requests.HTTPError as http_error: if http_error.response.status_code == 401: - log.error(f"Access denied to {file_link}") + self.log_error(f"Access denied to {file_link}") else: - log.error(f"Failed to download {file_link}. {http_error}") - except Exception as ex: - log.error(f"Failed to download {file_link}. {ex}") + self.log_error(f"Failed to download {file_link}. {http_error}") + except RuntimeError as ex: + self.log_error(f"Failed to download {file_link}. {ex}") return downloaded_files def _unzip_file(self, filename: str) -> str: @@ -688,12 +662,12 @@ def _unzip_file(self, filename: str) -> str: if filename.endswith(('fits.Z', 'fits.gz')): uncompressed_filename = filename.rsplit(".", 1)[0] if not os.path.exists(uncompressed_filename): - log.info(f"Uncompressing file {filename}") + self.log_info(f"Uncompressing file {filename}") try: subprocess.run([self.GUNZIP, filename], check=True) except Exception as ex: uncompressed_filename = None - log.error(f"Failed to unzip {filename}: {ex}") + self.log_error(f"Failed to unzip {filename}: {ex}") return uncompressed_filename or filename def _unzip_files(self, files: List[str]) -> List[str]: @@ -714,7 +688,7 @@ def _save_xml(self, payload: bytes, filename: str, destination: str): destination = os.path.abspath(destination) os.makedirs(destination, exist_ok=True) filename = os.path.join(destination, filename) - log.info(f"Saving Calselector association tree to {filename}") + self.log_info(f"Saving Calselector association tree to {filename}") with open(filename, "wb") as fd: fd.write(payload) @@ -756,7 +730,8 @@ def get_associated_files(self, datasets: List[str], *, mode: str = "raw", self._save_xml(xml, filename, destination) # For multiple datasets it returns a multipart message elif 'multipart/form-data' in content_type: - msg = email.message_from_string(f'Content-Type: {content_type}\r\n' + response.content.decode()) + msg = email.message_from_string( + f'Content-Type: {content_type}\r\n' + response.content.decode()) for part in msg.get_payload(): filename = part.get_filename() xml = part.get_payload(decode=True) @@ -769,9 +744,11 @@ def get_associated_files(self, datasets: List[str], *, mode: str = "raw", # remove input datasets from calselector results return list(associated_files.difference(set(datasets))) - @deprecated_renamed_argument(('request_all_objects', 'request_id'), (None, None), since=['0.4.7', '0.4.7']) - def retrieve_data(self, datasets, *, continuation=False, destination=None, with_calib=None, - request_all_objects=False, unzip=True, request_id=None): + @deprecated_renamed_argument(('request_all_objects', 'request_id'), (None, None), + since=['0.4.7', '0.4.7']) + def retrieve_data(self, datasets, *, continuation=False, destination=None, + with_calib=None, unzip=True, + request_all_objects=None, request_id=None): """ Retrieve a list of datasets form the ESO archive. @@ -806,10 +783,13 @@ def retrieve_data(self, datasets, *, continuation=False, destination=None, with_ >>> files = Eso.retrieve_data(dpids) """ + _ = request_all_objects, request_id return_string = False if isinstance(datasets, str): return_string = True datasets = [datasets] + if isinstance(datasets, astropy.table.column.Column): + datasets = list(datasets) if with_calib and with_calib not in ('raw', 'processed'): raise ValueError("Invalid value for 'with_calib'. " @@ -817,27 +797,30 @@ def retrieve_data(self, datasets, *, continuation=False, destination=None, with_ associated_files = [] if with_calib: - log.info(f"Retrieving associated '{with_calib}' calibration files ...") + self.log_info(f"Retrieving associated '{with_calib}' calibration files ...") try: # batch calselector requests to avoid possible issues on the ESO server - BATCH_SIZE = 100 + batch_size = 100 sorted_datasets = sorted(datasets) - for i in range(0, len(sorted_datasets), BATCH_SIZE): - associated_files += self.get_associated_files(sorted_datasets[i:i + BATCH_SIZE], mode=with_calib) + for i in range(0, len(sorted_datasets), batch_size): + associated_files += self.get_associated_files( + sorted_datasets[i:i + batch_size], mode=with_calib) associated_files = list(set(associated_files)) - log.info(f"Found {len(associated_files)} associated files") + self.log_info(f"Found {len(associated_files)} associated files") except Exception as ex: - log.error(f"Failed to retrieve associated files: {ex}") + self.log_error(f"Failed to retrieve associated files: {ex}") all_datasets = datasets + associated_files - log.info("Downloading datasets ...") + self.log_info("Downloading datasets ...") files = self._download_eso_files(all_datasets, destination, continuation) if unzip: files = self._unzip_files(files) - log.info("Done!") + self.log_info("Done!") return files[0] if files and len(files) == 1 and return_string else files - def query_apex_quicklooks(self, *, project_id=None, help=False, + @deprecated_renamed_argument(('open_form', 'help'), (None, 'print_help'), + since=['0.4.8', '0.4.8']) + def query_apex_quicklooks(self, *, project_id=None, print_help=False, open_form=False, cache=True, **kwargs): """ APEX data are distributed with quicklook products identified with a @@ -846,182 +829,32 @@ def query_apex_quicklooks(self, *, project_id=None, help=False, Examples -------- - >>> tbl = Eso.query_apex_quicklooks(project_id='093.C-0144') - >>> files = Eso.retrieve_data(tbl['Product ID']) + >>> tbl = ... + >>> files = ... """ - - apex_query_url = 'http://archive.eso.org/wdb/wdb/eso/apex_product/form' - - table = None - if open_form: - webbrowser.open(apex_query_url) - elif help: - return self._print_instrument_help(apex_query_url, 'apex') + # TODO All this function + _ = project_id, print_help, open_form, kwargs + if cache: + query = "APEX_QUERY_PLACEHOLDER" + return self.query_tap_service(query_str=query, cache=cache) else: - - payload = {'wdbo': 'csv/download'} - if project_id is not None: - payload['prog_id'] = project_id - payload.update(kwargs) - - apex_form = self._request("GET", apex_query_url, cache=cache) - apex_response = self._activate_form( - apex_form, form_id='queryform', form_index=0, inputs=payload, - cache=cache, method='application/x-www-form-urlencoded') - - content = apex_response.content - if _check_response(content): - # First line is always garbage - content = content.split(b'\n', 1)[1] - try: - table = Table.read(BytesIO(content), format="ascii.csv", - guess=False, # header_start=1, - comment="#", encoding='utf-8') - except ValueError as ex: - if 'the encoding parameter is not supported on Python 2' in str(ex): - # astropy python2 does not accept the encoding parameter - table = Table.read(BytesIO(content), format="ascii.csv", - guess=False, - comment="#") - else: - raise ex - else: - raise RemoteServiceError("Query returned no results") - - return table - - def _print_query_help(self, url, *, cache=True): - """ - Download a form and print it in a quasi-human-readable way - """ - log.info("List of accepted column_filters parameters.") - log.info("The presence of a column in the result table can be " - "controlled if prefixed with a [ ] checkbox.") - log.info("The default columns in the result table are shown as " - "already ticked: [x].") - - result_string = [] - - resp = self._request("GET", url, cache=cache) - doc = BeautifulSoup(resp.content, 'html5lib') - form = doc.select("html body form pre")[0] - # Unwrap all paragraphs - paragraph = form.find('p') - while paragraph: - paragraph.unwrap() - paragraph = form.find('p') - # For all sections - for section in form.select("table"): - section_title = "".join(section.stripped_strings) - section_title = "\n".join(["", section_title, - "-" * len(section_title)]) - result_string.append(section_title) - checkbox_name = "" - checkbox_value = "" - for tag in section.next_siblings: - if tag.name == u"table": - break - elif tag.name == u"input": - if tag.get(u'type') == u"checkbox": - checkbox_name = tag['name'] - checkbox_value = u"[x]" if ('checked' in tag.attrs) else u"[ ]" - name = "" - value = "" - else: - name = tag['name'] - value = "" - elif tag.name == u"select": - options = [] - for option in tag.select("option"): - options += ["{0} ({1})".format(option['value'], "".join(option.stripped_strings))] - name = tag[u"name"] - value = ", ".join(options) - else: - name = "" - value = "" - if u"tab_" + name == checkbox_name: - checkbox = checkbox_value - else: - checkbox = " " - if name != u"": - result_string.append("{0} {1}: {2}" - .format(checkbox, name, value)) - - log.info("\n".join(result_string)) - return result_string - - def _print_surveys_help(self, url, *, cache=True): - """ - Download a form and print it in a quasi-human-readable way - """ - log.info("List of the parameters accepted by the " - "surveys query.") - log.info("The presence of a column in the result table can be " - "controlled if prefixed with a [ ] checkbox.") - log.info("The default columns in the result table are shown as " - "already ticked: [x].") - - result_string = [] - - resp = self._request("GET", url, cache=cache) - doc = BeautifulSoup(resp.content, 'html5lib') - form = doc.select("html body form")[0] - - # hovertext from different labels are used to give more info on forms - helptext_dict = {abbr['title'].split(":")[0].strip(): ":".join(abbr['title'].split(":")[1:]) - for abbr in form.find_all('abbr') - if 'title' in abbr.attrs and ":" in abbr['title']} - - for fieldset in form.select('fieldset'): - legend = fieldset.select('legend') - if len(legend) > 1: - raise ValueError("Form parsing error: too many legends.") - elif len(legend) == 0: - continue - section_title = "\n\n" + "".join(legend[0].stripped_strings) + "\n" - - result_string.append(section_title) - - for section in fieldset.select('table'): - - checkbox_name = "" - checkbox_value = "" - for tag in section.next_elements: - if tag.name == u"table": - break - elif tag.name == u"input": - if tag.get(u'type') == u"checkbox": - checkbox_name = tag['name'] - checkbox_value = (u"[x]" - if ('checked' in tag.attrs) - else u"[ ]") - name = "" - value = "" - else: - name = tag['name'] - value = "" - elif tag.name == u"select": - options = [] - for option in tag.select("option"): - options += ["{0} ({1})".format(option['value'] if 'value' in option else "", - "".join(option.stripped_strings))] - name = tag[u"name"] - value = ", ".join(options) - else: - name = "" - value = "" - if u"tab_" + name == checkbox_name: - checkbox = checkbox_value - else: - checkbox = " " - if name != u"": - result_string.append("{0} {1}: {2}" - .format(checkbox, name, value)) - if name.strip() in helptext_dict: - result_string.append(helptext_dict[name.strip()]) - - log.info("\n".join(result_string)) - return result_string + raise NotImplementedError + + @deprecated(since="v0.4.8", message=("The ESO list_surveys function is deprecated," + "Use the list_collections function instead.")) + def list_surveys(self, *args, **kwargs): + if "surveys" in kwargs: + kwargs["collections"] = kwargs["surveys"] + del kwargs["surveys"] + return self.list_collections(*args, **kwargs) + + @deprecated(since="v0.4.8", message=("The ESO query_surveys function is deprecated," + "Use the query_collections function instead.")) + def query_surveys(self, *args, **kwargs): + if "surveys" in kwargs: + kwargs["collections"] = kwargs["surveys"] + del kwargs["surveys"] + return self.query_collections(*args, **kwargs) Eso = EsoClass() diff --git a/astroquery/eso/tests/data/amber_query_form.html b/astroquery/eso/tests/data/amber_query_form.html deleted file mode 100644 index 1be90fe1d6..0000000000 --- a/astroquery/eso/tests/data/amber_query_form.html +++ /dev/null @@ -1,546 +0,0 @@ - - - - -ESO Science Archive - AMBER Data Products - - - - - - - -
- - - - - - - - - - -
ESO ESOSPECIAL ACCESS
SCIENCE ARCHIVE FACILITY
AMBER Raw Data
Query Form
- - - - - - - - -
How to use? -Other Instruments -Other Instruments -Archive FAQArchive Facility HOMEESO HOME
-
-
- - -
-Description -
- This form provides access to observations (raw data) performed with -AMBER -since 2004 that are stored on-line in the -Science Archive Facility in Garching. -Find more information about AMBER data on the -Quality Control web pages. -Paranal ambient conditions can be queried separately from here.
-
-
- -
- - - -
-
Special Access Info [open]
- -
-
- -
-
-
-
- -
-
-
- - -
-
Output preferences: -
-
Return max rows.

-

Target Information
    Target name.......................:  -    Coordinate System.................:      RA:      DEC:  RA: sexagesimal=hours,decimal=degrees -    Search Box........................:      Equatorial Output Format:  - Input Target List.................:  -
Observation and proposal parameters
 DATE OBS..........................:  (YYYY MM(M) DD of night begin [12:00 UT], DD MM(M) YYYY also acceptable) -  OR give a query range using the following two fields (start/end dates)
    Start.............................:      End:  - ProgId............................:  PPP.C-NNNN   (e.g. 080.A-0123*) - Program Type......................:       SV Mode:  - PI/CoI............................:  - Proposal Title....................:  -
Generic File Information
 DP.ID.............................:  archive filename of FITS file (e.g. AMBER.2010-09-04T09:40:45.174) - OB.ID.............................:  identification number of OB within ESO system - OBS.TARG.NAME.....................:  Observation block target name -

 DPR.CATG..........................:  Data category (e.g. SCIENCE) - DPR.TYPE..........................:  Observation type    User defined input:  (e.g. 2P2V or 3P2V) - DPR.TECH..........................:  Observation technique    Request all interferometry files  -

 TPL.NAME..........................:  AMBER template name - TPL.NEXP..........................:  total number of exposures within the template - TPL.START.........................:  starting time of template (UT) -
Instrument Specific Information
 DEL.FT.SENSOR.....................:  Fringe Tracker Sensor Name - DEL.FT.STATUS.....................:  Fringe Tracker Status (could be ON or OFF) - DET.NTEL..........................:  Number of telescopes - ISS.CONF.STATION1.................:  Station of telescope 1 - ISS.CONF.STATION2.................:  Station of telescope 2 - ISS.CONF.STATION3.................:  Station of telescope 3 - OCS.OBS.MODE......................:  Observation mode - OCS.OBS.SPECCONF..................:  Spectral Configuration - OCS.OBS.TYPE......................:  Observation type - INS.GRAT1.WLEN....................:  Grating central wavelength [nm] -
Ambient Parameters
 DIMM S-avg........................:  [arcsec] DIMM Seeing average over the exposure (FWHM at 0.5mue) - Airmass...........................:  +/- 0.1 - Night?............................:  Night Exposure ? - Moon Illumination.................:  Moon illumination during the exposure (percentage, negative when moon below the horizon) -
Result set
    Sort by...........................: 

Extra Columns on Tabular Output
-
-
- - Use tabular output even if only one row is returned.
- - Use full-screen output even if more than one row is returned.
-
- -
-
- - - - - - - - - - -
- - ESO HOME - - ARCHIVE HOME - - ARCHIVE FAQ
- wdb 3.0h - 21-JUL-2017 ...... - - Send comments to archive@eso.org -
-
-
- - diff --git a/astroquery/eso/tests/data/amber_sgra_query.tbl b/astroquery/eso/tests/data/amber_sgra_query.tbl deleted file mode 100644 index e7efc35cfd..0000000000 --- a/astroquery/eso/tests/data/amber_sgra_query.tbl +++ /dev/null @@ -1,60 +0,0 @@ - -# SIMBAD coordinates for Sgr A* : 17 45 40.0, -29 00 28.1. -# -Object,RA,DEC,Target Ra Dec,Target l b,ProgId,DP.ID,OB.ID,DPR.CATG,DPR.TYPE,DPR.TECH,ISS.CONF.STATION1,ISS.CONF.STATION2,ISS.CONF.STATION3,INS.GRAT1.WLEN,DIMM S-avg -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:40:03.741,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.64 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:40:19.830,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.64 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:40:35.374,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.64 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:40:50.932,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.68 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:41:07.444,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.68 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:41:24.179,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.68 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:41:39.523,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.68 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:41:55.312,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.69 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:42:12.060,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.69 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:42:29.119,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.69 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:42:44.370,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.69 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:42:59.649,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.69 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:43:16.399,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.69 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:43:32.910,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.69 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:43:48.941,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.69 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:44:04.843,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.77 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:44:21.541,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.77 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:44:38.309,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.77 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:44:53.798,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.81 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:45:10.049,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.80 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:45:26.987,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.80 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:45:43.433,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.80 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:45:58.674,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.78 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:46:14.474,200156177,SCIENCE,"CPTPIST,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.79 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:46:37.269,200156177,SCIENCE,"CPTPIST,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.79 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:47:01.474,200156177,SCIENCE,"FRNSRC,BASE31",INTERFEROMETRY,U1,U3,U4,-1.000,0.80 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:50:20.362,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.74 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:50:33.223,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.74 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:50:46.632,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.74 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:50:59.556,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.74 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:51:14.547,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.78 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:51:27.935,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.77 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:51:41.670,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.77 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:51:54.480,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.77 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:52:07.271,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.77 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:52:21.824,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.76 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:52:35.051,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.76 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:52:48.928,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.76 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:53:02.492,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.76 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:53:24.007,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.76 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:53:37.858,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.76 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:53:51.137,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.76 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:54:05.106,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.76 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:54:26.021,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.77 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:54:39.202,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.77 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:54:52.656,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.77 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:55:06.685,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.77 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:55:26.262,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.78 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:55:39.382,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.80 [0.01] -GC_IRS7,266.417056,-29.006140,17:45:40.09 -29:00:22.1,359.945774 -0.045458,076.B-0863(A),AMBER.2006-03-14T07:55:52.259,200156177,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,U1,U3,U4,-1.000,0.80 [0.01] - -# A maximum of 50 records were found matching the provided criteria - any remaining rows were ignored. -# -# -# -# \ No newline at end of file diff --git a/astroquery/eso/tests/data/main_query_form.html b/astroquery/eso/tests/data/main_query_form.html deleted file mode 100644 index 766c641da5..0000000000 --- a/astroquery/eso/tests/data/main_query_form.html +++ /dev/null @@ -1,341 +0,0 @@ - - - - -ESO Archive Raw Data - - - - - - - -
- - - - - - - - - -
ESOSPECIAL ACCESS
SCIENCE ARCHIVE FACILITY
Observational Raw Data
Query Form
- - - - - - - - - -
How to use? -Instrument-specific Interfaces -Instruments-specific Interfaces -ESO Archive OverviewArchive FAQArchive Facility HOMEESO HOME
-
-
-
-
-Description -

-To request data you have to register as an -ESO/ST-ECF Archive user. A request can be submitted -following the instructions in the results table.
-

-
- - -
-
Output preferences: -
-
Return max rows.

-

 Input File..........:  
- Export: 
- HDR: 
-    Note................:  
-
Target Information

    Target..............:  -    Search Box..........:  If Simbad/Ned name or coordinates given -    RA..................:      Format:  J2000 (RA 05 34;Dec +22) -    DEC.................:  (J2000) - Target Ra, Dec:  -    Output Format.......:  - Stat PLOT:  -    Export File Format..:  - Night...............:  (YYYY MM(M) DD of night begin [12:00 UT], DD MM(M) YYYY also acceptable) -    nightlog............:  -   OR give a query range using the following start/end dates:
    Start...............:      End:  -
Program Information
 Program_ID..........:  -    survey..............:  - PI/CoI..............:  - s/v.................:  - Title...............:  - Prog_Type...........:  -
Observing Information
 Instrument..........:  - Stat Ins:  - Category............:  - Type................:  - Mode................:  - Dataset ID..........:  - Orig Name...........:  - Release_Date........:  - OB_Name.............:  - OB_ID...............:  - TPL ID..............:  - TPL START...........:  -
Instrumental Setup
 Exptime.............:  (seconds) - Stat Exp:  - Filter..............:  (e.g. R*) - Grism...............:  (e.g. GRIS_600*) - Grating.............:  (e.g. CD*) - Slit................:  (e.g. ~lslit1* [see also the help button]) -
Extra Columns
 MJD-OBS:  - Airmass:  - Ambient:  - INFO................:  -
Result Set

    Sort by.............:  -    aladin_colour.......: 

Extra Columns on Tabular Output
-
-
- - Use tabular output even if only one row is returned.
- - Use full-screen output even if more than one row is returned.
-
- -
-
- - - - - - - - - - -
- - ESO HOME - - ARCHIVE HOME - - ARCHIVE FAQ
- wdb 3.0h - 21-JUL-2017 ...... - - Send comments to archive@eso.org -
-
-
- - diff --git a/astroquery/eso/tests/data/main_sgra_query.tbl b/astroquery/eso/tests/data/main_sgra_query.tbl deleted file mode 100644 index 41b0428a50..0000000000 --- a/astroquery/eso/tests/data/main_sgra_query.tbl +++ /dev/null @@ -1,60 +0,0 @@ - -# SIMBAD coordinates for Sgr A* : 17 45 40.0, -29 00 28.1. -# -OBJECT,RA,DEC,Program_ID,Instrument,Category,Type,Mode,Dataset ID,Release_Date,TPL ID,TPL START,Exptime,Filter,MJD-OBS,Airmass -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:40:03.741,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.319488, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:40:19.830,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.319674, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:40:35.374,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.319854, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:40:50.932,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.320034, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:41:07.444,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.320225, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:41:24.179,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.320419, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:41:39.523,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.320596, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:41:55.312,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.320779, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:42:12.060,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.320973, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:42:29.119,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.321170, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:42:44.370,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.321347, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:42:59.649,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.321524, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:43:16.399,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.321718, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:43:32.910,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.321909, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:43:48.941,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.322094, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:44:04.843,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.322278, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:44:21.541,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.322472, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:44:38.309,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.322666, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:44:53.798,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.322845, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:45:10.049,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.323033, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:45:26.987,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.323229, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:45:43.433,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.323419, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:45:58.674,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.323596, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"CPTPIST,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:46:14.474,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.323779, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"CPTPIST,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:46:37.269,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.324042, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE31",INTERFEROMETRY,AMBER.2006-03-14T07:47:01.474,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:21:16, 0.200,,53808.324323, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:50:20.362,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.326625, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:50:33.223,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.326773, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:50:46.632,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.326929, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:50:59.556,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.327078, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:51:14.547,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.327252, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:51:27.935,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.327407, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:51:41.670,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.327566, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:51:54.480,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.327714, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:52:07.271,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.327862, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:52:21.824,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.328030, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:52:35.051,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.328183, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:52:48.928,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.328344, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:53:02.492,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.328501, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:53:24.007,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.328750, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:53:37.858,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.328910, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:53:51.137,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.329064, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:54:05.106,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.329226, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:54:26.021,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.329468, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:54:39.202,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.329620, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:54:52.656,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.329776, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:55:06.685,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.329938, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:55:26.262,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.330165, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:55:39.382,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.330317, -GC_IRS7,17:45:40.09,-29:00:22.1,076.B-0863(A),AMBER,SCIENCE,"FRNSRC,BASE12",INTERFEROMETRY,AMBER.2006-03-14T07:55:52.259,Mar 14 2007,AMBER_3Tstd_acq,2006-03-14T07:48:12, 0.100,,53808.330466, - -# A maximum of 50 records were found matching the provided criteria - any remaining rows were ignored. -# -# -# -# \ No newline at end of file diff --git a/astroquery/eso/tests/data/query_apex_ql_5.pickle b/astroquery/eso/tests/data/query_apex_ql_5.pickle new file mode 100644 index 0000000000..4942655450 Binary files /dev/null and b/astroquery/eso/tests/data/query_apex_ql_5.pickle differ diff --git a/astroquery/eso/tests/data/query_coll_vvv_sgra.pickle b/astroquery/eso/tests/data/query_coll_vvv_sgra.pickle new file mode 100644 index 0000000000..a86325f055 Binary files /dev/null and b/astroquery/eso/tests/data/query_coll_vvv_sgra.pickle differ diff --git a/astroquery/eso/tests/data/query_inst_sinfoni_sgra.pickle b/astroquery/eso/tests/data/query_inst_sinfoni_sgra.pickle new file mode 100644 index 0000000000..a18b5f1a1b Binary files /dev/null and b/astroquery/eso/tests/data/query_inst_sinfoni_sgra.pickle differ diff --git a/astroquery/eso/tests/data/query_main_sgra.pickle b/astroquery/eso/tests/data/query_main_sgra.pickle new file mode 100644 index 0000000000..7a2767f64e Binary files /dev/null and b/astroquery/eso/tests/data/query_main_sgra.pickle differ diff --git a/astroquery/eso/tests/data/vvv_sgra_form.html b/astroquery/eso/tests/data/vvv_sgra_form.html deleted file mode 100644 index d469a145b6..0000000000 --- a/astroquery/eso/tests/data/vvv_sgra_form.html +++ /dev/null @@ -1,822 +0,0 @@ - - - - -ESO Science Archive - Data Products - - - - - - - - - - - - - - - - - - - - - - - - -
ESO - - - - - - - - - -
- GENERIC  - - SPECTRAL  - - IMAGING  - - VISTA  -
PHASE3 ARCHIVE INTERFACES
- - - - - - - -
-HELP -REDUCED DATA TYPES DESCRIPTION -FAQ -DATA RELEASES
-
-
Generic Data Products
Query Form
-
-Please be aware of an important announcement about the flux calibration of XSHOOTER UVB data products.
-This form provides access to reduced or fully calibrated data sets, and derived catalogs, -that were contributed by PIs of ESO programmes or produced by ESO (using ESO calibration pipelines with the best available calibration data), and then -integrated into the ESO Science Archive Facility starting April 2011, through the -Phase 3 process. Included are optical, infrared, and APEX (millimetre, submillimetre) data products. -Each available data set is fully described; please see the list of contributed data releases and pipeline-processed data streams including their corresponding descriptions. -This form allows generic query constraints for all types of data products. -More specific forms, customised for each particular data type, are available for optical and infrared imaging, -for spectra, -and for VISTA data products. -Other data not yet migrated to the Phase 3 infrastructure are available via different user interfaces; please check the archive home page. -

Note: The FITS format of the spectra retrievable via this query form complies to the ESO Science Data Product standard [PDF]. The 1d spectra help page provides a list of tools that support this format and a quick guide to read and display these spectra in IDL and IRAF.

-
-