diff --git a/CHANGES.rst b/CHANGES.rst index 113b7793d8..ca76f4857f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,6 +14,11 @@ API changes Service fixes and enhancements ------------------------------ +eso +^^^ + +- Use TAP backend instead of WDB. [#3141] + heasarc ^^^^^^^ diff --git a/astroquery/eso/__init__.py b/astroquery/eso/__init__.py index af287ef28a..c2b0e466fa 100644 --- a/astroquery/eso/__init__.py +++ b/astroquery/eso/__init__.py @@ -11,14 +11,14 @@ class Conf(_config.ConfigNamespace): """ row_limit = _config.ConfigItem( - 50, + 1000, 'Maximum number of rows returned (set to -1 for unlimited).') username = _config.ConfigItem( "", 'Optional default username for ESO archive.') - query_instrument_url = _config.ConfigItem( - "http://archive.eso.org/wdb/wdb/eso", - 'Root query URL for main and instrument queries.') + tap_url = _config.ConfigItem( + "https://archive.eso.org/tap_obs", + 'URL for TAP queries.') conf = Conf() diff --git a/astroquery/eso/core.py b/astroquery/eso/core.py index 421e6fd81a..fb17b66b3d 100644 --- a/astroquery/eso/core.py +++ b/astroquery/eso/core.py @@ -1,59 +1,57 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst +""" +===================== +ESO Astroquery Module +===================== +European Southern Observatory (ESO) +""" import base64 import email +import functools import json +import os import os.path +import sys 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 +import astropy.table import astropy.utils.data import keyring import requests.exceptions from astropy.table import Table, Column from astropy.utils.decorators import deprecated_renamed_argument from bs4 import BeautifulSoup +from pyvo.dal import TAPService +import pyvo.dal.exceptions as pde from astroquery import log from . import conf -from ..exceptions import RemoteServiceError, NoResultsWarning, LoginError +from ..exceptions import RemoteServiceError, LoginError, \ + NoResultsWarning, MaxResultsWarning from ..query import QueryWithLogin from ..utils import schema +from .utils import py2adql, _split_str_as_list_of_str, \ + adql_sanitize_val, 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: - def __init__(self, username: str, password: str, token: str): + def __init__(self, username: str, token: str): self.username = username - self.password = password self.token = token self.expiration_time = self._get_exp_time_from_token() @@ -67,10 +65,38 @@ def expired(self) -> bool: return time.time() > self.expiration_time - 600 +class EsoNames: + raw_table = "dbo.raw" + phase3_table = "ivoa.ObsCore" + raw_instruments_column = "instrument" + phase3_surveys_column = "obs_collection" + + @staticmethod + def ist_table(instrument_name): + return f"ist.{instrument_name}" + + +def unlimited_max_rec(func): + """ + decorator to overwrite maxrec for specific queries + """ + @functools.wraps(func) + def wrapper(self, *args, **kwargs): + if not isinstance(self, EsoClass): + raise ValueError(f"Expecting EsoClass, found {type(self)}") + + tmpvar = self.maxrec + try: + self.maxrec = sys.maxsize + result = func(self, *args, **kwargs) + finally: + self.maxrec = tmpvar + return result + return wrapper + + class EsoClass(QueryWithLogin): - ROW_LIMIT = conf.row_limit USERNAME = conf.username - QUERY_INSTRUMENT_URL = conf.query_instrument_url CALSELECTOR_URL = "https://archive.eso.org/calselector/v1/associations" DOWNLOAD_URL = "https://dataportal.eso.org/dataPortal/file/" AUTH_URL = "https://www.eso.org/sso/oidc/token" @@ -78,152 +104,26 @@ class EsoClass(QueryWithLogin): def __init__(self): super().__init__() - self._instrument_list = None - self._survey_list = None self._auth_info: Optional[AuthInfo] = 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) - - # for future debugging - self._payload = payload - log.debug("Form: payload={0}".format(payload)) - - if method is not None: - fmt = method - - log.debug("Method/format = {0}".format(fmt)) - - # 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) - - return response + self._hash = None + self._maxrec = None + self.maxrec = conf.row_limit + + @property + def maxrec(self): + return self._maxrec + + @maxrec.setter + def maxrec(self, value): + mr = sys.maxsize + if value: + if value > 0: + mr = value + self._maxrec = mr + + def _tap_url(self) -> str: + url = os.environ.get('ESO_TAP_URL', conf.tap_url) + return url def _authenticate(self, *, username: str, password: str) -> bool: """ @@ -240,7 +140,7 @@ def _authenticate(self, *, username: str, password: str) -> bool: 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) + self._auth_info = AuthInfo(username=username, token=token) log.info("Authentication successful!") return True else: @@ -271,8 +171,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. @@ -282,11 +182,11 @@ def _login(self, *, username: str = None, store_password: bool = False, Username to the ESO Public Portal. If not given, it should be specified in the config file. store_password : bool, optional - Stores the password securely in your keyring. Default is False. + Stores the password securely in your keyring. Default is `False`. reenter_password : bool, optional Asks for the password even if it is already stored in the keyring. This is the way to overwrite an already stored passwork - on the keyring. Default is False. + on the keyring. Default is `False`. """ username, password = self._get_auth_info(username=username, @@ -297,247 +197,500 @@ 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._authenticate(username=self._auth_info.username, - password=self._auth_info.password) + raise LoginError( + "Authentication token has expired! Please log in again." + ) if self._auth_info and not self._auth_info.expired(): return {'Authorization': 'Bearer ' + self._auth_info.token} else: return {} - def list_instruments(self, *, cache=True): - """ List all the available instrument-specific queries offered by the ESO archive. + def _maybe_warn_about_table_length(self, table): + """ + Issues a warning when a table is empty or when the + results are truncated + """ + if len(table) < 1: + warnings.warn("Query returned no results", NoResultsWarning) + + if len(table) == self.maxrec: + warnings.warn(f"Results truncated to {self.maxrec}. " + "To retrieve all the records set to None the maxrec attribute", + MaxResultsWarning) + + def _try_download_pyvo_table(self, + query_str: str, + tap: TAPService) -> Optional[astropy.table.Table]: + table_to_return = None + + def message(query_str): + return (f"Error executing the following query:\n\n" + f"{query_str}\n\n" + "See examples here: https://archive.eso.org/tap_obs/examples\n\n") + + try: + table_to_return = tap.search(query_str, maxrec=self.maxrec).to_table() + except pde.DALQueryError as e: + raise pde.DALQueryError(message(query_str)) from e + except pde.DALFormatError as e: + raise pde.DALFormatError(message(query_str) + f"cause: {e.cause}") from e + except Exception as e: + raise RuntimeError( + f"Unhandled exception {type(e)}\n" + message(query_str)) from e + + return table_to_return + + def _tap_service(self, authenticated: bool = False) -> TAPService: + + if authenticated and not self.authenticated(): + raise LoginError( + "It seems you are trying to issue an authenticated query without " + "being authenticated. Possible solutions:\n" + "1. Set the query function argument authenticated=False" + " OR\n" + "2. Login with your username and password: " + "<eso_class_instance>.login(username=<your_username>" + ) + + if authenticated: + h = self._get_auth_header() + self._session.headers = {**self._session.headers, **h} + tap_service = TAPService(self._tap_url(), session=self._session) + else: + tap_service = TAPService(self._tap_url()) + + return tap_service + + def query_tap_service(self, + query_str: str, + authenticated: bool = False, + ) -> Optional[astropy.table.Table]: + """ + Query the ESO TAP service using a free ADQL string. + + :param query_str: The ADQL query string to be executed. + :type query_str: str + + :param authenticated: If `True`, the query is run as an authenticated user. + Authentication must be done beforehand via :meth:`~astroquery.eso.EsoClass.login`. + Note that authenticated queries are slower. Default is `False`. + :type authenticated: bool + + :returns: The query results in an `~astropy.table.Table`, or `None` if no data is found. + :rtype: Optional[`~astropy.table.Table`] + + **Example usage**:: + + eso_instance = Eso() + + eso_instance.query_tap_service("SELECT * FROM ivoa.ObsCore") + """ + table_to_return = None + tap_service = self._tap_service(authenticated) + table_to_return = self._try_download_pyvo_table(query_str, tap_service) + self._maybe_warn_about_table_length(table_to_return) + return table_to_return + + @unlimited_max_rec + @deprecated_renamed_argument('cache', None, since='0.4.11') + def list_instruments(self, cache=True) -> List[str]: + """ + List all the available instrument-specific queries offered by the ESO archive. Returns ------- instrument_list : list of strings cache : bool - Defaults to True. If set overrides global caching behavior. - See :ref:`caching documentation <astroquery_cache>`. + Deprecated - unused. + """ + _ = cache # We're aware about disregarding the argument + query_str = ("select table_name from TAP_SCHEMA.tables " + "where schema_name='ist' order by table_name") + res = self.query_tap_service(query_str)["table_name"].data + l_res = list(map(lambda x: x.split(".")[1], res)) + return l_res + + @unlimited_max_rec + @deprecated_renamed_argument('cache', None, since='0.4.11') + def list_surveys(self, *, cache=True) -> List[str]: """ - 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. + List all the available surveys (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 <astroquery_cache>`. + Deprecated - unused. """ - 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): + _ = cache # We're aware about disregarding the argument + t = EsoNames.phase3_table + c = EsoNames.phase3_surveys_column + query_str = f"select distinct {c} from {t}" + res = list(self.query_tap_service(query_str)[c].data) + return res + + @unlimited_max_rec + def _print_table_help(self, table_name: str) -> None: + """ + Prints the columns contained in a given table + """ + help_query = ( + f"select column_name, datatype, xtype, unit " + # f", description " ## TODO: The column description renders output unmanageable + f"from TAP_SCHEMA.columns " + f"where table_name = '{table_name}'") + available_cols = self.query_tap_service(help_query) + + count_query = f"select count(*) from {table_name}" + num_records = list(self.query_tap_service(count_query)[0].values())[0] + + # All this block is to print nicely... + # This whole function should be better written and the output + # shown tidier + nlines = len(available_cols) + 2 + n_ = astropy.conf.max_lines + m_ = astropy.conf.max_width + astropy.conf.max_lines = nlines + astropy.conf.max_width = sys.maxsize + log.info(f"\nColumns present in the table {table_name}:\n{available_cols}\n" + f"\nNumber of records present in the table {table_name}:\n{num_records}\n") + astropy.conf.max_lines = n_ + astropy.conf.max_width = m_ + + def _query_on_allowed_values( + self, + table_name: str, + column_name: str, + allowed_values: Union[List[str], str] = None, *, + ra: float = None, dec: float = None, radius: float = None, + columns: Union[List, str] = None, + top: int = None, + count_only: bool = False, + query_str_only: bool = False, + print_help: bool = False, + authenticated: bool = False, + **kwargs) -> Union[astropy.table.Table, int, str]: + """ + Query instrument- or collection-specific data contained in the ESO archive. + - instrument-specific data is raw + - collection-specific data is processed + """ + columns = columns or [] + filters = {**dict(kwargs)} + + if print_help: + self._print_table_help(table_name) + return + + if (('box' in filters) + or ('coord1' in filters) + or ('coord2' in filters)): + 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) + + where_allowed_vals_strlist = [] + if allowed_values: + if isinstance(allowed_values, str): + allowed_values = _split_str_as_list_of_str(allowed_values) + + allowed_values = list(map(lambda x: f"'{x.strip()}'", allowed_values)) + where_allowed_vals_strlist = [f"{column_name} in (" + ", ".join(allowed_values) + ")"] + + where_constraints_strlist = [f"{k} = {adql_sanitize_val(v)}" for k, v in filters.items()] + where_constraints = where_allowed_vals_strlist + where_constraints_strlist + query = py2adql(table=table_name, columns=columns, + ra=ra, dec=dec, radius=radius, + where_constraints=where_constraints, + count_only=count_only, + top=top) + + if query_str_only: + return query # string + + retval = self.query_tap_service(query_str=query, + authenticated=authenticated) # table + if count_only: + retval = list(retval[0].values())[0] # int + + return retval + + @deprecated_renamed_argument(('open_form', 'cache'), (None, None), + since=['0.4.11', '0.4.11']) + def query_surveys( + self, + surveys: Union[List[str], str] = None, *, + ra: float = None, dec: float = None, radius: float = None, + columns: Union[List, str] = None, + top: int = None, + count_only: bool = False, + query_str_only: bool = False, + help: bool = False, + authenticated: bool = False, + column_filters: Optional[dict] = None, + open_form: bool = False, cache: bool = False, + **kwargs) -> Union[astropy.table.Table, int, str]: """ Query survey Phase 3 data contained in the ESO archive. - 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 <astroquery_cache>`. + :param surveys: Name of the survey(s) to query. Should be one or more of the + names returned by :meth:`~astroquery.eso.EsoClass.list_surveys`. If specified + as a string, it should be a comma-separated list of survey names. + If not specified, returns records relative to all surveys. Default is `None`. + :type surveys: str or list - 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. + :param ra: Cone Search Center - Right Ascension in degrees. + :type ra: float - """ + :param dec: Cone Search Center - Declination in degrees. + :type dec: float - 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) + :param radius: Cone Search Radius in degrees. + :type radius: float - def query_main(self, *, column_filters={}, columns=[], - open_form=False, help=False, cache=True, **kwargs): - """ - Query raw data contained in the ESO archive. + :param columns: Name of the columns the query should return. If specified as a string, + it should be a comma-separated list of column names. + :type columns: str or list of str - Parameters - ---------- - column_filters : dict - Constraints applied to the query. - columns : list of strings - Columns returned by the query. - open_form : bool - If `True`, opens in your default browser the query form - for the requested instrument. - help : bool - If `True`, prints all the parameters accepted in - ``column_filters`` and ``columns`` for the requested - ``instrument``. - cache : bool - Defaults to True. If set overrides global caching behavior. - See :ref:`caching documentation <astroquery_cache>`. + :param top: When set to ``N``, returns only the top ``N`` records. + :type top: int - Returns - ------- - table : `~astropy.table.Table` - A table representing the data available in the archive for the - specified instrument, matching the constraints specified in - ``kwargs``. The number of rows returned is capped by the - ROW_LIMIT configuration item. + :param count_only: If `True`, returns only an `int`: the count of the records + the query would return when set to `False`. Default is `False`. + :type count_only: bool + + :param query_str_only: If `True`, returns only a `str`: the query string that + would be issued to the TAP service. Default is `False`. + :type query_str_only: bool + + :param help: If `True`, prints all the parameters accepted in ``column_filters`` + and ``columns``. Default is `False`. + :type help: bool + + :param authenticated: If `True`, runs the query as an authenticated user. + Authentication must be done beforehand via :meth:`~astroquery.eso.EsoClass.login`. + Note that authenticated queries are slower. Default is `False`. + :type authenticated: bool + + :param column_filters: Constraints applied to the query. Default is `None`. + :type column_filters: dict, `None` + + :param open_form: **Deprecated** - unused. + :type open_form: bool + + :param cache: **Deprecated** - unused. + :type cache: bool + :returns: + - By default, a `~astropy.table.Table` containing records based on the specified + columns and constraints. Returns `None` when the query has no results. + - When ``count_only`` is `True`, returns an `int` representing the + record count for the specified filters. + - When ``query_str_only`` is `True`, returns the query string that + would be issued to the TAP service given the specified arguments. + + :rtype: `~astropy.table.Table`, `str`, `int`, or `None` + """ + _ = open_form, cache # make explicit that we are aware these arguments are unused + c = column_filters if column_filters else {} + kwargs = {**kwargs, **c} + return self._query_on_allowed_values(table_name=EsoNames.phase3_table, + column_name=EsoNames.phase3_surveys_column, + allowed_values=surveys, + ra=ra, dec=dec, radius=radius, + columns=columns, + top=top, + count_only=count_only, + query_str_only=query_str_only, + print_help=help, + authenticated=authenticated, + **kwargs) + + @deprecated_renamed_argument(('open_form', 'cache'), (None, None), + since=['0.4.11', '0.4.11']) + def query_main( + self, + instruments: Union[List[str], str] = None, *, + ra: float = None, dec: float = None, radius: float = None, + columns: Union[List, str] = None, + top: int = None, + count_only: bool = False, + query_str_only: bool = False, + help: bool = False, + authenticated: bool = False, + column_filters: Optional[dict] = None, + open_form: bool = False, cache: bool = False, + **kwargs) -> Union[astropy.table.Table, int, str]: """ - 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) + Query raw data from all instruments contained in the ESO archive. + + :param instruments: Name of the instruments to filter. Should be one or more of the + names returned by :meth:`~astroquery.eso.EsoClass.list_instruments`. If specified + as a string, it should be a comma-separated list of instrument names. + If not specified, returns records relative to all instruments. Default is `None`. + :type instruments: str or list + + :param ra: Cone Search Center - Right Ascension in degrees. + :type ra: float + + :param dec: Cone Search Center - Declination in degrees. + :type dec: float + + :param radius: Cone Search Radius in degrees. + :type radius: float + + :param columns: Name of the columns the query should return. If specified as a string, + it should be a comma-separated list of column names. + :type columns: str or list of str + + :param top: When set to ``N``, returns only the top ``N`` records. + :type top: int - def query_instrument(self, instrument, *, column_filters={}, columns=[], - open_form=False, help=False, cache=True, **kwargs): + :param count_only: If `True`, returns only an `int`: the count of the records + the query would return when set to `False`. Default is `False`. + :type count_only: bool + + :param query_str_only: If `True`, returns only a `str`: the query string that + would be issued to the TAP service. Default is `False`. + :type query_str_only: bool + + :param help: If `True`, prints all the parameters accepted in ``column_filters`` + and ``columns``. Default is `False`. + :type help: bool + + :param authenticated: If `True`, runs the query as an authenticated user. + Authentication must be done beforehand via :meth:`~astroquery.eso.EsoClass.login`. + Note that authenticated queries are slower. Default is `False`. + :type authenticated: bool + + :param column_filters: Constraints applied to the query. Default is `None`. + :type column_filters: dict, `None` + + :param open_form: **Deprecated** - unused. + :type open_form: bool + + :param cache: **Deprecated** - unused. + :type cache: bool + + :returns: + - By default, a `~astropy.table.Table` containing records based on the specified + columns and constraints. Returns `None` when the query has no results. + - When ``count_only`` is `True`, returns an `int` representing the + record count for the specified filters. + - When ``query_str_only`` is `True`, returns the query string that + would be issued to the TAP service given the specified arguments. + + :rtype: `~astropy.table.Table`, `str`, `int`, or `None` + """ + _ = open_form, cache # make explicit that we are aware these arguments are unused + c = column_filters if column_filters else {} + kwargs = {**kwargs, **c} + return self._query_on_allowed_values(table_name=EsoNames.raw_table, + column_name=EsoNames.raw_instruments_column, + allowed_values=instruments, + ra=ra, dec=dec, radius=radius, + columns=columns, + top=top, + count_only=count_only, + query_str_only=query_str_only, + print_help=help, + authenticated=authenticated, + **kwargs) + + @deprecated_renamed_argument(('open_form', 'cache'), (None, None), + since=['0.4.11', '0.4.11']) + def query_instrument( + self, + instrument: str, *, + ra: float = None, dec: float = None, radius: float = None, + columns: Union[List, str] = None, + top: int = None, + count_only: bool = False, + query_str_only: bool = False, + help: bool = False, + authenticated: bool = False, + column_filters: Optional[dict] = None, + open_form: bool = False, cache: bool = False, + **kwargs) -> Union[astropy.table.Table, int, str]: """ Query instrument-specific 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 - Columns returned by the query. - open_form : bool - If `True`, opens in your default browser the query form - for the requested instrument. - help : bool - If `True`, prints all the parameters accepted in - ``column_filters`` and ``columns`` for the requested - ``instrument``. - cache : bool - Defaults to True. If set overrides global caching behavior. - See :ref:`caching documentation <astroquery_cache>`. + :param instrument: Name of the instrument from which raw data is to be queried. + Should be ONLY ONE of the names returned by + :meth:`~astroquery.eso.EsoClass.list_instruments`. + :type instruments: str - Returns - ------- - table : `~astropy.table.Table` - A table representing the data available in the archive for the - specified instrument, matching the constraints specified in - ``kwargs``. The number of rows returned is capped by the - ROW_LIMIT configuration item. + :param ra: Cone Search Center - Right Ascension in degrees. + :type ra: float - """ + :param dec: Cone Search Center - Declination in degrees. + :type dec: float - 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) + :param radius: Cone Search Radius in degrees. + :type radius: float - def _query(self, url, *, column_filters={}, columns=[], - open_form=False, help=False, cache=True, **kwargs): + :param columns: Name of the columns the query should return. If specified as a string, + it should be a comma-separated list of column names. + :type columns: str or list of str - 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) + :param top: When set to ``N``, returns only the top ``N`` records. + :type top: int + + :param count_only: If `True`, returns only an `int`: the count of the records + the query would return when set to `False`. Default is `False`. + :type count_only: bool + + :param query_str_only: If `True`, returns only a `str`: the query string that + would be issued to the TAP service. Default is `False`. + :type query_str_only: bool + + :param help: If `True`, prints all the parameters accepted in ``column_filters`` + and ``columns``. Default is `False`. + :type help: bool + + :param authenticated: If `True`, runs the query as an authenticated user. + Authentication must be done beforehand via :meth:`~astroquery.eso.EsoClass.login`. + Note that authenticated queries are slower. Default is `False`. + :type authenticated: bool + + :param column_filters: Constraints applied to the query. Default is `None`. + :type column_filters: dict, `None` + + :param open_form: **Deprecated** - unused. + :type open_form: bool + + :param cache: **Deprecated** - unused. + :type cache: bool + + :returns: + - By default, a `~astropy.table.Table` containing records based on the specified + columns and constraints. Returns `None` when the query has no results. + - When ``count_only`` is `True`, returns an `int` representing the + record count for the specified filters. + - When ``query_str_only`` is `True`, returns the query string that + would be issued to the TAP service given the specified arguments. + + :rtype: `~astropy.table.Table`, `str`, `int`, or `None` + """ + _ = open_form, cache # make explicit that we are aware these arguments are unused + c = column_filters if column_filters else {} + kwargs = {**kwargs, **c} + return self._query_on_allowed_values(table_name=EsoNames.ist_table(instrument), + column_name=None, + allowed_values=None, + ra=ra, dec=dec, radius=radius, + columns=columns, + top=top, + count_only=count_only, + query_str_only=query_str_only, + print_help=help, + authenticated=authenticated, + **kwargs) def get_headers(self, product_ids, *, cache=True): """ @@ -571,7 +724,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"https://archive.eso.org/hdr?DpId={dp_id}", cache=cache) root = BeautifulSoup(response.content, 'html5lib') hdr = root.select('pre')[0].text @@ -606,10 +759,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) @@ -667,14 +820,13 @@ def _download_eso_files(self, file_ids: List[str], destination: Optional[str], 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}") + 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}") else: log.error(f"Failed to download {file_link}. {http_error}") - except Exception as ex: + except RuntimeError as ex: log.error(f"Failed to download {file_link}. {ex}") return downloaded_files @@ -756,7 +908,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 +922,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 +961,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'. " @@ -820,10 +978,11 @@ def retrieve_data(self, datasets, *, continuation=False, destination=None, with_ 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") except Exception as ex: @@ -837,8 +996,12 @@ def retrieve_data(self, datasets, *, continuation=False, destination=None, with_ 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, - open_form=False, cache=True, **kwargs): + @deprecated_renamed_argument(('open_form', 'cache'), (None, None), + since=['0.4.11', '0.4.11']) + def query_apex_quicklooks(self, *, project_id=None, help: bool = False, + column_filters: Optional[dict] = None, + open_form: bool = False, cache: bool = False, + **kwargs): """ APEX data are distributed with quicklook products identified with a different name than other ESO products. This query tool searches by @@ -846,182 +1009,13 @@ 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']) - """ - - 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') - 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 + >>> tbl = ... + >>> files = ... """ - 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 + # TODO All this function + # make explicit that we are aware these arguments are unused + _ = project_id, help, column_filters, open_form, cache, kwargs + raise NotImplementedError Eso = EsoClass() diff --git a/astroquery/eso/tests/data/2031769bb0e68fb2816bf5680203e586eea71ca58b2694a71a428605.pickle b/astroquery/eso/tests/data/2031769bb0e68fb2816bf5680203e586eea71ca58b2694a71a428605.pickle new file mode 100644 index 0000000000..9a0a2cb98b --- /dev/null +++ b/astroquery/eso/tests/data/2031769bb0e68fb2816bf5680203e586eea71ca58b2694a71a428605.pickle @@ -0,0 +1 @@ +�K. \ No newline at end of file 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 @@ -<!DOCTYPE html> -<HTML> -<HEAD> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<TITLE>ESO Science Archive - AMBER Data Products</TITLE> -<link rel="stylesheet" type="text/css" href="/wdb/css/wdb.css"> -<link href="http://www.eso.org/public/archives/favicon.ico" rel="shortcut icon"> -<script src="/wdb/jslib/jquery/1.8.3/jquery.min.js"></script> -<script type="text/javascript"><!-- -$(document).ready( function() { -changeLabels(); -$("#myreset").click(function(){ -$("#coord_sys").val('eq'); -changeLabels(); -$("#dp_type").attr("disabled", false); -$("#dp_tech").attr("disabled", false); -$("#dp_cat").attr("disabled", false); -}); -$("[name=dp_type_user]").change(function(){ -$("#dp_type").attr("disabled", true); -}).blur(function() { -if($("[name=dp_type_user]").val().length == 0) { -$("#dp_type").attr("disabled", false); -} else { -$("#dp_type option:first").attr('selected','selected'); -} -}); -$("[name=dp_tech_user]").change(function(){ -$("#dp_tech").attr("disabled", true); -}).blur(function() { -if($("[name=dp_tech_user]").val().length == 0) { -$("#dp_tech").attr("disabled", false); -} else { -$("#dp_tech option:first").attr('selected','selected'); -} -}); -$("[name=dp_cat_user]").change(function(){ -$("#dp_cat").attr("disabled", true); -}).blur(function() { -if($("[name=dp_cat_user]").val().length == 0) { -$("#dp_cat").attr("disabled", false); -} else { -$("#dp_cat option:first").attr('selected','selected'); -} -}); -// Function to truncate text (Read More, Read Less) is applied to any element of the class textContainer_Truncate -// line height in 'px' is set to 44, height which is currently hardcoded for all elements. -var maxheightText=12; -var showText = "[+] Read more ..."; -var hideText = "[-] Read less"; -jQuery('.textContainer_Truncate').each(function () { -truncate_text( this, maxheightText, showText, hideText, "" ); -}); -}); -function changeLabels() -{ -var coordsys=$("#coord_sys").val(); -var label1="RA"; -var label2="DEC"; -var unitlabel_coord1="RA: sexagesimal/hours, decimal/degrees"; -if (coordsys == "gal") -{ -label1="l "; -label2="b "; -unitlabel_coord1="both degrees whether sexagesimal or decimal"; -} -$('#coord1_label').html(label1); -$('#coord2_label').html(label2); -$('#unitlabel_coord1').html(unitlabel_coord1); -//document.getElementById("coord1_label").innerHTML = label1; -//document.getElementById("coord2_label").innerHTML = label2; -//document.getElementById("unitlabel_coord1").innerHTML = unitlabel_coord1; -} -function resetLabels() -{ -var label1="RA"; -var label2="DEC"; -var unitlabel_coord1="RA: sexagesimal/hours, decimal/degrees"; -$('#coord1_label').html(label1); -$('#coord2_label').html(label2); -$('#unitlabel_coord1').html(unitlabel_coord1); -} -function truncate_text( obj, maxheight, more_label, less_label, urltarget) -{ -var text = jQuery(obj); -if (text.height() > maxheight){ -text.css({ 'overflow': 'hidden','height': maxheight + 'px' }); -var link = jQuery('<a style="color:rgb(150,0,96); text-decoration:none; font-size: 75%; font-weight: bold;" href="#' + urltarget + '">' + more_label + '</a>'); -var linkDiv = jQuery('<div></div>'); -linkDiv.append(link); -jQuery(obj).after(linkDiv); -link.click(function (event) { -event.preventDefault(); -if (text.height() > maxheight) { -jQuery(this).html(more_label); -text.css('height', maxheight + 'px'); -} else { -jQuery(this).html(less_label); -text.css('height', 'auto'); -} -}); -} -} -//--> -</SCRIPT> -<script type="text/javascript" src="/wdb/jslib/wdb_query_functions.js"></script> -</HEAD> -<BODY onunload="" id="public"> -<div id='raw_div_headingtable'> -<style> -.urgent_note_warning { -color: red; -font-style: italic; -font-weight:bold; -} -.urgent_note_text { -color: black; -font-style: italic; -} -</style> -<table id='raw_headingtable' align="center" width="100%" border="0"> -<tr valign="middle"> -<td colspan="1" rowspan="2" class="partners" align="left" style="white-space: nowrap;"><a href="http://www.eso.org"><img src="/wdb/images/eso-logo.gif" height="100" alt="ESO" title="ESO Homepage"></a> <a href="http://www.eso.org/sci/facilities/paranal/instruments/amber/"><img src="/wdb/images/amber_instrument.jpg" height="100" alt="ESO" title="AMBER instrument Home Page"></a></td> -<td colspan="7" align="center"><span class="raw_hide_public_show_cas saf_raw_watermark">SPECIAL ACCESS<br></span><span class="saf_raw_watermark">SCIENCE ARCHIVE FACILITY</span></td> -<td colspan="3" align="right"><span style="font-weight: bold; font-size: 200%; white-space: nowrap;">AMBER Raw Data<br>Query Form</span></td> -</tr> -<tr> -<td colspan="9" align="right"> -<table cellpadding="2" cellspacing="2" border="0" class="raw_header"> -<tr align="right" valign="middle" style="white-space: nowrap;"> -<td align="middle"><a href="/eso/eso_archive_help.html">How to use?</a></td> -<td align="middle"> -<span style="margin: 3px; color: black; text-decoration: none" class="raw_show_public_hide_cas"><A href="http://archive.eso.org/cms/eso-data/instrument-specific-query-forms.html">Other Instruments</a></span> -<span style="margin: 3px; color: white; text-decoration: none" class="raw_hide_public_show_cas"><A href="http://archive.eso.org/cms/eso-data/instrument-specific-query-forms-special-access.html">Other Instruments</a></span> -</td> -<td align="middle"><A href="/faq.html">Archive FAQ</a></td> -<td align="middle"><A href="/">Archive Facility HOME</a></td> -<td align="middle"><A href="http://www.eso.org/">ESO HOME</a></td> -</tr> -</table> -</td> -</tr> -</table> -</div> -<span class="raw_show_public_hide_cas"> -<table width="100%"> -<tr><td align="center" bgcolor="aaaaaa"> -<font color="ffffff" size="+1"><b>Description</b></font> -</td></tr></table><div style="text-align: justify; font-size:110%; padding:20px;"> - This form provides access to observations (raw data) performed with -<a href="http://www.eso.org/sci/facilities/paranal/instruments/amber/">AMBER</a> -since 2004 that are stored on-line in the <a href="/"> -Science Archive Facility</a> in Garching. -Find more information about AMBER data on the -<a href="http://www.eso.org/observing/dfo/quality/index_amber.html">Quality Control web pages</a>. -Paranal ambient conditions can be queried separately from <a href="http://archive.eso.org/cms/eso-data/ambient-conditions/paranal-ambient-query-forms.html">here.</a><br></div> -</span> -<div class="raw_hide_public_show_cas" id="special_access_info"> -<!-- BEGIN Special Access Box --> -<div class="access_info_container" style="position:relative;"> -<script type="text/javascript"> -function toggling_access_info() -{ -$('.access_info').toggle(); -if ( $('.access_info').css('display') == 'none' ) -{ -$('.btn_access_info').html('<span style="letter-spacing: 12px; font-family: verdana; display:inline-block; vertical-align:middle" title="click to expand">Special Access Info</span><span style="font-family:verdana; vertical-align:middle; float: right; font-size:10px;" title="click to expand"> [open]</span>'); -} -else -{ -$('.btn_access_info').html('<span style="letter-spacing: 12px; font-family:verdana; display:inline-block; vertical-align:middle" title="click to hide">Special Access Info</span><span style="font-family:verdana; vertical-align:middle; float:right; font-size:10px" title="click to hide"> [close]</span>'); -} -} -</script> -<table style="width: 100%"> -<tr> -<td> -<div class="btn_access_info" style="width:440px; padding-left: 10px; padding-right: 10px; text-align: center; font-size:15px;position:relative;left:40px;top:11px;background-color:rgb(139,0,0);color:white;border-radius:5px; display:inline-block; vertical-align:middle" onclick="toggling_access_info();"><span style="letter-spacing: 12px; font-family: verdana; display:inline-block; vertical-align:middle" title="click to expand">Special Access Info</span><span style="font-family:verdana; vertical-align:middle; float:right; font-size:10px;" title="click to expand"> [open]</span></div> -<div class="access_info" style="min-width: 900px !important; text-align: justify; font-size:110%; padding:20px;border-radius:15px;border:5px solid rgb(139,0,0); display: none"> -<table cellpadding="15"> -<tr> -<td widht="70%" valign="top"><h3>Special access interface</h3> -<em>This query form allows logged-on users to browse AMBER raw data beyond what possible with the <a href="/wdb/wdb/eso/amber/form">public AMBER interface</a>. -A query will return any matching public (raw) asset, plus any other (raw) asset for which the user has been granted special permissions, -as it is the case for instrument teams, PIs of special programmes, etc.<br> -</em> -<p> -<h3>Other public interfaces</h3> -<em> -Using the query forms listed below, you can only browse public assets (no credentials requested): -<ul> -<li> <b><a href="http://archive.eso.org/eso/eso_archive_main.html">ESO raw data query form</a></b> -<li> <b><a href="http://archive.eso.org/cms/eso-data/instrument-specific-query-forms.html">Instrument-dedicated query forms</a></b> (raw data) -<li> <b><a href="/wdb/wdb/adp/phase3_main/form">Phase 3 query form</a></b> (science reduced or fully calibrated data) -</ul> -</em> -</td> -<td width="30%" align="right" valign="top"> -<table><tr><td align="left"> -<h3>How to change user</h3> -<em>To change user, please: -<ol> -<li>Copy <a id='copy_link' title="Use the Copy Link Location option (right click), then sign out, then paste the copied link into your browser again." href="">this link</a> (right click). -<li>Logout pressing the Special Access Sign Out button -<li>Paste the copied link into the browser location again. -</ol> -</em> -</td></tr></table> -</td> -</tr> -</table> -</div> <!-- end of alsoavailable div --> -</td><td align="right"> -<form id='logout' title="You can use this button to sign off and then sign in again as a different user." action="https://www.eso.org/sso/logout?http://safwebdev01.hq.eso.org/wdb/wdb/cas/amber/form" style="margin-top: 21px;"> -<input type="submit" value="ESO Special Access Sign Out"> -</form> -</td></tr></table> -</div> <!-- end of alsoavailable_container div --> -<br> -<!-- END Special Access Box --> -</div> <!-- closing special_access_info div --> -<FORM id="queryform" ACTION="/wdb/wdb/eso/amber/query" METHOD="POST" ENCTYPE="multipart/form-data"> -<div id="wdb_top_menu" class="wdb_top_menu"><fieldset class="fs_top_menu"> <table id="wdb_top_menu_table" width="100%" cellpadding=5 cellspacing=0 border=0><tr valign="middle"> <td align="left" valign="middle" style="width: 25%; white-space: nowrap;"> - <input id="search" type="submit" class="ibsearch" value="Search"> - <input id="myreset" type="reset" style="width: 7em;" value="Reset" onClick="wdb_showall_toggler($('#wdb_tabbit'),'All Fields','Default Fields','reset')"></td><td style="width: 50%; white-space: nowrap;"> -<div id="wdb_preferences_container" class="wdb_preferences_container"> -<div id="wdb_preferences" class="wdb_preferences">Output preferences: <SELECT name="wdbo"><OPTION VALUE="html/display" selected="selected">html table</OPTION><OPTION VALUE="ascii/display">ascii fixed length/display</OPTION><OPTION VALUE="ascii/download">ascii fixed length/download</OPTION><OPTION VALUE="csv/download">ascii csv/download</OPTION><OPTION VALUE="tsv/display">ascii tsv/display</OPTION><OPTION VALUE="tsv/download">ascii tsv/download</OPTION></SELECT> -</div> -<div id="wdb_max_records" class="wdb_max_records"> Return max <INPUT VALUE="1000" SIZE="5" NAME="max_rows_returned"> rows.</div><input type="button" id="wdb_tabbit" class="wdb_tabbit" style="margin-left: 2em;" onClick="wdb_showall_toggler(this,'All Fields','Default Fields');" value="All Fields"></div><!-- closing div wdb_preferences_container ***************************************************************** --></td><td align="right" style="width: 25%; white-space: nowrap;"><input type="button" id="ib_query_syntax" value="Syntax Help" onClick="wdb_query_syntax(this,'/wdb/html/wdb_query_syntax_quick.html')"></td></tr></table><p id="wdb_query_syntax" class="wdb_query_syntax"></p></fieldset></div><!-- closing div wdb_top_menu ***************************************************************** --><p> -<pre><table class="html_attr" width="100%"><tr><th>Target Information</th></tr></table><small> </small><small> </small><b><a href="/eso/eso_archive_help.html#Target"><abbr title="target: ">Target name</abbr></a>.......................:</b> <INPUT name="target" size="21" placeholder=""> <select name=resolver> -<option value=simbad>SIMBAD name -<option value=ned>NED name -<option value=none>OBJECT as specified by the observer -</select> -<small> </small><small> </small><b><a href="/eso/eso_archive_help.html#RA"><abbr title="coord_sys: ">Coordinate System</abbr></a>.................:</b> <SELECT id="coord_sys" name="coord_sys" style="vertical-align: middle" onChange='changeLabels();' ><OPTION value="eq"> Equatorial (FK5)</OPTION> -<OPTION value="gal"> Galactic</OPTION> -</SELECT><small> </small><small> </small><b><a href="/eso/eso_archive_help.html#RA"><abbr title="coord1: "><I id="coord1_label">RA</I></abbr></a>:</b> <INPUT name="coord1" size="12" placeholder=""><small> </small><small> </small><b><a href="/eso/eso_archive_help.html#DEC"><abbr title="coord2: "><I id="coord2_label">DEC</I></abbr></a>:</b> <INPUT name="coord2" size="12" placeholder=""> <I id="unitlabel_coord1">RA: sexagesimal=hours,decimal=degrees</I> -<small> </small><small> </small><b><a href="/eso/eso_archive_help.html#Search_Box"><abbr title="box: ">Search Box</abbr></a>........................:</b> <INPUT name="box" size="12" value="00 10 00" onblur="if(this.value == '') { this.value='00 10 00'}" onfocus="if(this.value == '00 10 00') { this.value = ''; }"><small> </small><small> </small><b><a href="/eso/eso_archive_help.html#Output"><abbr title="format: ">Equatorial Output Format</abbr></a>:</b> <SELECT id="format" name="format" style="vertical-align: middle" ><OPTION value="sexagesimal"> Sexagesimal</OPTION> -<OPTION value="decimal"> Decimal</OPTION> -</SELECT> -<INPUT type=checkbox checked name="tab_wdb_input_file"><small> </small><b><a href="/eso/eso_archive_help.html#Upload"><abbr title="wdb_input_file: ">Input Target List</abbr></a>.................:</b> <INPUT name="wdb_input_file" type="file" value="" > -<table class="html_attr" width="100%"><tr><th>Observation and proposal parameters</th></tr></table><INPUT type=checkbox name="tab_night"><small> </small><b><a href="/eso/eso_archive_help.html#Night"><abbr title="night: Night">DATE OBS</abbr></a>..........................:</b> <INPUT name="night" size="20" placeholder=""> <i>(YYYY MM(M) DD of night begin [12:00 UT], DD MM(M) YYYY also acceptable)</i> - <i>OR give a query range using the following two fields (start/end dates)</i><br><small> </small><small> </small><b><a href="/eso/eso_archive_help.html#Start"><abbr title="stime: ">Start</abbr></a>.............................:</b> <INPUT name="stime" size="10" placeholder=""> <select name=starttime> -<option value=00>00 hrs [UT] -<option value=01>01 hrs [UT] -<option value=02>02 hrs [UT] -<option value=03>03 hrs [UT] -<option value=04>04 hrs [UT] -<option value=05>05 hrs [UT] -<option value=06>06 hrs [UT] -<option value=07>07 hrs [UT] -<option value=08>08 hrs [UT] -<option value=09>09 hrs [UT] -<option value=10>10 hrs [UT] -<option value=11>11 hrs [UT] -<option value=12 selected>12 hrs [UT] -<option value=13>13 hrs [UT] -<option value=14>14 hrs [UT] -<option value=15>15 hrs [UT] -<option value=16>16 hrs [UT] -<option value=17>17 hrs [UT] -<option value=18>18 hrs [UT] -<option value=19>19 hrs [UT] -<option value=20>20 hrs [UT] -<option value=21>21 hrs [UT] -<option value=22>22 hrs [UT] -<option value=23>23 hrs [UT] -<option value=24>24 hrs [UT] -</select><small> </small><small> </small><b><a href="/eso/eso_archive_help.html#End"><abbr title="etime: ">End</abbr></a>:</b> <INPUT name="etime" size="10" placeholder=""> <select name=endtime> -<option value=00>00 hrs [UT] -<option value=01>01 hrs [UT] -<option value=02>02 hrs [UT] -<option value=03>03 hrs [UT] -<option value=04>04 hrs [UT] -<option value=05>05 hrs [UT] -<option value=06>06 hrs [UT] -<option value=07>07 hrs [UT] -<option value=08>08 hrs [UT] -<option value=09>09 hrs [UT] -<option value=10>10 hrs [UT] -<option value=11>11 hrs [UT] -<option value=12 selected>12 hrs [UT] -<option value=13>13 hrs [UT] -<option value=14>14 hrs [UT] -<option value=15>15 hrs [UT] -<option value=16>16 hrs [UT] -<option value=17>17 hrs [UT] -<option value=18>18 hrs [UT] -<option value=19>19 hrs [UT] -<option value=20>20 hrs [UT] -<option value=21>21 hrs [UT] -<option value=22>22 hrs [UT] -<option value=23>23 hrs [UT] -<option value=24>24 hrs [UT] -</select> -<INPUT type=checkbox checked name="tab_prog_id"><small> </small><b><a href="/eso/eso_archive_help.html#Prog_ID"><abbr title="prog_id: ESO program identification code">ProgId</abbr></a>............................:</b> <INPUT name="prog_id" size="15" placeholder=""> <i>PPP.C-NNNN (e.g. 080.A-0123*)</i> -<INPUT type=checkbox name="tab_prog_type"><small> </small><b><a href="/eso/eso_archive_help.html#Program_Type"><abbr title="prog_type: ">Program Type</abbr></a>......................:</b> <SELECT id="prog_type" name="prog_type" style="vertical-align: middle" ><OPTION value="%"> Any</OPTION> -<OPTION value="0"> Normal</OPTION> -<OPTION value="1"> GTO</OPTION> -<OPTION value="2"> DDT</OPTION> -<OPTION value="3"> ToO</OPTION> -<OPTION value="4"> Large</OPTION> -<OPTION value="5"> Short</OPTION> -<OPTION value="6"> Calibration</OPTION> -</SELECT> <INPUT type=checkbox name="tab_obs_mode"><small> </small><b><a href="/eso/eso_archive_help.html#SV"><abbr title="obs_mode: ">SV Mode</abbr></a>:</b> <SELECT id="obs_mode" name="obs_mode" style="vertical-align: middle" ><OPTION value="%"> All modes</OPTION> -<OPTION value="s"> Service</OPTION> -<OPTION value="v"> Visitor</OPTION> -</SELECT> -<INPUT type=checkbox name="tab_pi_coi"><small> </small><b><a href="/eso/eso_archive_help.html#PI_CoI"><abbr title="pi_coi: ">PI/CoI</abbr></a>............................:</b> <INPUT name="pi_coi" size="21" placeholder=""> <select name=pi_coi_name> -<option value=PI_only>as PI only -<option value=none>as PI or CoI -</select> -<INPUT type=checkbox name="tab_prog_title"><small> </small><b><a href="/eso/eso_archive_help.html#Title"><abbr title="prog_title: ">Proposal Title</abbr></a>....................:</b> <INPUT name="prog_title" size="21" placeholder=""> -<table class="html_attr" width="100%"><tr><th>Generic File Information</th></tr></table><INPUT type=checkbox checked name="tab_dp_id"><small> </small><b><a href="/eso/eso_archive_help.html#DP_ID"><abbr title="dp_id: Dataset ID">DP.ID</abbr></a>.............................:</b> <INPUT name="dp_id" size="21" placeholder=""> <i>archive filename of FITS file (e.g. AMBER.2010-09-04T09:40:45.174)</i> -<INPUT type=checkbox checked name="tab_ob_id"><small> </small><b><a href="/eso/eso_archive_help.html#OB_ID"><abbr title="ob_id: The OB identifier, a unique numeric ID assigned to the Observation Block by the Observation Handling System">OB.ID</abbr></a>.............................:</b> <INPUT name="ob_id" size="10" placeholder=""> <i>identification number of OB within ESO system</i> -<INPUT type=checkbox name="tab_obs_targ_name"><small> </small><b><abbr title="obs_targ_name: Observation block target name">OBS.TARG.NAME</abbr>.....................:</b> <INPUT name="obs_targ_name" size="21" placeholder=""> <i>Observation block target name</i> -<p><INPUT type=checkbox checked name="tab_dp_cat"><small> </small><b><a href="/eso/eso_archive_help.html#DPR_category"><abbr title="dp_cat: Observation category">DPR.CATG</abbr></a>..........................:</b> <SELECT id="dp_cat" name="dp_cat" style="vertical-align: middle" ><OPTION value="%"> Any</OPTION> -<OPTION value="CALIB"> CALIB</OPTION> -<OPTION value="SCIENCE"> SCIENCE</OPTION> -</SELECT> <i>Data category (e.g. SCIENCE)</i> -<INPUT type=checkbox checked name="tab_dp_type"><small> </small><b><a href="/eso/eso_archive_help.html#DPR_Type"><abbr title="dp_type: Type of observation/exposure">DPR.TYPE</abbr></a>..........................:</b> <SELECT id="dp_type" name="dp_type" style="vertical-align: middle" ><OPTION value="%"> Any</OPTION> -<OPTION value="DETDARK% or DETFLAT% or FLAT% "> ---------Calibration files:---------</OPTION> -<OPTION value="DETDARK"> DETDARK</OPTION> -<OPTION value="DETFLAT"> DETFLAT</OPTION> -<OPTION value="FLAT"> FLAT</OPTION> -<OPTION value="BEAMPOS% or AMBER_BEAMPOS% or IMAGE% "> --------Technical files:--------</OPTION> -<OPTION value="BEAMPOS"> BEAMPOS</OPTION> -<OPTION value="AMBER_BEAMPOS"> AMBER_BEAMPOS</OPTION> -<OPTION value="IMAGE"> IMAGE</OPTION> -<OPTION value="WAVE,2TEL% or 2P2V% "> --------P2VM two telescopes files:--------</OPTION> -<OPTION value="WAVE,2TEL"> WAVE,2TEL</OPTION> -<OPTION value="2P2V"> 2P2V</OPTION> -<OPTION value="WAVE,3TEL% or 3P2V% "> --------P2VM three telescopes files:--------</OPTION> -<OPTION value="WAVE,3TEL"> WAVE,3TEL</OPTION> -<OPTION value="3P2V"> 3P2V</OPTION> -<OPTION value="OBJECT% or STD% or DARK% or SKY% "> --------Interferometry files:--------</OPTION> -<OPTION value="OBJECT"> OBJECT</OPTION> -<OPTION value="STD"> STD</OPTION> -<OPTION value="DARK"> DARK</OPTION> -<OPTION value="SKY"> SKY</OPTION> -<OPTION value="FRNSRC% or FLUX% or CPTPIST% or COHERENC% or COLPOS% or ZOFF% or SPECPOS%"> --------Acquisition files:--------</OPTION> -<OPTION value="COHERENC%"> COHERENC*</OPTION> -<OPTION value="COLPOS%"> COLPOS*</OPTION> -<OPTION value="CPTPIST%"> CPTPIST*</OPTION> -<OPTION value="FLUX%"> FLUX*</OPTION> -<OPTION value="FRNSRC%"> FRNSRC*</OPTION> -<OPTION value="SPECPOS%"> SPECPOS*</OPTION> -<OPTION value="ZOFF%"> ZOFF*</OPTION> -</SELECT> <i>Observation type</i><small> </small><small> </small><b><a href="/eso/eso_archive_help.html#DPR_Type"><abbr title="dp_type_user: You can write your own input in the "User defined input" field, where you can specify logical expressions like "2P2V or 3P2V" so to search for multiple observation types at the same time.">User defined input</abbr></a>:</b> <INPUT name="dp_type_user" size="21" placeholder=""> <i>(e.g. 2P2V or 3P2V)</i> -<INPUT type=checkbox checked name="tab_dp_tech"><small> </small><b><a href="/eso/eso_archive_help.html#DPR_Tech"><abbr title="dp_tech: Mode/technique used for the observation">DPR.TECH</abbr></a>..........................:</b> <SELECT id="dp_tech" name="dp_tech" style="vertical-align: middle" ><OPTION value="%"> Any</OPTION> -<OPTION value="IMAGE"> IMAGE</OPTION> -<OPTION value="INTERFEROMETRY"> INTERFEROMETRY</OPTION> -</SELECT> <i>Observation technique</i> <INPUT type=checkbox name="tab_interferometry"><small> </small><b><abbr title="interferometry: Tick this field to get all associated interferometry files">Request all interferometry files</abbr></b> -<p><INPUT type=checkbox name="tab_tpl_name"><small> </small><b><abbr title="tpl_name: Template name">TPL.NAME</abbr>..........................:</b> <INPUT name="tpl_name" size="21" placeholder=""> <i>AMBER template name</i> -<INPUT type=checkbox name="tab_tpl_nexp"><small> </small><b><a href="/eso/eso_archive_help.html#TPL_NEXP"><abbr title="tpl_nexp: Total number of exposures within template">TPL.NEXP</abbr></a>..........................:</b> <INPUT name="tpl_nexp" size="10" placeholder=""> <i>total number of exposures within the template</i> -<INPUT type=checkbox name="tab_tpl_start"><small> </small><b><a href="/eso/eso_archive_help.html#TPL_START"><abbr title="tpl_start: starting time of template (UT)">TPL.START</abbr></a>.........................:</b> <INPUT name="tpl_start" size="20" placeholder=""> <i>starting time of template (UT)</i> -<table class="html_attr" width="100%"><tr><th>Instrument Specific Information</th></tr></table><INPUT type=checkbox name="tab_del_ft_sensor"><small> </small><b><a href="http://www.eso.org/sci/facilities/paranal/telescopes/vlti/subsystems/finito/"><abbr title="del_ft_sensor: Fringe Tracker Sensor Name">DEL.FT.SENSOR</abbr></a>.....................:</b> <SELECT id="del_ft_sensor" name="del_ft_sensor" style="vertical-align: middle" ><OPTION value="%"> Any</OPTION> -<OPTION value="FINITO"> FINITO</OPTION> -<OPTION value="NONE"> NONE</OPTION> -</SELECT> <i> Fringe Tracker Sensor Name</i> -<INPUT type=checkbox name="tab_del_ft_status"><small> </small><b><abbr title="del_ft_status: Fringe Tracker Status">DEL.FT.STATUS</abbr>.....................:</b> <SELECT id="del_ft_status" name="del_ft_status" style="vertical-align: middle" ><OPTION value="%"> Any</OPTION> -<OPTION value="ON"> ON</OPTION> -<OPTION value="OFF"> OFF</OPTION> -</SELECT> <i> Fringe Tracker Status (could be ON or OFF)</i> -<INPUT type=checkbox name="tab_det_ntel"><small> </small><b><abbr title="det_ntel: number of telescopes">DET.NTEL</abbr>..........................:</b> <INPUT name="det_ntel" size="10" placeholder=""> <i>Number of telescopes</i> -<INPUT type=checkbox checked name="tab_iss_conf_station1"><small> </small><b><a href="http://www.eso.org/sci/facilities/paranal/telescopes/vlti/configuration/"><abbr title="iss_conf_station1: Station of telescope 1">ISS.CONF.STATION1</abbr></a>.................:</b> <SELECT id="iss_conf_station1" name="iss_conf_station1" style="vertical-align: middle" ><OPTION value="%"> Any</OPTION> -<optgroup label="-----"></optgroup> -<OPTION value="U1"> UT1</OPTION> -<OPTION value="U2"> UT2</OPTION> -<OPTION value="U3"> UT3</OPTION> -<OPTION value="U4"> UT4</OPTION> -<optgroup label="-----"></optgroup> -<OPTION value="A0"> A0</OPTION> -<OPTION value="A1"> A1</OPTION> -<OPTION value="B0"> B0</OPTION> -<OPTION value="B1"> B1</OPTION> -<OPTION value="B2"> B2</OPTION> -<OPTION value="B3"> B3</OPTION> -<OPTION value="B4"> B4</OPTION> -<OPTION value="B5"> B5</OPTION> -<OPTION value="C0"> C0</OPTION> -<OPTION value="C1"> C1</OPTION> -<OPTION value="C2"> C2</OPTION> -<OPTION value="C3"> C3</OPTION> -<OPTION value="D0"> D0</OPTION> -<OPTION value="D1"> D1</OPTION> -<OPTION value="D2"> D2</OPTION> -<OPTION value="E0"> E0</OPTION> -<OPTION value="G0"> G0</OPTION> -<OPTION value="G1"> G1</OPTION> -<OPTION value="G2"> G2</OPTION> -<OPTION value="H0"> H0</OPTION> -<OPTION value="I1"> I1</OPTION> -<OPTION value="J1"> J1</OPTION> -<OPTION value="J2"> J2</OPTION> -<OPTION value="J3"> J3</OPTION> -<OPTION value="J4"> J4</OPTION> -<OPTION value="J5"> J5</OPTION> -<OPTION value="J6"> J6</OPTION> -<OPTION value="K0"> K0</OPTION> -<OPTION value="L0"> L0</OPTION> -<OPTION value="M0"> M0</OPTION> -</SELECT> <i>Station of telescope 1</i> -<INPUT type=checkbox checked name="tab_iss_conf_station2"><small> </small><b><a href="http://www.eso.org/sci/facilities/paranal/telescopes/vlti/configuration/"><abbr title="iss_conf_station2: Station of telescope 2">ISS.CONF.STATION2</abbr></a>.................:</b> <SELECT id="iss_conf_station2" name="iss_conf_station2" style="vertical-align: middle" ><OPTION value="%"> Any</OPTION> -<optgroup label="-----"></optgroup> -<OPTION value="U1"> UT1</OPTION> -<OPTION value="U2"> UT2</OPTION> -<OPTION value="U3"> UT3</OPTION> -<OPTION value="U4"> UT4</OPTION> -<optgroup label="-----"></optgroup> -<OPTION value="A0"> A0</OPTION> -<OPTION value="A1"> A1</OPTION> -<OPTION value="B0"> B0</OPTION> -<OPTION value="B1"> B1</OPTION> -<OPTION value="B2"> B2</OPTION> -<OPTION value="B3"> B3</OPTION> -<OPTION value="B4"> B4</OPTION> -<OPTION value="B5"> B5</OPTION> -<OPTION value="C0"> C0</OPTION> -<OPTION value="C1"> C1</OPTION> -<OPTION value="C2"> C2</OPTION> -<OPTION value="C3"> C3</OPTION> -<OPTION value="D0"> D0</OPTION> -<OPTION value="D1"> D1</OPTION> -<OPTION value="D2"> D2</OPTION> -<OPTION value="E0"> E0</OPTION> -<OPTION value="G0"> G0</OPTION> -<OPTION value="G1"> G1</OPTION> -<OPTION value="G2"> G2</OPTION> -<OPTION value="H0"> H0</OPTION> -<OPTION value="I1"> I1</OPTION> -<OPTION value="J1"> J1</OPTION> -<OPTION value="J2"> J2</OPTION> -<OPTION value="J3"> J3</OPTION> -<OPTION value="J4"> J4</OPTION> -<OPTION value="J5"> J5</OPTION> -<OPTION value="J6"> J6</OPTION> -<OPTION value="K0"> K0</OPTION> -<OPTION value="L0"> L0</OPTION> -<OPTION value="M0"> M0</OPTION> -</SELECT> <i>Station of telescope 2</i> -<INPUT type=checkbox checked name="tab_iss_conf_station3"><small> </small><b><a href="http://www.eso.org/sci/facilities/paranal/telescopes/vlti/configuration/"><abbr title="iss_conf_station3: Station of telescope 3">ISS.CONF.STATION3</abbr></a>.................:</b> <SELECT id="iss_conf_station3" name="iss_conf_station3" style="vertical-align: middle" ><OPTION value="%"> Any</OPTION> -<optgroup label="-----"></optgroup> -<OPTION value="U1"> UT1</OPTION> -<OPTION value="U2"> UT2</OPTION> -<OPTION value="U3"> UT3</OPTION> -<OPTION value="U4"> UT4</OPTION> -<optgroup label="-----"></optgroup> -<OPTION value="A0"> A0</OPTION> -<OPTION value="A1"> A1</OPTION> -<OPTION value="B0"> B0</OPTION> -<OPTION value="B1"> B1</OPTION> -<OPTION value="B2"> B2</OPTION> -<OPTION value="B3"> B3</OPTION> -<OPTION value="B4"> B4</OPTION> -<OPTION value="B5"> B5</OPTION> -<OPTION value="C0"> C0</OPTION> -<OPTION value="C1"> C1</OPTION> -<OPTION value="C2"> C2</OPTION> -<OPTION value="C3"> C3</OPTION> -<OPTION value="D0"> D0</OPTION> -<OPTION value="D1"> D1</OPTION> -<OPTION value="D2"> D2</OPTION> -<OPTION value="E0"> E0</OPTION> -<OPTION value="G0"> G0</OPTION> -<OPTION value="G1"> G1</OPTION> -<OPTION value="G2"> G2</OPTION> -<OPTION value="H0"> H0</OPTION> -<OPTION value="I1"> I1</OPTION> -<OPTION value="J1"> J1</OPTION> -<OPTION value="J2"> J2</OPTION> -<OPTION value="J3"> J3</OPTION> -<OPTION value="J4"> J4</OPTION> -<OPTION value="J5"> J5</OPTION> -<OPTION value="J6"> J6</OPTION> -<OPTION value="K0"> K0</OPTION> -<OPTION value="L0"> L0</OPTION> -<OPTION value="M0"> M0</OPTION> -</SELECT> <i>Station of telescope 3</i> -<INPUT type=checkbox name="tab_ocs_obs_mode"><small> </small><b><abbr title="ocs_obs_mode: Observation mode">OCS.OBS.MODE</abbr>......................:</b> <SELECT id="ocs_obs_mode" name="ocs_obs_mode" style="vertical-align: middle" ><OPTION value="%"> Any</OPTION> -<OPTION value="2T"> 2 telescopes</OPTION> -<OPTION value="3T"> 3 telescopes</OPTION> -</SELECT> <i>Observation mode</i> -<INPUT type=checkbox name="tab_ocs_obs_specconf"><small> </small><b><a href="http://www.eso.org/sci/facilities/paranal/instruments/amber/inst/"><abbr title="ocs_obs_specconf: Spectral configuration">OCS.OBS.SPECCONF</abbr></a>..................:</b> <SELECT id="ocs_obs_specconf" name="ocs_obs_specconf" style="vertical-align: middle" ><OPTION value="%"> Any</OPTION> -<OPTION value="Low%"> Low</OPTION> -<OPTION value="Medium%"> Medium</OPTION> -<OPTION value="High%"> High</OPTION> -</SELECT> <i>Spectral Configuration</i> -<INPUT type=checkbox name="tab_ocs_obs_type"><small> </small><b><abbr title="ocs_obs_type: Observation type">OCS.OBS.TYPE</abbr>......................:</b> <INPUT name="ocs_obs_type" size="20" placeholder=""> <i>Observation type</i> -<INPUT type=checkbox checked name="tab_ins_grat1_wlen"><small> </small><b><a href="http://www.eso.org/sci/facilities/paranal/instruments/amber/inst/"><abbr title="ins_grat1_wlen: Grating central wavelength [nm]">INS.GRAT1.WLEN</abbr></a>....................:</b> <INPUT name="ins_grat1_wlen" size="20" placeholder=""> <i>Grating central wavelength [nm]</i> -<table class="html_attr" width="100%"><tr><th>Ambient Parameters</th></tr></table><INPUT type=checkbox checked name="tab_fwhm_avg"><small> </small><b><a href="/eso/eso_archive_help.html#DIMM-Savg"><abbr title="fwhm_avg: ">DIMM S-avg</abbr></a>........................:</b> <INPUT name="fwhm_avg" size="12" placeholder=""> <i>[arcsec] DIMM Seeing average over the exposure (FWHM at 0.5mue)</i> -<INPUT type=checkbox name="tab_airmass_range"><small> </small><b><a href="/eso/eso_archive_help.html#Airmass"><abbr title="airmass_range: ">Airmass</abbr></a>...........................:</b> <INPUT name="airmass_range" size="10" placeholder=""> <i>+/- 0.1</i> -<INPUT type=checkbox name="tab_night_flag"><small> </small><b><a href="/eso/eso_archive_help.html#Airmass"><abbr title="night_flag: ">Night?</abbr></a>............................:</b> <SELECT id="night_flag" name="night_flag" style="vertical-align: middle" ><OPTION value="%"> Any</OPTION> -<OPTION value="0"> Night</OPTION> -<OPTION value="1"> Twilight</OPTION> -<OPTION value="2"> Daytime</OPTION> -</SELECT> <i>Night Exposure ?</i> -<INPUT type=checkbox name="tab_moon_illu"><small> </small><b><abbr title="moon_illu: ">Moon Illumination</abbr>.................:</b> <INPUT name="moon_illu" size="20" placeholder=""> <i>Moon illumination during the exposure (percentage, negative when moon below the horizon)</i> -<table class="html_attr" width="100%"><tr><th>Result set</th></tr></table><small> </small><small> </small><b><abbr title="order: ">Sort by</abbr>...........................:</b> <SELECT id="order" name="order" style="vertical-align: middle" ><OPTION value=""""> nothing (faster)</OPTION> -<OPTION value="dp_id"> Observation Time</OPTION> -<OPTION value="dp_cat"> DPR.CATG</OPTION> -<OPTION value="dp_tech"> DPR.TECH</OPTION> -<OPTION value="tpl_start"> TPL.START</OPTION> -<OPTION value="ob_id asc"> OB.ID (ascending)</OPTION> -<OPTION value="ob_id desc"> OB.ID (descending)</OPTION> -<OPTION value="period asc,prog_id asc"> Period and Run ID (earliest first)</OPTION> -<OPTION value="period desc,prog_id desc"> Period and Run ID (latest first)</OPTION> -</SELECT></pre> <table width="100%"><tr><td align="center" bgcolor="#aaaaaa"><font color="#ffffff" size="+1"> <b><a href="/wdb/html/wdb_query_help.html#ctrl">Extra Columns on Tabular Output</a></b></font></td></tr></table><SELECT id="extra_columns" name="extra_columns" size="2" multiple> -<option value="uploaded_target">Uploaded target</option> -</SELECT> - <hr> - <div id="wdb_optional_output_modes"> - <INPUT type=checkbox name="force_tabular_mode" > - Use tabular output even if only one row is returned.<br> - <INPUT type=checkbox name="full_screen_mode" > - Use full-screen output even if more than one row is returned.<br> - </div><!-- closing wdb_optional_output_modes ***************************** --> - -</FORM><div id="wdb_conf_tail"> -<center> -<!-- bottom navigator: home, help etc. put on a table so that they - fill out the full column --> - <table border="0" cellpadding="2" cellspacing="5"> - <tr> - <td width="33%" align="center" bgcolor="#006699"> - <a href="http://www.eso.org/"><font color="white" size="1"> - <strong>ESO HOME</strong></font></a></td> - <td width="33%" align="center" bgcolor="#006699"> - <a href="http://archive.eso.org/"><font color="white" size="1"> - <strong>ARCHIVE HOME</strong></font></a></td> - <td width="33%" align="center" bgcolor="#006699"> - <a href="http://archive.eso.org/cms/faq.html"><font color="white" size="1"> - <strong>ARCHIVE FAQ</strong></font></a></td> - </tr> - <tr> - <td colspan="3" align="center"> - <a href="/wdb/wdb.html">wdb 3.0h</a> - 21-JUL-2017 ...... - <a href="mailto:archive@eso.org?subject=wdb_form:amber"> - <font size="1"><strong>Send comments to archive@eso.org - </strong></font></a></td> - </tr> - </table><!-- END bottom navigator --> -</center> -</div><!-- end of wdb_conf_tail --> -</BODY> -</html> 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/fd303fa27993048bd2393af067fe5ceccf4817c288ce5c0b4343386f.pickle b/astroquery/eso/tests/data/fd303fa27993048bd2393af067fe5ceccf4817c288ce5c0b4343386f.pickle new file mode 100644 index 0000000000..4942655450 Binary files /dev/null and b/astroquery/eso/tests/data/fd303fa27993048bd2393af067fe5ceccf4817c288ce5c0b4343386f.pickle differ 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 @@ -<!DOCTYPE html> -<HTML> -<HEAD> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<TITLE>ESO Archive Raw Data</TITLE> -<link rel="stylesheet" type="text/css" href="/wdb/css/wdb.css"> -<link href="http://www.eso.org/public/archives/favicon.ico" rel="shortcut icon"> -<script src="/wdb/jslib/jquery/1.8.3/jquery.min.js"></script> -<script type="text/javascript"><!-- -$(document).ready( function() { -changeLabels(); -$("#myreset").click(function(){ -$("#coord_sys").val('eq'); -changeLabels(); -$("#dp_type").attr("disabled", false); -$("#dp_tech").attr("disabled", false); -$("#dp_cat").attr("disabled", false); -}); -$("[name=dp_type_user]").change(function(){ -$("#dp_type").attr("disabled", true); -}).blur(function() { -if($("[name=dp_type_user]").val().length == 0) { -$("#dp_type").attr("disabled", false); -} else { -$("#dp_type option:first").attr('selected','selected'); -} -}); -$("[name=dp_tech_user]").change(function(){ -$("#dp_tech").attr("disabled", true); -}).blur(function() { -if($("[name=dp_tech_user]").val().length == 0) { -$("#dp_tech").attr("disabled", false); -} else { -$("#dp_tech option:first").attr('selected','selected'); -} -}); -$("[name=dp_cat_user]").change(function(){ -$("#dp_cat").attr("disabled", true); -}).blur(function() { -if($("[name=dp_cat_user]").val().length == 0) { -$("#dp_cat").attr("disabled", false); -} else { -$("#dp_cat option:first").attr('selected','selected'); -} -}); -// Function to truncate text (Read More, Read Less) is applied to any element of the class textContainer_Truncate -// line height in 'px' is set to 44, height which is currently hardcoded for all elements. -var maxheightText=12; -var showText = "[+] Read more ..."; -var hideText = "[-] Read less"; -jQuery('.textContainer_Truncate').each(function () { -truncate_text( this, maxheightText, showText, hideText, "" ); -}); -}); -function changeLabels() -{ -var coordsys=$("#coord_sys").val(); -var label1="RA"; -var label2="DEC"; -var unitlabel_coord1="RA: sexagesimal/hours, decimal/degrees"; -if (coordsys == "gal") -{ -label1="l "; -label2="b "; -unitlabel_coord1="both degrees whether sexagesimal or decimal"; -} -$('#coord1_label').html(label1); -$('#coord2_label').html(label2); -$('#unitlabel_coord1').html(unitlabel_coord1); -//document.getElementById("coord1_label").innerHTML = label1; -//document.getElementById("coord2_label").innerHTML = label2; -//document.getElementById("unitlabel_coord1").innerHTML = unitlabel_coord1; -} -function resetLabels() -{ -var label1="RA"; -var label2="DEC"; -var unitlabel_coord1="RA: sexagesimal/hours, decimal/degrees"; -$('#coord1_label').html(label1); -$('#coord2_label').html(label2); -$('#unitlabel_coord1').html(unitlabel_coord1); -} -function truncate_text( obj, maxheight, more_label, less_label, urltarget) -{ -var text = jQuery(obj); -if (text.height() > maxheight){ -text.css({ 'overflow': 'hidden','height': maxheight + 'px' }); -var link = jQuery('<a style="color:rgb(150,0,96); text-decoration:none; font-size: 75%; font-weight: bold;" href="#' + urltarget + '">' + more_label + '</a>'); -var linkDiv = jQuery('<div></div>'); -linkDiv.append(link); -jQuery(obj).after(linkDiv); -link.click(function (event) { -event.preventDefault(); -if (text.height() > maxheight) { -jQuery(this).html(more_label); -text.css('height', maxheight + 'px'); -} else { -jQuery(this).html(less_label); -text.css('height', 'auto'); -} -}); -} -} -//--> -</SCRIPT> -<script type="text/javascript" src="/wdb/jslib/wdb_query_functions.js"></script> -</HEAD> -<BODY onunload="" id="public"> -<div id='raw_div_headingtable'> -<table id='raw_headingtable' align="center" width="100%" border="0"> -<tr valign="middle"> -<td colspan="1" rowspan="2" class="partners" align="left" style="white-space: nowrap;"><a href="http://www.eso.org"><img src="/wdb/images/eso-logo.gif" height="100" alt="ESO" title="ESO Homepage"></a></td> -<td colspan="7" align="center"><span class="raw_hide_public_show_cas saf_raw_watermark">SPECIAL ACCESS<br></span><span class="saf_raw_watermark">SCIENCE ARCHIVE FACILITY</span></td> -<td colspan="3" align="right"><span style="font-weight: bold; font-size: 200%; white-space: nowrap;">Observational Raw Data<br>Query Form</span></td> -</tr> -<tr> -<td colspan="9" align="right"> -<table cellpadding="2" cellspacing="2" border="0" class="raw_header"> -<tr align="right" valign="middle" style="white-space: nowrap;"> -<td align="middle"><a href="/eso/eso_archive_help.html">How to use?</a></td> -<td align="middle"> -<span style="margin: 3px; color: black; text-decoration: none" class="raw_show_public_hide_cas"><A href="http://archive.eso.org/cms/eso-data/instrument-specific-query-forms.html">Instrument-specific Interfaces</a></span> -<span style="margin: 3px; color: white; text-decoration: none" class="raw_hide_public_show_cas"><A href="http://archive.eso.org/cms/eso-data/instrument-specific-query-forms-special-access.html">Instruments-specific Interfaces</a></span> -</td> -<td align="middle"><a href="http://archive.eso.org/cms/eso-data.html">ESO Archive Overview</a></td> -<td align="middle"><a href="/faq.html">Archive FAQ</a></td> -<td align="middle"><a href="/">Archive Facility HOME</a></td> -<td align="middle"><a href="http://www.eso.org/">ESO HOME</a></td> -</tr> -</table> -</td> -</tr> -</table> -</div> -<hr><table width="100%"> -<tr><td align="center" bgcolor="aaaaaa"> -<font color="ffffff" size="+1"><b>Description</b></font> -</td></tr></table><p> -To request data you have to <a -href="/register/new">register as an -ESO/ST-ECF Archive user</a>. A request can be submitted -following the instructions in the results table. <br> -<FORM id="queryform" ACTION="/wdb/wdb/eso/eso_archive_main/query" METHOD="POST" ENCTYPE="multipart/form-data"> -<div id="wdb_top_menu" class="wdb_top_menu"><fieldset class="fs_top_menu"> <table id="wdb_top_menu_table" width="100%" cellpadding=5 cellspacing=0 border=0><tr valign="middle"> <td align="left" valign="middle" style="width: 25%; white-space: nowrap;"> - <input id="search" type="submit" class="ibsearch" value="Search"> - <input id="myreset" type="reset" style="width: 7em;" value="Reset" onClick="wdb_showall_toggler($('#wdb_tabbit'),'All Fields','Default Fields','reset')"></td><td style="width: 50%; white-space: nowrap;"> -<div id="wdb_preferences_container" class="wdb_preferences_container"> -<div id="wdb_preferences" class="wdb_preferences">Output preferences: <SELECT name="wdbo"><OPTION VALUE="html/display" selected="selected">html table</OPTION><OPTION VALUE="voview/display">voview</OPTION><OPTION VALUE="ascii/display">ascii fixed length/display</OPTION><OPTION VALUE="ascii/download">ascii fixed length/download</OPTION><OPTION VALUE="csv/download">ascii csv/download</OPTION><OPTION VALUE="tsv/display">ascii tsv/display</OPTION><OPTION VALUE="tsv/download">ascii tsv/download</OPTION><OPTION VALUE="votable/display">votable/display</OPTION><OPTION VALUE="votable/download">votable/download</OPTION></SELECT> -</div> -<div id="wdb_max_records" class="wdb_max_records"> Return max <INPUT VALUE="100" SIZE="5" NAME="max_rows_returned"> rows.</div><input type="button" id="wdb_tabbit" class="wdb_tabbit" style="margin-left: 2em;" onClick="wdb_showall_toggler(this,'All Fields','Default Fields');" value="All Fields"></div><!-- closing div wdb_preferences_container ***************************************************************** --></td><td align="right" style="width: 25%; white-space: nowrap;"><input type="button" id="ib_query_syntax" value="Syntax Help" onClick="wdb_query_syntax(this,'/wdb/html/wdb_query_syntax_quick.html')"></td></tr></table><p id="wdb_query_syntax" class="wdb_query_syntax"></p></fieldset></div><!-- closing div wdb_top_menu ***************************************************************** --><p> -<pre><INPUT type=checkbox name="tab_wdb_input_file"><small> </small><b><abbr title="wdb_input_file: ">Input File</abbr>..........:</b> <INPUT name="wdb_input_file" type="file" value="" > -<INPUT type=checkbox name="tab_export"><small> </small><b><abbr title="export: ">Export</abbr>:</b> -<INPUT type=checkbox checked name="tab_HDR"><small> </small><b><a href="/eso/eso_archive_help.html#Header"><abbr title="HDR: ">HDR</abbr></a>:</b> -<small> </small><small> </small><b><abbr title="note: User input notes/comments">Note</abbr>................:</b> <INPUT name="note" size="10" placeholder=""> -<table class="html_attr" width="100%"><tr><th>Target Information</th></tr></table><p><small> </small><small> </small><b><a href="/eso/eso_archive_help.html#Target"><abbr title="target: ">Target</abbr></a>..............:</b> <INPUT name="target" size="22" placeholder=""> <select name=resolver> -<option value=simbad>SIMBAD name -<option value=ned>NED name -<option value=none>OBJECT as specified by the observer -</select> -<small> </small><small> </small><b><a href="/eso/eso_archive_help.html#Search_Box"><abbr title="box: ">Search Box</abbr></a>..........:</b> <INPUT name="box" size="10" value="00 10 00" onblur="if(this.value == '') { this.value='00 10 00'}" onfocus="if(this.value == '00 10 00') { this.value = ''; }"> <b><i>If Simbad/Ned name or coordinates given</i></b> -<small> </small><small> </small><b><a href="/eso/eso_archive_help.html#RA"><abbr title="ra: Right Ascension">RA</abbr></a>..................:</b> <INPUT name="ra" size="11" placeholder=""><small> </small><small> </small><b><abbr title="deg_or_hour: ">Format</abbr>:</b> <SELECT id="deg_or_hour" name="deg_or_hour" style="vertical-align: middle" ><OPTION value="hours"> RA(h) DEC(deg)</OPTION> -<OPTION value="degrees"> RA(deg) DEC(deg)</OPTION> -</SELECT> <i>J2000 (RA 05 34;Dec +22)</i> -<small> </small><small> </small><b><a href="/eso/eso_archive_help.html#DEC"><abbr title="dec: Declination">DEC</abbr></a>.................:</b> <INPUT name="dec" size="11" placeholder=""> <i>(J2000)</i> -<INPUT type=checkbox checked name="tab_target_coord"><small> </small><b><a href="/eso/eso_archive_help.html#Output"><abbr title="target_coord: ">Target Ra, Dec</abbr></a>:</b> -<small> </small><small> </small><b><a href="/eso/eso_archive_help.html#Output"><abbr title="format: ">Output Format</abbr></a>.......:</b> <SELECT id="format" name="format" style="vertical-align: middle" ><OPTION value="SexaHour"> Sexagesimal (hour)</OPTION> -<OPTION value="DecimDeg"> Decimal (degree)</OPTION> -<OPTION value="SexaDeg"> Sexagesimal (degree)</OPTION> -<OPTION value="DecimHour"> Decimal (hour)</OPTION> -</SELECT> -<INPUT type=checkbox checked name="tab_stat_plot"><small> </small><b><abbr title="stat_plot: ">Stat PLOT</abbr>:</b> -<small> </small><small> </small><b><abbr title="oformat: ">Export File Format</abbr>..:</b> <SELECT id="oformat" name="oformat" style="vertical-align: middle" ><OPTION value="tab"> Tab-Separated-Values</OPTION> -<OPTION value="pipe"> |-Separated-Values</OPTION> -<OPTION value="csv"> Comma-Separated-Values</OPTION> -<OPTION value="votable"> VOTable</OPTION> -</SELECT> -<INPUT type=checkbox name="tab_night"><small> </small><b><a href="/eso/eso_archive_help.html#Night"><abbr title="night: Night">Night</abbr></a>...............:</b> <INPUT name="night" size="20" placeholder=""> <i>(YYYY MM(M) DD of night begin [12:00 UT], DD MM(M) YYYY also acceptable)</i> -<small> </small><small> </small><b><abbr title="nightlog: ">nightlog</abbr>............:</b> <INPUT name="nightlog" size="" placeholder=""> - <i>OR give a query range using the following start/end dates:</i><br><small> </small><small> </small><b><a href="/eso/eso_archive_help.html#Start"><abbr title="stime: ">Start</abbr></a>...............:</b> <INPUT name="stime" size="10" placeholder=""> <select name=starttime> -<option value=00>00 hrs [UT] -<option value=01>01 hrs [UT] -<option value=02>02 hrs [UT] -<option value=03>03 hrs [UT] -<option value=04>04 hrs [UT] -<option value=05>05 hrs [UT] -<option value=06>06 hrs [UT] -<option value=07>07 hrs [UT] -<option value=08>08 hrs [UT] -<option value=09>09 hrs [UT] -<option value=10>10 hrs [UT] -<option value=11>11 hrs [UT] -<option value=12 selected>12 hrs [UT] -<option value=13>13 hrs [UT] -<option value=14>14 hrs [UT] -<option value=15>15 hrs [UT] -<option value=16>16 hrs [UT] -<option value=17>17 hrs [UT] -<option value=18>18 hrs [UT] -<option value=19>19 hrs [UT] -<option value=20>20 hrs [UT] -<option value=21>21 hrs [UT] -<option value=22>22 hrs [UT] -<option value=23>23 hrs [UT] -<option value=24>24 hrs [UT] -</select><small> </small><small> </small><b><a href="/eso/eso_archive_help.html#End"><abbr title="etime: ">End</abbr></a>:</b> <INPUT name="etime" size="10" placeholder=""> <select name=endtime> -<option value=00>00 hrs [UT] -<option value=01>01 hrs [UT] -<option value=02>02 hrs [UT] -<option value=03>03 hrs [UT] -<option value=04>04 hrs [UT] -<option value=05>05 hrs [UT] -<option value=06>06 hrs [UT] -<option value=07>07 hrs [UT] -<option value=08>08 hrs [UT] -<option value=09>09 hrs [UT] -<option value=10>10 hrs [UT] -<option value=11>11 hrs [UT] -<option value=12 selected>12 hrs [UT] -<option value=13>13 hrs [UT] -<option value=14>14 hrs [UT] -<option value=15>15 hrs [UT] -<option value=16>16 hrs [UT] -<option value=17>17 hrs [UT] -<option value=18>18 hrs [UT] -<option value=19>19 hrs [UT] -<option value=20>20 hrs [UT] -<option value=21>21 hrs [UT] -<option value=22>22 hrs [UT] -<option value=23>23 hrs [UT] -<option value=24>24 hrs [UT] -</select> -<table class="html_attr" width="100%"><tr><th>Program Information</th></tr></table><INPUT type=checkbox checked name="tab_prog_id"><small> </small><b><a href="/eso/eso_archive_help.html#Prog_ID"><abbr title="prog_id: ESO program identification code">Program_ID</abbr></a>..........:</b> <INPUT name="prog_id" size="13" placeholder=""> -<small> </small><small> </small><b><abbr title="survey: Nickname of the Public Survey hosting this program.">survey</abbr>..............:</b> <INPUT name="survey" size="11" placeholder=""> -<INPUT type=checkbox name="tab_pi_coi"><small> </small><b><a href="/eso/eso_archive_help.html#PI_CoI"><abbr title="pi_coi: Names of the Principal and Co-Investigators">PI/CoI</abbr></a>..............:</b> <INPUT name="pi_coi" size="35" placeholder=""> -<INPUT type=checkbox name="tab_obs_mode"><small> </small><b><a href="/eso/eso_archive_help.html#SV"><abbr title="obs_mode: Service or Visitor mode">s/v</abbr></a>.................:</b> <SELECT id="obs_mode" name="obs_mode" style="vertical-align: middle" ><OPTION value="%"> Any</OPTION> -<OPTION value="s"> Service</OPTION> -<OPTION value="v"> Visitor</OPTION> -</SELECT> -<INPUT type=checkbox name="tab_title"><small> </small><b><a href="/eso/eso_archive_help.html#Title"><abbr title="title: Title of the proposal">Title</abbr></a>...............:</b> <INPUT name="title" size="35" placeholder=""> -<INPUT type=checkbox name="tab_gto"><small> </small><b><a href="/eso/eso_archive_help.html#Program_Type"><abbr title="gto: Program type">Prog_Type</abbr></a>...........:</b> <SELECT id="gto" name="gto" style="vertical-align: middle" ><OPTION value="%"> any</OPTION> -<OPTION value="0"> Normal</OPTION> -<OPTION value="1"> GTO</OPTION> -<OPTION value="2"> DDT</OPTION> -<OPTION value="3"> ToO</OPTION> -<OPTION value="4"> Large</OPTION> -<OPTION value="5"> Short</OPTION> -<OPTION value="6"> Calibration</OPTION> -<OPTION value="7"> Monitoring</OPTION> -</SELECT> -<table class="html_attr" width="100%"><tr><th>Observing Information</th></tr></table><INPUT type=checkbox checked name="tab_instrument"><small> </small><b><a href="/eso/eso_archive_help.html#InsMode"><abbr title="instrument: Instrument name">Instrument</abbr></a>..........:</b> <INPUT name="instrument" size="20" placeholder=""> -<INPUT type=checkbox checked name="tab_stat_instrument"><small> </small><b><abbr title="stat_instrument: ">Stat Ins</abbr>:</b> -<INPUT type=checkbox checked name="tab_dp_cat"><small> </small><b><a href="/eso/eso_archive_help.html#DPR_category"><abbr title="dp_cat: Observation category">Category</abbr></a>............:</b> <SELECT id="dp_cat" name="dp_cat" style="vertical-align: middle" MULTIPLE SIZE=7><OPTION value="SCIENCE"> SCIENCE</OPTION> -<OPTION value="CALIB"> CALIB</OPTION> -<OPTION value="ACQUISITION"> ACQUISITION</OPTION> -<OPTION value="TECHNICAL"> TECHNICAL</OPTION> -<OPTION value="TEST"> TEST</OPTION> -<OPTION value="SIMULATION"> SIMULATION</OPTION> -<OPTION value="OTHER"> OTHER</OPTION> -</SELECT> -<INPUT type=checkbox checked name="tab_dp_type"><small> </small><b><a href="/eso/eso_archive_help.html#DPR_Type"><abbr title="dp_type: Type of observation/exposure">Type</abbr></a>................:</b> <INPUT name="dp_type" size="30" placeholder=""> -<INPUT type=checkbox checked name="tab_dp_tech"><small> </small><b><a href="/eso/eso_archive_help.html#DPR_Tech"><abbr title="dp_tech: Mode/technique used for the observation">Mode</abbr></a>................:</b> <INPUT name="dp_tech" size="30" placeholder=""> -<INPUT type=checkbox checked name="tab_dp_id"><small> </small><b><a href="/eso/eso_archive_help.html#DP_ID"><abbr title="dp_id: Dataset ID">Dataset ID</abbr></a>..........:</b> <INPUT name="dp_id" size="30" placeholder=""> -<INPUT type=checkbox name="tab_origfile"><small> </small><b><a href="/eso/eso_archive_help.html#Origfile"><abbr title="origfile: The original file name as used on the instrument workstation at the telescope">Orig Name</abbr></a>...........:</b> <INPUT name="origfile" size="30" placeholder=""> -<INPUT type=checkbox checked name="tab_rel_date"><small> </small><b><a href="/eso/eso_archive_help.html#Release_Date"><abbr title="rel_date: Release date">Release_Date</abbr></a>........:</b> <INPUT name="rel_date" size="35" placeholder=""> -<INPUT type=checkbox name="tab_obs_name"><small> </small><b><a href="/eso/eso_archive_help.html#OB_Name"><abbr title="obs_name: The name of the Observation Block">OB_Name</abbr></a>.............:</b> <INPUT name="obs_name" size="30" placeholder=""> -<INPUT type=checkbox name="tab_ob_id"><small> </small><b><a href="/eso/eso_archive_help.html#OB_ID"><abbr title="ob_id: The OB identifier, a unique numeric ID assigned to the Observation Block by the Observation Handling System">OB_ID</abbr></a>...............:</b> <INPUT name="ob_id" size="7" placeholder=""> -<INPUT type=checkbox checked name="tab_tpl_id"><small> </small><b><a href="/eso/eso_archive_help.html#TPL_ID"><abbr title="tpl_id: The observing template identifier, a unique ID assigned to a template, that is, to a pre-defined sequence of operations involving any combination of telescope, instrument and detector actions.">TPL ID</abbr></a>..............:</b> <INPUT name="tpl_id" size="35" placeholder=""> -<INPUT type=checkbox checked name="tab_tpl_start"><small> </small><b><a href="/eso/eso_archive_help.html#TPL_START"><abbr title="tpl_start: The start time of the execution of the observing template.">TPL START</abbr></a>...........:</b> <INPUT name="tpl_start" size="20" placeholder=""> -<table class="html_attr" width="100%"><tr><th>Instrumental Setup</th></tr></table><INPUT type=checkbox checked name="tab_exptime"><small> </small><b><a href="/eso/eso_archive_help.html#Exptime"><abbr title="exptime: Total exposure time on target">Exptime</abbr></a>.............:</b> <INPUT name="exptime" size="10" placeholder=""> <i>(seconds)</i> -<INPUT type=checkbox checked name="tab_stat_exptime"><small> </small><b><abbr title="stat_exptime: ">Stat Exp</abbr>:</b> -<INPUT type=checkbox checked name="tab_filter_path"><small> </small><b><a href="/eso/eso_archive_help.html#Filter"><abbr title="filter_path: Filter">Filter</abbr></a>..............:</b> <INPUT name="filter_path" size="10" placeholder=""> <i>(e.g. R*)</i> -<INPUT type=checkbox name="tab_gris_path"><small> </small><b><a href="/eso/eso_archive_help.html#Grism"><abbr title="gris_path: Grism">Grism</abbr></a>...............:</b> <INPUT name="gris_path" size="10" placeholder=""> <i>(e.g. GRIS_600*)</i> -<INPUT type=checkbox name="tab_grat_path"><small> </small><b><a href="/eso/eso_archive_help.html#Grating"><abbr title="grat_path: Grating">Grating</abbr></a>.............:</b> <INPUT name="grat_path" size="10" placeholder=""> <i>(e.g. CD*)</i> -<INPUT type=checkbox name="tab_slit_path"><small> </small><b><a href="/eso/eso_archive_help.html#Slit"><abbr title="slit_path: Slit">Slit</abbr></a>................:</b> <INPUT name="slit_path" size="10" placeholder=""> <i>(e.g. ~lslit1* [see also the help button])</i> -<table class="html_attr" width="100%"><tr><th>Extra Columns</th></tr></table><INPUT type=checkbox checked name="tab_mjd_obs"><small> </small><b><a href="/eso/eso_archive_help.html#MJD"><abbr title="mjd_obs: Modified Julian Date (JD - 2400000.5) of the start of the observation">MJD-OBS</abbr></a>:</b> -<INPUT type=checkbox checked name="tab_tel_airm_start"><small> </small><b><a href="/eso/eso_archive_help.html#Airmass"><abbr title="tel_airm_start: The airmass at the start of the observation">Airmass</abbr></a>:</b> -<INPUT type=checkbox checked name="tab_ambient"><small> </small><b><a href="/eso/eso_archive_help.html#DIMM-Savg"><abbr title="ambient: ">Ambient</abbr></a>:</b> -<INPUT type=checkbox name="tab_INFO"><small> </small><b><abbr title="INFO: ">INFO</abbr>................:</b> <INPUT name="INFO" size="" placeholder=""> -<table class="html_attr" width="100%"><tr><th>Result Set</th></tr></table><p><small> </small><small> </small><b><abbr title="order: ">Sort by</abbr>.............:</b> <SELECT id="order" name="order" style="vertical-align: middle" ><OPTION value=""""> Nothing (Faster)</OPTION> -<OPTION value="ra,dec"> RA and DEC</OPTION> -<OPTION value="dec,ra"> DEC and RA</OPTION> -<OPTION value="mjd_obs"> MJD_OBS (Observation Time)</OPTION> -<OPTION value="tpl_start"> TPL START</OPTION> -<OPTION value=""> </OPTION> -<OPTION value="tpl_start"> TPL ID and TPL START</OPTION> -<OPTION value="exptime desc"> Exposure Time (high first)</OPTION> -<OPTION value="exptime asc"> Exposure Time (low first)</OPTION> -<OPTION value="period asc,prog_id asc"> Period and Run ID (earliest first)</OPTION> -<OPTION value="period desc,prog_id desc"> Period and Run ID (latest first)</OPTION> -<OPTION value="dp_id"> Instrument and Observation Time</OPTION> -<OPTION value="ins_id"> Instrument</OPTION> -<OPTION value="filter_path"> Filter Name</OPTION> -<OPTION value="gris_path"> Grism Name</OPTION> -<OPTION value="grat_path"> Grating Name</OPTION> -<OPTION value="dp_cat"> DPR Category</OPTION> -<OPTION value="dp_tech"> Obs Mode</OPTION> -<OPTION value="rel_date"> Release Date</OPTION> -</SELECT> -<small> </small><small> </small><b><abbr title="aladin_colour: ">aladin_colour</abbr>.......:</b> <SELECT id="aladin_colour" name="aladin_colour" style="vertical-align: middle" ><OPTION value="aladin_instrument"> Instrument</OPTION> -<OPTION value="aladin_progid"> Program ID</OPTION> -</SELECT></pre> <table width="100%"><tr><td align="center" bgcolor="#aaaaaa"><font color="#ffffff" size="+1"> <b><a href="/wdb/html/wdb_query_help.html#ctrl">Extra Columns on Tabular Output</a></b></font></td></tr></table><SELECT id="extra_columns" name="extra_columns" size="3" multiple> -<option value="uploaded_target">Uploaded target</option> -<option value="distance">Distance_(deg)</option> -<option value="pos_angle">Pos._Angle_(deg)</option> -</SELECT> - <hr> - <div id="wdb_optional_output_modes"> - <INPUT type=checkbox name="force_tabular_mode" > - Use tabular output even if only one row is returned.<br> - <INPUT type=checkbox name="full_screen_mode" > - Use full-screen output even if more than one row is returned.<br> - </div><!-- closing wdb_optional_output_modes ***************************** --> - -</FORM><div id="wdb_conf_tail"> -<center> -<!-- bottom navigator: home, help etc. put on a table so that they - fill out the full column --> - <table border="0" cellpadding="2" cellspacing="5"> - <tr> - <td width="33%" align="center" bgcolor="#006699"> - <a href="http://www.eso.org/"><font color="white" size="1"> - <strong>ESO HOME</strong></font></a></td> - <td width="33%" align="center" bgcolor="#006699"> - <a href="http://archive.eso.org/"><font color="white" size="1"> - <strong>ARCHIVE HOME</strong></font></a></td> - <td width="33%" align="center" bgcolor="#006699"> - <a href="http://archive.eso.org/cms/faq.html"><font color="white" size="1"> - <strong>ARCHIVE FAQ</strong></font></a></td> - </tr> - <tr> - <td colspan="3" align="center"> - <a href="/wdb/wdb.html">wdb 3.0h</a> - 21-JUL-2017 ...... - <a href="mailto:archive@eso.org?subject=wdb_form:eso_archive_main"> - <font size="1"><strong>Send comments to archive@eso.org - </strong></font></a></td> - </tr> - </table><!-- END bottom navigator --> -</center> -</div><!-- end of wdb_conf_tail --> -</BODY> -</html> 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_list_collections.pickle b/astroquery/eso/tests/data/query_list_collections.pickle new file mode 100644 index 0000000000..d1c14d43c5 Binary files /dev/null and b/astroquery/eso/tests/data/query_list_collections.pickle differ diff --git a/astroquery/eso/tests/data/query_list_instruments.pickle b/astroquery/eso/tests/data/query_list_instruments.pickle new file mode 100644 index 0000000000..096b11a815 Binary files /dev/null and b/astroquery/eso/tests/data/query_list_instruments.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 @@ -<!DOCTYPE html> -<HTML> -<HEAD> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<TITLE>ESO Science Archive - Data Products</TITLE> -<link rel="stylesheet" type="text/css" href="/wdb/css/wdb.css"> -<link rel="stylesheet" type="text/css" href="/wdb/css/jquery.multiselect.css"> -<link href="http://www.eso.org/public/archives/favicon.ico" rel="shortcut icon"> -<script src="/wdb/jslib/jquery/1.8.3/jquery.min.js"></script> -<script src="/wdb/jslib/jqueryui/1.10.2/jquery-ui.min.js" type="text/javascript"></script> -<link href="/wdb/jslib/jqueryui/1.10.2/themes/ui-lightness/jquery-ui.css" type="text/css" rel="stylesheet"/> -<script src="/wdb/jslib/jquery.multiselect.min.js" type="text/javascript"></script> -<link href="/wdb/css/jquery.multiselect.css" type="text/css" rel="stylesheet"/> -<style> -.ui-widget { -font-family: Verdana,Arial,sans-serif !important; -font-size: 0.8em !important; -} -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { -color: black !important; -} -</style> -<script type="text/javascript"><!-- -$(document).ready( function() { -// *** TODO: STOP_TIME -> rename to DATE_END? -> All Fields button does not select this; Back button does not repserve this!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! *** -// Check this: http://www.geekchamp.com/html5-tutorials/17-html5-local-storage to store arrays in localStorage -// -jQuery("#collection_name_option").multiselect({ -// AM20160707: Next 8 lines come from: https://github.com/ehynds/jquery-ui-multiselect-widget/issues/427 -beforeopen: function(){ -jQuery(".ui-multiselect-all").hide(); -//jQuery(".ui-multiselect-none").hide(); -}, -open: function(){ -jQuery(".ui-multiselect-all").hide(); -//jQuery(".ui-multiselect-none").hide(); -}, -selectedList: 4, // 0-based index -click: function(e){ -data_collection_name_click_function(e); -return true; -}, -checkAll: function(e){ -data_collection_name_click_function(e); -return true; -}, -uncheckAll: function(e){ -data_collection_name_click_function(e); -return true; -}, -}); -// Function to truncate text (Read More, Read Less) is applied to any element of the class textContainer_Truncate -// line height in 'px' is set to 36, height which is currently hardcoded for all elements. -var maxheight=36; -var showText = "Read more..."; -var hideText = "Read less..."; -jQuery('.textContainer_Truncate').each(function () { -var text = jQuery(this); -if (text.height() > maxheight){ -text.css({ 'overflow': 'hidden','height': maxheight + 'px' }); -var link = jQuery('<a style="color:orange; text-decoration:none; font-family: Arial,sans-serif,Helvetica; font-size: 75%;" href="#">' + showText + '</a>'); -var linkDiv = jQuery('<div></div>'); -linkDiv.append(link); -jQuery(this).after(linkDiv); -link.click(function (event) { -event.preventDefault(); -if (text.height() > maxheight) { -jQuery(this).html(showText); -text.css('height', maxheight + 'px'); -} else { -jQuery(this).html(hideText); -text.css('height', 'auto'); -} -}); -} -}); -$(":reset").click(function(e){ -this.form.reset(); // reset is a DOM function, also possible: jQuery('#queryform').get(0).reset(); -// Remember: http://stackoverflow.com/questions/20285970/form-resetting-is-not-working reset button id must not be="reset" for this to work! -$("#coord_sys option[value=eq]").attr('selected','selected'); -changeLabels(); -wdb_showall_toggler($('#wdb_tabbit'),'All Fields','Default Fields','reset'); -jQuery('#iframe_explore_collections').hide(); -jQuery('#button_explore_collections').html('Explore collections (open)'); -jQuery("#collection_name_option").multiselect("uncheckAll"); -return false; -}); -// ************ If a user clicks on any dataproduct_type checkbox ************** -jQuery('#any_dataproduct_type_id').click(function(){ -set_Any_dataproduct_type(); -}); -// ************ If a user clicks on any dataproduct_type checkbox ************** -jQuery('input[name=dataproduct_type]').click(function(){ -if ( this.id != 'any_dataproduct_type_id' ) { unset_Any_dataproduct_type(); }; -var num_dataproducttype_selected = jQuery('input[name=dataproduct_type]:checkbox:checked').length; -if ( ! num_dataproducttype_selected ) -{ -// When the user deselect the last dataproduct_type, the Any checkbox must be activated. -set_Any_dataproduct_type(); -} else { -if ( $('#dpt_spectrum').prop('checked') && jQuery('#dpt_cube').prop('checked') ) -{ -enable_1dspectra(); -enable_cubes(); -} -else if ( $('#dpt_spectrum').prop('checked') ) -{ -enable_1dspectra(); -disable_cubes(); -} -else if ( $('#dpt_cube').prop('checked') ) -{ -disable_1dspectra(); -enable_cubes(); -} -else -{ -enable_1dspectra(); -enable_cubes(); -} -} -}); -// ************ If a user clicks on any collection_name checkbox (public surveys here) ************** -jQuery('input[name=collection_name]').click(function(){ -data_collection_name_click_function(this); -}); -// ************ SAME if the user clicks on any "Others" collection in the <select><option> section ************** -jQuery('#collection_name_option option').unbind('click').click(function(){ -data_collection_name_click_function(this); -}); -// ************ if the user changes the product_status pulldown menu ************** -jQuery('[name=product_status]').on("change", function(){ -if ( jQuery('[name=product_status] option:selected').val() == "all" ) -{ -jQuery('[name=release_name] option').prop('disabled',false); -jQuery('[name=release_name]') -.find('optgroup') -.remove() -.end(); -if ( count_collection_name_options() == 1 && jQuery('[name=release_name] option').length == 0 ) -{ -// Stream collections (e.g. GIRAFFE IDPs) do not have release_names. -jQuery('[name=release_name]').append('<optgroup label="This collection"></optgroup><optgroup label="has no release name"></optgroup>'); -} -} else { -jQuery('[name=release_name] option').removeAttr("selected"); -jQuery('[name=release_name] option').prop('disabled',true); -var howmany_selected = jQuery('input[name=collection_name]:checkbox:checked').length + count_collection_name_options() - jQuery('#any_collection_id:checkbox:checked').length; -if ( howmany_selected == 1 ) -{ -if ( count_collection_name_options() == 1 && jQuery('[name=release_name] option').length == 0 ) -{ -// Stream collections (e.g. GIRAFFE IDPs) do not have release_names. -jQuery('[name=release_name]').append('<optgroup label="This collection"></optgroup><optgroup label="has no release name"></optgroup>'); -} else { -jQuery('[name=release_name]').append('<optgroup label="Set Status=all product versions"></optgroup><optgroup label="to make a specific release selectable"></optgroup>'); -} -} else { -jQuery('[name=release_name]').append('<optgroup label="Set a single collection"></optgroup><optgroup label="to see its releases"></optgroup>'); -} -} -localStorage.removeItem("release_name_option_index"); -localStorage.product_status_option_index = jQuery('[name=product_status]')[0].selectedIndex; -//console.log('on change set localStorage.product_status_option_index: '+localStorage.product_status_option_index); -return false; -}); -jQuery('#button_explore_collections').click(function () { -jQuery('#iframe_explore_collections').toggleClass("selected"); -if ( jQuery('#iframe_explore_collections').hasClass("selected") ) -{ -jQuery('#iframe_explore_collections').show(); -jQuery('#button_explore_collections').html('Explore collections (close)'); -} else { -jQuery('#iframe_explore_collections').hide(); -jQuery('#button_explore_collections').html('Explore collections (open)'); -} -}); -}); -function set_collection_from_iframe( collection_names ) -{ -jQuery("#collection_name_option option").each(function () { -if (jQuery.inArray(jQuery(this).val(), collection_names) != -1) { -jQuery(this).prop('selected', true); -}; -}); -//jQuery("#collection_name_option option[value='" + collection_name + "']", window.parent.document).attr("selected", "selected"); -jQuery("#collection_name_option", window.parent.document).multiselect("refresh"); -} -function disable_1dspectra() -{ -// Uncheck fields specific to 1d spectra, and make them disabled: -jQuery('.spec_part').closest('table').find('td').filter(':nth-child(1)').find(':input').prop("checked", false); -jQuery('.spec_part').closest('table').find('td').filter(':nth-child(1)').find(':input').prop("disabled", true); -jQuery('.spec_part').closest('table').find('td').filter(':nth-child(3)').find(':input').prop("disabled", true); -} -function enable_1dspectra() -{ -// check fields specific to 1d spectra, and make them enabled: -jQuery('.spec_part').closest('table').find('td').filter(':nth-child(1)').find(':input').prop("disabled", false); -jQuery('.spec_part').closest('table').find('td').filter(':nth-child(3)').find(':input').prop("disabled", false); -jQuery('.spec_part').closest('table').find('td').filter(':nth-child(1)').find(':input').prop("checked", true); -} -function disable_cubes() -{ -// Uncheck fields specific to cubes, and make them disabled: -jQuery('.spec_part').closest('table').find('td').filter(':nth-child(4)').find(':input').prop("checked", false); -jQuery('.spec_part').closest('table').find('td').filter(':nth-child(4)').find(':input').prop("disabled", true); -jQuery('.spec_part').closest('table').find('td').filter(':nth-child(6)').find(':input').prop("disabled", true); -} -function enable_cubes() -{ -// check fields specific to cubes, and make them enabled: -jQuery('.spec_part').closest('table').find('td').filter(':nth-child(4)').find(':input').prop("disabled", false); -jQuery('.spec_part').closest('table').find('td').filter(':nth-child(6)').find(':input').prop("disabled", false); -jQuery('.spec_part').closest('table').find('td').filter(':nth-child(4)').find(':input').prop("checked", true); -} -function reestablish_All_Fields() -{ -// After the user has clicked on the back function to return to the query form -// we need to re set the All Fields button to the value it had when pressing the search button. -// This must be done in javascript, because the All Fields and Default Fields button is dinamically-populated by javascript. -// (Dynamically-populated elements are not remembered by the browser, because they are not in the DOM). -if ( localStorage.All_Fields_class == "true" ) -{ -jQuery("#wdb_tabbit").addClass("allshown"); -// console.log("reestablish_All_Fields: running setter with allshown enabled"); -wdb_showall_setter($('#wdb_tabbit'), 'All Fields','Default Fields',''); // function in /var/www/html/wdb/jslib/wdb_query_functions.js -} else { -//NO // If it is the first time this page is loaded, then we simply need to set the release_Version from the userdefault (if given). -//NO // The userdefault is passed to WDB using the URL template: .../form?collection_name=VMC&release_name=DR2 -//NO set_release_name_from_userdefault(); -; -} -if ( localStorage.product_status_option_index ) -{ -// console.log('retrieving localStorage.product_status_option_index: '+localStorage.product_status_option_index); -var nthchild = Number(localStorage.product_status_option_index); -nthchild = nthchild+1; -// console.log('setting product_status nth-child: ' + nthchild); -jQuery("[name=product_status] :nth-child("+ nthchild +")").prop('selected', true); -} -return false; -} -function product_status_click_function(element) -{ -jQuery('input[name=release_name]:selected').prop("selected",false); -localStorage.removeItem("release_name_option_index"); -} -function data_collection_name_click_function(element) -{ -if ( element.id == 'any_collection_id' ) -{ -set_Any_Collection(true); -} -var num_collections_selected = jQuery('input[name=collection_name]:checkbox:checked').length + count_collection_name_options() - jQuery('#any_collection_id:checkbox:checked').length; -if ( num_collections_selected ) -{ -// A user's selection of one or more collection_names triggers the unckecking of the 'Any Collection' checkbox: -unset_Any_Collection(); -} -else -{ -// 'Any Collection' checkbox is selected, therefore remove any collection previously selected -set_Any_Collection(); -} -set_release_version_options(false); -} -function changeLabels() -{ -var coordsys=$("#coord_sys").val(); -var label1="RA"; -var label2="DEC"; -var unitlabel_coord1="RA: sexagesimal/hours, decimal/degrees"; -if (coordsys == "gal") -{ -label1="l "; -label2="b "; -unitlabel_coord1="both degrees whether sexagesimal or decimal"; -} -$('#coord1_label').html(label1); -$('#coord2_label').html(label2); -$('#unitlabel_coord1').html(unitlabel_coord1); -} -function resetLabels() -{ -var label1="RA"; -var label2="DEC"; -var unitlabel_coord1="RA: sexagesimal/hours, decimal/degrees"; -$('#coord1_label').html(label1); -$('#coord2_label').html(label2); -$('#unitlabel_coord1').html(unitlabel_coord1); -} -function set_Any_dataproduct_type() -{ -// If the user clicks on Any dataproduct_type, then any other dataproduct_type previously selected must get unchecked: -jQuery('input[name=dataproduct_type]').prop('checked', false); -// and obviously we want to see Any dataproduct_type checked: -jQuery('#any_dataproduct_type_id').prop('checked', true); -// If 1d spectra and/or cubes parameters were disabled, ensure they are re-enabled: -enable_1dspectra(); -enable_cubes(); -} -function unset_Any_dataproduct_type() -{ -// If the user clicks on some (one or more) dataproduct_type, then Any dataproduct_type must get unchecked: -jQuery('#any_dataproduct_type_id').prop('checked', false); -} -//****** Functions to do with the activation of the Release pulldown menu: -function set_Any_Collection(uncheckAll) -{ -// If the user clicks on Any Collection, then any other collection previously selected must get unchecked: -// this means clearing any selection in both: collection_name checkboxes for Public Surveys... -jQuery('input[name=collection_name]').prop('checked', false); -//Without multiselect it would be: jQuery('#collection_name_option option').prop('selected', false); -// Setting Any_Colleciton must clear the multiselect selections and reset the button title: -// ... and the multiselect collection_name_option: -if ( uncheckAll ) { jQuery("#collection_name_option").multiselect("uncheckAll"); } -// Obviously we want to see the Any Collection checkbox checked: -jQuery('#any_collection_id').prop('checked', true); -} -function unset_Any_Collection() -{ -// If the user clicks on some (one or more) collections, then Any Collection must get unchecked: -jQuery('#any_collection_id').prop('checked', false); -} -function set_collection_from_userdefault() -{ -if ( userdefault_collection_name != "" ) -{ -unset_Any_Collection(); -if ( jQuery('[name=collection_name][value="'+userdefault_collection_name+'"]').length ) -{ -// This collection_name is in a checkbox -jQuery('[name=collection_name][value="'+userdefault_collection_name+'"]').prop('checked',true); -} -if ( jQuery('[name=collection_name] option[value="'+userdefault_collection_name+'"]').length ) -{ -// This collection_name is in a dropdown menu -jQuery('[name=collection_name] option[value="'+userdefault_collection_name+'"]').attr('selected','selected'); -} -} -} -function count_collection_name_options() -{ -return jQuery('input[name=multiselect_collection_name_option]:checkbox:checked').length; -} -function single_collection_name() -{ -// without multiselect it would be: var num_collections_selected = jQuery('input[name=collection_name]:checkbox:checked').length + jQuery('#collection_name_option option:selected').length - jQuery('#any_collection_id:checkbox:checked').length; -var num_collections_selected = jQuery('input[name=collection_name]:checkbox:checked').length + count_collection_name_options() - jQuery('#any_collection_id:checkbox:checked').length; -if ( num_collections_selected != 1 ) { return false; } -// The collection_name is set either as a checkbox or as a select option: -var collection_name = jQuery('input[name=collection_name]:checkbox:checked').val(); -if ( ! collection_name ) -{ -// collection_name = jQuery('#collection_name_option option:selected').val(); -//collection_name = jQuery('button.ui-multiselect > span:eq(1)').html(); -//var o_collection_name = jQuery('input[id^=ui-multiselect-collection_name_option-option]:checkbox:checked').val(); -collection_name = jQuery('input[name=multiselect_collection_name_option]:checkbox:checked').val(); -} -return collection_name; -} -function set_release_version_options(reset) -{ -if ( jQuery('[name=product_status] option:selected').val() != "all" ) -{ -jQuery('[name=release_name] option').prop('disabled',true); -} else -{ -jQuery('[name=release_name] option').prop('disabled',false); -jQuery('[name=release_name]') -.find('optgroup') -.remove() -.end(); -} -return false; -} -//****** END OF Functions to do with the activation of the Release pulldown menu. -//--> -</SCRIPT> -<script type="text/javascript" src="/wdb/jslib/wdb_query_functions.js"></script> -</HEAD> -<BODY onunload="" bgcolor="#ffffff"> -<em></em> -<style> -.buttonlike { -width: 76px; -padding: 10px; -margin: 10px; -background:rgb(148,202,236); -text-align: center; -font-family:Arial,sans-serif,Helvetica; -border-radius:4px; --moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px; -} -.fonts{ font-family:Arial,sans-serif,Helvetica; } -/* html * { font-family:Arial,sans-serif,Helvetica !important; } */ -.no_underline{ text-decoration:none; } -/* .phase3_main{ background:rgb(80,170,204); } */ -/* .phase3_spectral{ background:rgb(68,170,170); } */ -/* .phase3_imaging{ background:rgb(204,116,116); } */ -/* .phase3_vircam{ background:rgb(176,172,105); } */ -.phase3_main{ background:rgb(148,202,236); } -.phase3_spectral{ background:rgb(152,210,210); } -.phase3_imaging{ background:rgb(244,146,146); } -.phase3_vircam{ background:rgb(215,214,140); } -.phase3_main_light{ background:rgb(148,202,236); } -.ORIphase3_spectral_light{ background:rgb(132,234,180); } -.phase3_spectral_light{ background:rgb(152,210,210); } -/* .phase3_imaging_light{ background:rgb(255,180,180); } */ -.phase3_imaging_light{ background:rgb(244,146,146); } -.phase3_vircam_light{ background:rgb(215,214,140); } -/* .phase3_vircam_light{ background:rgb(176,172,105); } */ -/* MAINP IS A TEST (P for Provenance, query by provenance) */ -.phase3_mainp{ background:rgb(148,202,236); } -.phase3_mainp_light{ background:rgb(148,202,236); } -a.ui{color:rgb(244,244,244);font-weight:bold;text-decoration:none;} -a:hover.ui{background:rgb(92,192,192);background-color:rgba(0, 0, 0, 0.1);text-decoration:underline; border-bottom: 1px;} -a.this{color:rgb(0,0,0);font-weight:bold;text-decoration:none; pointer-events: none; cursor: default;} -a.nolink{color:rgb(255,255,255);font-weight:bold;text-decoration:none; pointer-events: none; cursor: default;} -a.link{color:rgb(127,127,127);font-weight:bold;text-decoration:none; cursor: default;} -th a {text-decoration:none;} -td a {text-decoration:none;} -.legendBorder { margin: 0; padding: 3px 0 5px 5px; } -</style> -<table border="0" align="center" width="100%" style="height: 100px; line-height: 0pt"> -<tr valign="top"> -<!-- logo left --> -<td width="80" style="line-height: 0px"><a href="http://www.eso.org/"><img src="/wdb/images/eso-logo.gif" alt="ESO" title="ESO Homepage"></a></td> -<!-- Central cell with links to other interfaces, help, and related pages --> -<td width="60%" align="center" style="line-height: 12pt; height: 100px"> -<table height="100" style="height:100px;"> -<tr> -<td class="buttonlike phase3_main"> -<a class="ui" title="Query & download interace for all available products. It is possible to search for and download: images, spectra, catalogs, source tables, data cubes, fluxmaps, etc." href="/wdb/wdb/adp/phase3_main/form?"> GENERIC </a> -</td> -<td class="buttonlike phase3_spectral"> -<a class="ui" title="Query & download interface specific to spectral data products. It is possible to query for 1d spectra and data cubes, using parameters like spectral resolving power, SNR (1d spectra), limiting magnitude (data cube), wavelength coverage etc." href="/wdb/wdb/adp/phase3_spectral/form?"> SPECTRAL </a> -</td> -<td class="buttonlike phase3_imaging"> -<a class="ui" title="Query & download interface specific to imaging/source table data products. It is possible to query by limiting magnitude and other imaging-specific parameters." href="/wdb/wdb/adp/phase3_imaging/form?"> IMAGING </a> -</td> -<td class="buttonlike phase3_vircam"> -<a class="ui" title="Query & download interface specific to VISTA/VIRCAM data products. It is possible to query by ellipticity and other VIRCAM-specific parameters." href="/wdb/wdb/adp/phase3_vircam/form?"> VISTA </a> -</td> -</tr> -<tr><td align="center" colspan="4" style="color: rgb(232,232,232); letter-spacing: 5px; ">PHASE3 ARCHIVE INTERFACES</td></tr> -<tr><td colspan="4" align="center"> -<table cellpadding="7" cellspacing="1" border="0" width="100%"> -<tr align="right" valign="middle"> -<td align="middle" bgcolor="bbbbbb" class="fonts"><a class="no_underline" href="/wdb/help/adp/phase3_help.html"> -<font color="ffffff" size="1">HELP</font></a></td> -<td align="middle" bgcolor="bbbbbb" class="fonts"><a class="no_underline" href="/cms/eso-data/phase3/ESO_reduced_data_products_description.pdf"> -<font color="ffffff" size="1">REDUCED DATA TYPES DESCRIPTION</font></a></td> -<td align="middle" bgcolor="bbbbbb" class="fonts"><a class="no_underline" href="/faq.html"> -<font color="ffffff" size="1">FAQ</font></a></td> -<td align="middle" bgcolor="bbbbbb" class="fonts"><a class="no_underline" href="http://www.eso.org/sci/observing/phase3/data_releases.html"> -<font color="ffffff" size="1">DATA RELEASES</font></a></td> -</tr> -</table> -</td> -</tr></table> -</td> -<!-- Title on the right --> -<td align="center" class="phase3_main" style="padding: 21px;"><span class="phase3_main fonts" style="line-height: 20pt; font-weight: bold; font-size: 16pt; white-space: nowrap">Generic Data Products<br>Query Form</span></td> -</tr> -</table> -<hr><div class="textContainer_Truncate" style="text-align: justify;text-justify:inter-word; font-style: italic; font-family: Arial,sans-serif,Helvetica; font-size: 85%;"> -<span>Please be aware of an <b><a href="http://archive.eso.org/cms/eso-archive-news/Flux-calibration-issue-for-the-XSHOOTER-UVB-data-products.html">important announcement about the flux calibration of XSHOOTER UVB data products</a></b>.<br> -This form provides access to <b>reduced or fully calibrated data sets</b>, and <b>derived catalogs</b>, -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 <a href="/">Science Archive Facility</a> starting April 2011, through the <a href="http://www.eso.org/sci/observing/phase3.html"> -Phase 3 process</a>. Included are optical, infrared, and APEX (millimetre, submillimetre) data products. -Each available data set is fully described; please see the <a href="http://www.eso.org/sci/observing/phase3/data_releases.html">list of contributed data releases</a> and <a href="http://www.eso.org/sci/observing/phase3/data_streams.html">pipeline-processed data streams</a> 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 <a href ="/wdb/wdb/adp/phase3_imaging/form">optical and infrared imaging</a>, -for <a href ="/wdb/wdb/adp/phase3_spectral/form">spectra</a>, -and for <a href ="/wdb/wdb/adp/phase3_vircam/form">VISTA</a> data products. -Other data not yet migrated to the Phase 3 infrastructure are available via different user interfaces; please check the <a href="http://archive.eso.org/">archive home page</a>. -<p><b>Note:</b> The FITS format of the spectra retrievable via this query form complies to the <a href="http://www.eso.org/sci/observing/phase3/p3sdpstd.pdf">ESO Science Data Product standard</a> [PDF]. The <a href="http://archive.eso.org/cms/eso-data/help/1dspectra.html">1d spectra help page</a> provides a list of tools that support this format and a quick guide to read and display these spectra in IDL and IRAF.</p> -</div> -<noscript><P style='color: red'>WARNING: You need to activate JavaScript to properly use this form.<P></noscript> - -<FORM id="queryform" ACTION="/wdb/wdb/adp/phase3_main/query" METHOD="POST" ENCTYPE="multipart/form-data"> -<div id="wdb_top_menu" class="wdb_top_menu"><fieldset class="fs_top_menu"> <table id="wdb_top_menu_table" width="100%" cellpadding=5 cellspacing=0 border=0><tr valign="middle"> <td align="left" valign="middle" style="width: 25%; white-space: nowrap;"> - <input id="search" type="submit" class="ibsearch" value="Search"> - <input id="myreset" type="reset" style="width: 7em;" value="Reset" onClick="wdb_showall_toggler($('#wdb_tabbit'),'All Fields','Default Fields','reset')"></td><td style="width: 50%; white-space: nowrap;"> -<div id="wdb_preferences_container" class="wdb_preferences_container"> -<div id="wdb_preferences" class="wdb_preferences">Output preferences: <SELECT name="wdbo"><OPTION VALUE="html/display" selected="selected">html table</OPTION><OPTION VALUE="ascii/display">ascii fixed length/display</OPTION><OPTION VALUE="ascii/download">ascii fixed length/download</OPTION><OPTION VALUE="csv/download">ascii csv/download</OPTION></SELECT> -</div> -<div id="wdb_max_records" class="wdb_max_records"> Return max <INPUT VALUE="200" SIZE="5" NAME="max_rows_returned"> rows.</div><input type="button" id="wdb_tabbit" class="wdb_tabbit" style="margin-left: 2em;" onClick="wdb_showall_toggler(this,'All Fields','Default Fields');" value="All Fields"></div><!-- closing div wdb_preferences_container ***************************************************************** --></td><td align="right" style="width: 25%; white-space: nowrap;"><input type="button" id="ib_query_syntax" value="Syntax Help" onClick="wdb_query_syntax(this,'/wdb/html/wdb_query_syntax_quick.html')"></td></tr></table><p id="wdb_query_syntax" class="wdb_query_syntax"></p></fieldset></div><!-- closing div wdb_top_menu ***************************************************************** --><p></fieldset> -<fieldset class="legendBorder" style="background:#EEEEEE"> -<legend class="legendTitle"> <font style="font-family:'Arial',serif" color="006699" size="+1"><b>Target/Position Information</b></font> </legend> - -<TABLE class="wdb_query_form_input_table"><TR><TD></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#Target_name"><abbr title="target: The input value can be either a valid astronomical target name recognised by the SIMBAD or the NED resolvers, or the original target designation as defined by the Principal Investigator. -By default the name will be resolved into its coordinates by the SIMBAD name resolver (you could use the NED resolver if you prefer), and the search will be conducted against the resolved coordinates within a box of defined size (see Search Box). Otherwise, you can select “Phase 3 target name” to perform a string match (case insensitive) against the OBJECT keyword as defined by the PI.">Target name</abbr></a></b> </TD> -<TD> <INPUT name="target" size="22" placeholder=""> </td><td><select name=resolver> -<option value=simbad>SIMBAD name</option> -<option value=ned>NED name</option> -<option value=none>Phase 3 target name</option> -</select></TD> -<TD> </TD><TD><b><a href="/wdb/help/adp/phase3_help.html#UploadTargets"><abbr title="wdb_input_file: Input file containing a list (one per line) of either target names or J2000 coordinate pairs (either TAB or sign (+/-) separated). If target names are provided, the user can decide whether the SIMBAD or NED name resolver should be used, or if instead the provided values should be matched against the Phase 3 target names (see pulldown menu on the left).">Query by Target List:</abbr></a></b> </TD> -<TD> <INPUT name="wdb_input_file" type="file" value="" ></TD> - -</TR> -<TR><TD></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#Coord_system"><abbr title="coord_sys: The coordinate system of the input coordinates can be either Equatorial(FK5) or Galactic. This is useful when, instead of using a name resolver, you want to provide your own coordinates to perform a query by position within the given Search Box.">Input Coord. Sys.</abbr></a></b> </TD> -<TD colspan="5"> <SELECT id="coord_sys" name="coord_sys" style="vertical-align: middle" onChange='changeLabels();' ><OPTION value="eq"> Equatorial (FK5)</OPTION> -<OPTION value="gal"> Galactic</OPTION> -</SELECT></TD> -</TR> -<TR><TD></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#RA"><abbr title="coord1: "><span style="float:left">Position</span><span style="float: right"><I id="coord1_label">RA</I> </span></abbr></a></b> </TD> -<TD colspan="2"> <INPUT name="coord1" size="12" placeholder=""><small> </small><small> </small><b><a href="/wdb/help/adp/phase3_help.html#DEC"><abbr title="coord2: "><I id="coord2_label">DEC</I></abbr></a></b> <INPUT name="coord2" size="12" placeholder=""> </td><td></td><td colspan="3"><I id="unitlabel_coord1">RA: sexagesimal hours, decimal degrees</I> -</TR> -<TR><TD></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#Search_Box"><abbr title="box: The size (deg) of the box within which the search by position will be performed. It could be expressed either in decimal or in sexagesimal format. -Example: (Input Coord. Sys.=Equatorial, dec=20, box=2.2) results in the query: (dec between 18.9 and 21.1) {note that no constraint was provided on right ascension, -hence the query is for a stripe around dec=20 large 2.2 degrees}.">Search Box</abbr></a></b> </TD> -<TD colspan="3"> <INPUT name="box" size="12" value="02 09 00" onblur="if(this.value == '') { this.value='02 09 00'}" onfocus="if(this.value == '02 09 00') { this.value = ''; }"></TD> -<TD colspan="1">Output Display: </TD> -<TD colspan="4"> - <TABLE class="wdb_query_form_input_table" border="1"><tbody><TR><TD><INPUT type=checkbox checked name="tab_ra"><TD><b><a href="/wdb/help/adp/phase3_help.html#RA"><abbr title="ra: Right Ascension (J2000)">RA</abbr></a></b> </TD> -<TD><INPUT type=checkbox checked name="tab_dec"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#DEC"><abbr title="dec: Declination (J2000)">DEC</abbr></a></b> </TD> -<TD><INPUT type=checkbox name="tab_gal_lon"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#RA"><abbr title="gal_lon: ">Gal long</abbr></a></b> </TD> -<TD><INPUT type=checkbox name="tab_gal_lat"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#DEC"><abbr title="gal_lat: ">Gal lat</abbr></a></b> </TD> -</TR></TABLE> -</TD> -</TR></TABLE> - -</fieldset><fieldset class="legendBorder phase3_main_light"><legend class="legendTitle"> <font style="font-family:'Arial',serif" color="006699" size="+1"><b>Bandpass/Wavelength and Product Category</b></font> </legend> -<TABLE class="wdb_query_form_input_table"><TR><TD><INPUT type=checkbox checked name="tab_filter"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#Filter"><abbr title="filter: The name of the filter used. Applicable only to imaging products, including images and source tables.">Filter</abbr></a></b> </TD> -<TD><td><B><SELECT NAME="filter" MULTIPLE SIZE="5"><OPTION selected>Any</OPTION> -<OPTION>u_SDSS</OPTION> -<OPTION>U</OPTION> -<OPTION>G</OPTION> -<OPTION>g_SDSS</OPTION> -<OPTION>r_SDSS</OPTION> -<OPTION>R</OPTION> -<OPTION>NB_659</OPTION> -<OPTION>i_SDSS</OPTION> -<OPTION>I</OPTION> -<OPTION>Z</OPTION> -<OPTION>z_SDSS</OPTION> -<OPTION>Y</OPTION> -<OPTION>NB118</OPTION> -<OPTION>J</OPTION> -<OPTION>H</OPTION> -<OPTION>Ks</OPTION> -<OPTION>870u</OPTION> -<OPTION>H2</OPTION> -<OPTION>CH4</OPTION> -<OPTION>NB1190</OPTION> -<OPTION>BrG</OPTION> -<OPTION>NB0984</OPTION> -<OPTION>NB1060</OPTION> -<OPTION>NB2090</OPTION> -</SELECT> </B></td><td> OR <img style="vertical-align: top; width: 14px" src="/wdb/images/info20.png" title="If a filter constraint is specified, only imaging products matching the filter constraint are returned; if a wavelength constraint is provided, only spectral products matching such constraint are returned; if both the filter and the wavelength constraints are provided (!= Any) then the constraints on Filter and Wavelength are logically OR-ed together, so that imaging related products (matching the filter constraint) and spectral products (matching the wavelength constraint) are both returned, unless the product category is specified."> </td> -<TD><INPUT type=checkbox checked name="tab_wavelength"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#wavelength"><abbr title="wavelength: spectral coverage in nanometers. Applicable to 1d spectra and cubes. -Query examples: -1) 656 - The product (e.g. a spectrum) must contain the 656 nm point;: -2) 393 AND 656 - entire range must be covered: -3) 393..656 partial range must be covered.: -Output example: the output string 298.920..555.980 shows the min and max wavelengths covered by the product in nanometers.">Wavelength</abbr></a></b> </TD> -<TD> <INPUT name="wavelength" size="21" value="Any" onblur="if(this.value == '') { this.value='Any'}" onfocus="if(this.value == 'Any') { this.value = ''; }"> [nm] -E.g.: <span style="text-decoration: underline;" title="656 must be contained">656</span>, <span style="text-decoration: underline;" title="full range must be covered">393 AND 656</span>, <span style="text-decoration: underline;" title="partial overlap is enough">393..656</span> -<!-- <img style="vertical-align: top; width: 20px" src="/wdb/images/info20.png" title="If a filter constraint is specified, only imaging products matching the filter constraint are returned; if a wavelength constraint is provided, only spectral products matching such constraint are returned; if both the filter and the wavelength constraint are provided (!= Any) then the constraints on Filter and Wavelength are logically OR-ed together, so that imaging related products (matching the filter) and spectral products (matching the wavelength) are both returned, unless the product category is specified."> --> -<SCRIPT type="text/javascript"> -// This javascript/jQuery does two things: -// 1) when the wavelength field receives focus, the Any default value is removed; -// 2) the Any default value is added if the user leaves the field empty. -// It is within the 'ehm' special attribute that the value 'Any' is replaced with the correct SQL. -$(document).ready(function() { -var Input = $('input[name=wavelength]'); -var default_value= "Any"; -Input.focus(function() { -if(Input.val() == default_value) { Input.val(""); } -}).blur(function(){ -if(Input.val().length == 0) Input.val(default_value); -}); -}); -</SCRIPT></TD> -</TR></TABLE> - - -<TABLE class="wdb_query_form_input_table"><TR><TD><INPUT type=checkbox checked name="tab_dataproduct_type"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#PRODCATG"><abbr title="dataproduct_type: It allows to select products of a certain type; allowed input values are: image, source_table, spectrum, catalog. -The dataproduct_type field is used ONLY in the phase3_main interface.">Product category</abbr></a></b> </TD> -<TD><Table border="1"><tR><td> </td> -<td><input id="any_dataproduct_type_id" type="checkbox" name="dataproduct_type" value="Any" checked> Any </td> -<td><input id="dpt_catalog" type="checkbox" name="dataproduct_type" value="catalog"> catalog </td> -<td><input id="dpt_cube" type="checkbox" name="dataproduct_type" value="cube"> cube </td> -<td><input id="dpt_image" type="checkbox" name="dataproduct_type" value="image"> image </td> -<td><input id="dpt_source_table" type="checkbox" name="dataproduct_type" value="source_table"> source_table </td> -<td><input id="dpt_spectrum" type="checkbox" name="dataproduct_type" value="spectrum"> spectrum </td> - -</tR></Table></TR></TABLE> - -</fieldset><fieldset class="legendBorder" style="background:#EEEEEE"><legend class="legendTitle"> <font style="font-family:'Arial',serif" color="006699" size="+1"><b>Observation/Temporal Parameters</b></font> </legend> -<TABLE class="wdb_query_form_input_table"><TR><TD><INPUT type=checkbox name="tab_tel_id"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#Telescope"><abbr title="tel_id: Telescope name">Telescope</abbr></a></b> </TD> -<TD><td><SELECT NAME="tel_id" MULTIPLE SIZE="5"><OPTION selected>Any</OPTION> -<OPTION> APEX-12m </OPTION> -<OPTION> ESO-3.6 </OPTION> -<OPTION> ESO-NTT </OPTION> -<OPTION> ESO-VISTA </OPTION> -<OPTION> ESO-VLT-U1 </OPTION> -<OPTION> ESO-VLT-U2 </OPTION> -<OPTION> ESO-VLT-U2,ESO-VLT-U3 </OPTION> -<OPTION> ESO-VLT-U3 </OPTION> -<OPTION> ESO-VLT-U4 </OPTION> -<OPTION> ESO-VST </OPTION> -<OPTION> MPG/ESO-2.2 </OPTION> -</SELECT> </td><TD><INPUT type=checkbox checked name="tab_ins_id"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#Instrument"><abbr title="ins_id: Instrument name">Instrument</abbr></a></b> </TD> -<TD><td><B><SELECT NAME="ins_id" MULTIPLE SIZE="5"><OPTION selected>Any</OPTION> -<OPTION> APEXBOL </OPTION> -<OPTION> EFOSC </OPTION> -<OPTION> FEROS </OPTION> -<OPTION> FORS1 </OPTION> -<OPTION> FORS2 </OPTION> -<OPTION> GIRAFFE </OPTION> -<OPTION> GIRAFFE,UVES </OPTION> -<OPTION> HARPS </OPTION> -<OPTION> HAWKI </OPTION> -<OPTION> ISAAC </OPTION> -<OPTION> MULTI </OPTION> -<OPTION> MUSE </OPTION> -<OPTION> OMEGACAM </OPTION> -<OPTION> SOFI </OPTION> -<OPTION> UVES </OPTION> -<OPTION> VIMOS </OPTION> -<OPTION> VIRCAM </OPTION> -<OPTION> XSHOOTER </OPTION> -</SELECT> </B></td><TD><INPUT type=checkbox name="tab_obstech"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#OBSTECH"><abbr title="obstech: General mode/technique used for the observation">OBSTECH</abbr></a></b> </TD> -<TD><B><SELECT NAME="obstech" MULTIPLE SIZE="5"><OPTION selected>Any</OPTION> -<OPTION> CONTINUUM </OPTION> -<OPTION> ECHELLE </OPTION> -<OPTION> ECHELLE,ABSORPTION-CELL </OPTION> -<OPTION> ECHELLE,SLIC#1 </OPTION> -<OPTION> ECHELLE,SLIC#2 </OPTION> -<OPTION> ECHELLE,SLIC#3 </OPTION> -<OPTION> ECHELLE,SLIT,MAPPING </OPTION> -<OPTION> ECHELLE,SLIT,NODDING </OPTION> -<OPTION> ECHELLE,SLIT,OFFSET </OPTION> -<OPTION> ECHELLE,SLIT,STARE </OPTION> -<OPTION> IFU </OPTION> -<OPTION> IMAGE </OPTION> -<OPTION> IMAGE,DIRECT </OPTION> -<OPTION> IMAGE,DITHER </OPTION> -<OPTION> IMAGE,JITTER </OPTION> -<OPTION> IMAGE,OFFSET </OPTION> -<OPTION> MOS </OPTION> -<OPTION> MOS,NODDING </OPTION> -<OPTION> MXU </OPTION> -<OPTION> SPECTRUM </OPTION> -</SELECT> </B></TR></TABLE> - - -<TABLE class="wdb_query_form_input_table"><TR><TD><INPUT type=checkbox checked name="tab_date_obs"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#DATE_OBS"><abbr title="date_obs: The start datetime of an observation (UTC). -A user can specify a datetime range (e.g.: 2013-01-31..2013-02-01), -use an operator (e.g.: > 2013-01-31T07:00:00), -or a single value. -- when a single day is provided (e.g. 2013-02-01) -then all observations taken that day are returned. -- when a single instant in time value is provided (e.g.: 2013-01-31T08:34:30) -then all observations that potentially cover that moment in time are returned.">Date Obs</abbr></a></b> </TD> -<TD> <INPUT name="date_obs" size="45" placeholder=""><TD><i>UT time</i> <span title="The start datetime of an observation (UTC). -A user can specify a datetime range (e.g.: 2013-01-31..2013-02-01), -use an operator (e.g.: > 2013-01-31T07:00:00), -or a single value. -- when a single day is provided (e.g. 2013-02-01) -then all observations taken that day are returned. -- when a single instant in time value is provided (e.g.: 2013-01-31T08:34:30) -then all observations that potentially cover that moment in time are returned." style="font-size: small;">(Place the mouse here to see examples)</span></TD> - -</TR> -<TR><TD><INPUT type=checkbox name="tab_mjd_obs"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#MJD_OBS"><abbr title="mjd_obs: The start datetime of an observation in modified julian date (MJD). A user can specify a datetime range (e.g.: 53386..53389), use an operator (e.g.: > 53386.09735), or a single value. When a single value is provided then all observations that potentially cover that moment in time are returned.">MJD Obs</abbr></a></b> </TD> -<TD> <INPUT name="mjd_obs" size="10" placeholder=""> <i>Modified Julian Date</i></TD> - -</TR> -<TR><TD><INPUT type=checkbox checked name="tab_exptime"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#EXPTIME"><abbr title="exptime: Exposure time">Exptime</abbr></a></b> </TD> -<TD> <INPUT name="exptime" size="10" placeholder=""> Total integration time per pixel [s]</TD> - -</TR> -<TR><TD><INPUT type=checkbox name="tab_multi_ob"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#MULTI_OB"><abbr title="multi_ob: It allows the user to query for products resulting either from a single ESO Observing Block, or from a combination of several Observing Blocks.">Multi OB</abbr></a></b> </TD> -<TD> <SELECT id="multi_ob" name="multi_ob" style="vertical-align: middle" ><OPTION value="%"> Any</OPTION> -<OPTION value="M%"> Request multi-OB products</OPTION> -<OPTION value="S%"> Exclude multi-OB products</OPTION> -</SELECT></TD> -</TR></TABLE> -</fieldset><fieldset class="legendBorder" style="background:#DDDDDD"><legend class="legendTitle"> <font style="font-family:'Arial',serif" color="006699" size="+1"><b>Collections and Observing Programmes</b></font> </legend> -<TABLE class="wdb_query_form_input_table"><TR><TD><INPUT type=checkbox checked name="tab_collection_name"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#collection_name"><abbr title="collection_name: Title of the observing programme (Null for pipeline-generated internal data products)">Collection</abbr></a></b> </TD> -<TD><div id="collections"> <select id='collection_name_option' name="collection_name" multiple style="display: none; width: 400px"><OPTION value="092.A-0472"> 092.A-0472</OPTION> -<OPTION value="189.A-0424"> 189.A-0424</OPTION> -<OPTION value="60.A-9284H"> 60.A-9284H</OPTION> -<OPTION value="AMBRE"> AMBRE</OPTION> -<OPTION value="ATLASGAL"> ATLASGAL</OPTION> -<OPTION value="ESSENCE"> ESSENCE</OPTION> -<OPTION value="FEROS"> FEROS</OPTION> -<OPTION value="GAIAESO"> GAIAESO</OPTION> -<OPTION value="GIRAFFE"> GIRAFFE</OPTION> -<OPTION value="GOODS_FORS2"> GOODS_FORS2</OPTION> -<OPTION value="GOODS_ISAAC"> GOODS_ISAAC</OPTION> -<OPTION value="GOODS_VIMOS_IMAG"> GOODS_VIMOS_IMAG</OPTION> -<OPTION value="GOODS_VIMOS_SPEC"> GOODS_VIMOS_SPEC</OPTION> -<OPTION value="HARPS"> HARPS</OPTION> -<OPTION value="HAWKI"> HAWKI</OPTION> -<OPTION value="HUGS"> HUGS</OPTION> -<OPTION value="KIDS"> KIDS</OPTION> -<OPTION value="LEGA-C"> LEGA-C</OPTION> -<OPTION value="LESS"> LESS</OPTION> -<OPTION value="MUSE"> MUSE</OPTION> -<OPTION value="PESSTO"> PESSTO</OPTION> -<OPTION value="UVES"> UVES</OPTION> -<OPTION value="UltraVISTA"> UltraVISTA</OPTION> -<OPTION value="VHS"> VHS</OPTION> -<OPTION value="VIDEO"> VIDEO</OPTION> -<OPTION value="VIKING"> VIKING</OPTION> -<OPTION value="VMC"> VMC</OPTION> -<OPTION value="VPHASplus"> VPHASplus</OPTION> -<OPTION value="VST-ATLAS"> VST-ATLAS</OPTION> -<OPTION value="VVV"> VVV</OPTION> -<OPTION value="XSHOOTER"> XSHOOTER</OPTION> -<OPTION value="ZCOSMOS"> ZCOSMOS</OPTION> - </select></div> - <script type="text/javascript">jQuery(document).ready(function() { - userdefault_active = 0; -userdefault_release_name = ''; -userdefault_collection_name = ''; - -jQuery('td.phase3_main a.ui').addClass('this'); - - });</script> <!-- done append_js --> - <!-- end of save_collection_selection --></TR></TABLE> - - -<TABLE class="wdb_query_form_input_table"><TR><TD><INPUT type=checkbox checked name="tab_prog_id"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#Prog_ID"><abbr title="prog_id: ESO program identification code. In HTML output, it provides a link to the scheduling information, and from there to the related publications.">Run/Program ID</abbr></a></b> </TD> -<TD> <INPUT name="prog_id" size="29" placeholder=""> <i>eg 179.B-2003(B)</i> </TD> -<TD><INPUT type=checkbox name="tab_username"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#PI_NAME"><abbr title="username: The name of the Phase 3 user that delivered the data to ESO.">PI Name</abbr></a></b> </TD> -<TD> <INPUT name="username" size="12" placeholder=""> </TD> -<TD><INPUT type=checkbox name="tab_p3orig"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#p3orig"><abbr title="p3orig: The origin of a reduced or fully calibrated data product can either be: -- User: data were processed by an ESO user, typically the P.I. of the ESO observing programme, then contributed to the ESO archive via the Phase 3 process. The user's name is recorded in the field "Phase 3 user". -- ESO: data were processed by ESO as part of the data operation flow.">Certified by</abbr></a></b> </TD> -<TD> <SELECT id="p3orig" name="p3orig" style="vertical-align: middle" ><OPTION value="%"> Any</OPTION> -<OPTION value="EDP"> User</OPTION> -<OPTION value="IDP"> ESO</OPTION> -</SELECT></TD> -</TR></TABLE> - -</fieldset><fieldset class="legendBorder" style="background:#EEEEEE"><legend class="legendTitle"> <font style="font-family:'Arial',serif" color="006699" size="+1"><b>Submission, Proprietary Period & Bibliographic Information</b></font> </legend><p> -<TABLE class="wdb_query_form_input_table"><TR><TD><INPUT type=checkbox checked name="tab_origfile"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#ORIGFILE"><abbr title="origfile: The original file name as given by the PI. It is guaranteed to be unique only within a given version of a Phase 3 programme release.">ORIGFILE</abbr></a></b> </TD> -<TD> <INPUT name="origfile" size="29" placeholder=""> </TD> - -<TD><INPUT type=checkbox checked name="tab_dp_id"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#ARCFILE"><abbr title="dp_id: Archive File ID. It is guaranteed to be unique within the entire ESO Science Archive Facility.">ARCFILE</abbr></a></b> </TD> -<TD> <INPUT name="dp_id" size="29" placeholder=""></TD> - -</TR> -<TR><TD><INPUT type=checkbox name="tab_rel_date"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#rel_date"><abbr title="rel_date: Date by which the product is, or will be, publically available. Until then, access is available only to the observing team.">Release Date</abbr></a></b> </TD> -<TD> <INPUT name="rel_date" size="12" placeholder=""></TD> - -<TD><INPUT type=checkbox checked name="tab_referenc"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#REFERENC"><abbr title="referenc: Bibliographic reference to the primary scientific publication associated to the data product describing content, coverage, process of creation and scientific quality, when defined (in the REFERENC FITS keyword of the product).">REFERENC</abbr></a></b> </TD> -<TD> <INPUT name="referenc" size="29" placeholder=""> <a href="https://en.wikipedia.org/wiki/Bibcode">bibcode</a></TD> - -</TR> -<TR><TD><INPUT type=checkbox name="tab_batch_id"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#batch_id"><abbr title="batch_id: The identification number of the submission batch this product belongs to. A batch is a technical term used to indicate a group of files that were submitted together to the ESO Phase 3 process.">Batch Id</abbr></a></b> </TD> -<TD> <INPUT name="batch_id" size="12" placeholder=""> </TD> - -<TD><INPUT type=checkbox name="tab_publication_date"></TD><TD><b><a href="/wdb/help/adp/phase3_help.html#publication_date"><abbr title="publication_date: Date by which the product was made available to the community">Publication Date</abbr></a></b> </TD> -<TD> <INPUT name="publication_date" size="29" placeholder=""></TD> -</TR></TABLE> -</fieldset><fieldset class="legendBorder" style="background:#EEEEEE"><legend class="legendTitle"> <font style="font-family:'Arial',serif" color="006699" size="+1"><b>Query by raw data</b></font> </legend><p> -<TABLE class="wdb_query_form_input_table"><TR><TD> </TD><TD><b><a href="/wdb/help/adp/phase3_help.html#UploadRawData"><abbr title="wdb_input_file_raw: Input file containing a list (one per line) of names of the files that originated the products you want to retrieve">Raw Data File List </abbr></a></b> </TD> -<TD> <INPUT name="wdb_input_file_raw" type="file" value="" ></TD> -</TR></TABLE> - -</fieldset><fieldset class="legendBorder" style="background:#DDDDDD"><legend class="legendTitle"> <font style="font-family:'Arial',serif" color="006699" size="+1"><b>Sorting</b></font> </legend> -<TABLE class="wdb_query_form_input_table"><TR><TD></TD><TD><b><abbr title="order_main: ">Sort results by</abbr></b> </TD> -<TD> <SELECT id="order_main" name="order_main" style="vertical-align: middle" ><OPTION value="dummy"> None (Faster)</OPTION> -<OPTION value="object"> Object</OPTION> -<OPTION value="dec,ra"> DEC and RA</OPTION> -<OPTION value="mjd_obs"> MJD_OBS</OPTION> -<OPTION value="exptime desc"> Exposure_Time (descending)</OPTION> -<OPTION value="prodcatg"> Data Product Category</OPTION> -<OPTION value="wavelmin,filter,exp_start,prodcatg"> Wavelength(spectra) and Filter Name(imaging)</OPTION> -<OPTION value="publication_date desc"> Publication date (descending)</OPTION> -</SELECT></TD> -</TR></TABLE> -<table width="100%"><tr><td align="center" bgcolor="#aaaaaa"><font color="#ffffff" size="+1"> <b><a href="/wdb/html/wdb_query_help.html#ctrl">Extra Columns on Tabular Output</a></b></font></td></tr></table><SELECT id="extra_columns" name="extra_columns" size="2" multiple> -<option value="exp_end">Stop Time</option> -</SELECT> - <hr> - <div id="wdb_optional_output_modes"> - <INPUT type=checkbox name="force_tabular_mode" > - Use tabular output even if only one row is returned.<br> - <INPUT type=checkbox name="full_screen_mode" > - Use full-screen output even if more than one row is returned.<br> - </div><!-- closing wdb_optional_output_modes ***************************** --> - -</fieldset> -</FORM><div id="wdb_conf_tail"> -<center> -<!-- bottom navigator: home, help etc. put on a table so that they - fill out the full column --> - <table border="0" cellpadding="2" cellspacing="5"> - <tr> - <td width="33%" align="center" bgcolor="#006699"> - <a href="http://www.eso.org/"><font color="white" size="1"> - <strong>ESO HOME</strong></font></a></td> - <td width="33%" align="center" bgcolor="#006699"> - <a href="http://archive.eso.org/"><font color="white" size="1"> - <strong>ARCHIVE HOME</strong></font></a></td> - <td width="33%" align="center" bgcolor="#006699"> - <a href="http://archive.eso.org/cms/faq.html"><font color="white" size="1"> - <strong>ARCHIVE FAQ</strong></font></a></td> - </tr> - <tr> - <td colspan="3" align="center"> - <a href="/wdb/wdb.html">wdb 3.0g</a> - 21-SEP-2016 ...... - <a href="mailto:archive@eso.org?subject=wdb_form:phase3_main"> - <font size="1"><strong>Send comments to archive@eso.org - </strong></font></a></td> - </tr> - </table><!-- END bottom navigator --> -</center> -</div><!-- end of wdb_conf_tail --> -</BODY> -</html> diff --git a/astroquery/eso/tests/data/vvv_sgra_survey_response.tbl b/astroquery/eso/tests/data/vvv_sgra_survey_response.tbl deleted file mode 100644 index 57ecd550df..0000000000 --- a/astroquery/eso/tests/data/vvv_sgra_survey_response.tbl +++ /dev/null @@ -1,87 +0,0 @@ -��� -Collection,Release version,Run/Program ID,Object,RA,DEC,Instrument,DATE OBS,EXPTIME,Filter (imaging),Wavelength (spectra):,Product category,ORIGFILE,ARCFILE,REFERENC -VVV,3,179.B-2002(C),b333,265.964906,-29.292627,VIRCAM,2011-09-02T03:34:17.183,16.00,Ks,,SCIENCE.IMAGE,v20110901_00792_st_tl.fits.fz,ADP.2013-05-14T16:05:24.870,2012A&A...537A.107S -VVV,3,179.B-2002(C),b333,265.964906,-29.292627,VIRCAM,2011-09-02T03:34:17.183,16.00,Ks,,SCIENCE.SRCTBL,v20110901_00792_st_tl_cat.fits,ADP.2013-05-14T16:05:25.507,2012A&A...537A.107S -VVV,3,179.B-2002(C),b333,265.964982,-29.292778,VIRCAM,2011-09-26T00:32:14.496,16.00,Ks,,SCIENCE.SRCTBL,v20110925_00347_st_tl_cat.fits,ADP.2013-05-14T16:05:30.600,2012A&A...537A.107S -VVV,3,179.B-2002(C),b333,265.964982,-29.292778,VIRCAM,2011-09-26T00:32:14.496,16.00,Ks,,SCIENCE.IMAGE,v20110925_00347_st_tl.fits.fz,ADP.2013-05-14T16:05:11.617,2012A&A...537A.107S -VVV,3,179.B-2002(B),b333,265.966048,-29.296571,VIRCAM,2011-08-24T02:50:46.176,40.00,Z,,SCIENCE.IMAGE,v20110823_00377_st_tl.fits.fz,ADP.2013-05-14T16:05:27.657,2012A&A...537A.107S -VVV,3,179.B-2002(B),b333,265.966048,-29.296571,VIRCAM,2011-08-24T02:50:46.176,40.00,Z,,SCIENCE.SRCTBL,v20110823_00377_st_tl_cat.fits,ADP.2013-05-14T16:05:21.543,2012A&A...537A.107S -VVV,3,179.B-2002(B),b333,265.966066,-29.296520,VIRCAM,2011-08-05T04:37:17.183,16.00,Ks,,SCIENCE.IMAGE,v20110804_00755_st_tl.fits.fz,ADP.2013-05-14T16:05:34.827,2012A&A...537A.107S -VVV,3,179.B-2002(B),b333,265.966066,-29.296520,VIRCAM,2011-08-05T04:37:17.183,16.00,Ks,,SCIENCE.SRCTBL,v20110804_00755_st_tl_cat.fits,ADP.2013-05-14T16:05:34.853,2012A&A...537A.107S -VVV,3,179.B-2002(B),b333,265.966103,-29.296617,VIRCAM,2011-08-24T02:45:42.480,40.00,Y,,SCIENCE.IMAGE,v20110823_00365_st_tl.fits.fz,ADP.2013-05-14T16:05:25.023,2012A&A...537A.107S -VVV,3,179.B-2002(B),b333,265.966103,-29.296617,VIRCAM,2011-08-24T02:45:42.480,40.00,Y,,SCIENCE.SRCTBL,v20110823_00365_st_tl_cat.fits,ADP.2013-05-14T16:05:26.653,2012A&A...537A.107S -VVV,3,179.B-2002(B),b333,265.966106,-29.296567,VIRCAM,2011-09-16T02:26:19.966,16.00,Ks,,SCIENCE.IMAGE,v20110915_00491_st_tl.fits.fz,ADP.2013-05-14T16:05:23.037,2012A&A...537A.107S -VVV,3,179.B-2002(B),b333,265.966106,-29.296567,VIRCAM,2011-09-16T02:26:19.966,16.00,Ks,,SCIENCE.SRCTBL,v20110915_00491_st_tl_cat.fits,ADP.2013-05-14T16:05:12.063,2012A&A...537A.107S -VVV,3,179.B-2002(B),b333,265.966170,-29.296596,VIRCAM,2011-08-21T02:54:14.400,16.00,Ks,,SCIENCE.SRCTBL,v20110820_00578_st_tl_cat.fits,ADP.2013-05-14T16:05:26.307,2012A&A...537A.107S -VVV,3,179.B-2002(B),b333,265.966170,-29.296596,VIRCAM,2011-08-21T02:54:14.400,16.00,Ks,,SCIENCE.IMAGE,v20110820_00578_st_tl.fits.fz,ADP.2013-05-14T16:05:27.537,2012A&A...537A.107S -VVV,3,179.B-2002(B),b333,265.998762,-29.427820,VIRCAM,2010-08-15T03:23:03.263,16.00,H,,SCIENCE.IMAGE,v20100814_00686_st_tl.fits.fz,ADP.2011-06-24T14:57:13.877, -VVV,3,179.B-2002(B),b333,265.998762,-29.427820,VIRCAM,2010-08-15T03:23:03.263,16.00,H,,SCIENCE.SRCTBL,v20100814_00686_st_tl_cat.fits,ADP.2011-06-24T14:56:12.197, -VVV,3,179.B-2002(B),b333,265.998946,-29.427780,VIRCAM,2010-08-15T03:27:15.550,16.00,Ks,,SCIENCE.SRCTBL,v20100814_00698_st_tl_cat.fits,ADP.2011-06-24T14:55:41.880, -VVV,3,179.B-2002(B),b333,265.998946,-29.427780,VIRCAM,2010-08-15T03:31:33.240,48.00,J,,SCIENCE.IMAGE,v20100814_00710_st_tl.fits.fz,ADP.2011-06-24T14:55:45.103, -VVV,3,179.B-2002(B),b333,265.998946,-29.427780,VIRCAM,2010-08-15T03:31:33.240,48.00,J,,SCIENCE.SRCTBL,v20100814_00710_st_tl_cat.fits,ADP.2011-06-24T14:56:32.537, -VVV,3,179.B-2002(B),b333,265.998946,-29.427780,VIRCAM,2010-08-15T03:27:15.550,16.00,Ks,,SCIENCE.IMAGE,v20100814_00698_st_tl.fits.fz,ADP.2011-06-24T14:56:21.763, -VVV,3,179.B-2002(B),b334,266.830188,-28.051922,VIRCAM,2010-08-15T04:21:25.560,48.00,J,,SCIENCE.SRCTBL,v20100814_00818_st_tl_cat.fits,ADP.2014-03-20T09:57:22.767,"Saito et al. 2012, A&A, 537, A107" -VVV,3,179.B-2002(B),b334,266.830188,-28.051922,VIRCAM,2010-08-15T04:21:25.560,48.00,J,,SCIENCE.IMAGE,v20100814_00818_st_tl.fits.fz,ADP.2014-03-20T09:57:22.560,"Saito et al. 2012, A&A, 537, A107" -VVV,3,179.B-2002(C),b334,266.831581,-28.047758,VIRCAM,2011-09-26T00:28:12.576,16.00,Ks,,SCIENCE.SRCTBL,v20110925_00335_st_tl_cat.fits,ADP.2013-05-14T16:05:22.283,2012A&A...537A.107S -VVV,3,179.B-2002(C),b334,266.831581,-28.047758,VIRCAM,2011-09-26T00:28:12.576,16.00,Ks,,SCIENCE.IMAGE,v20110925_00335_st_tl.fits.fz,ADP.2013-05-14T16:05:14.507,2012A&A...537A.107S -VVV,3,179.B-2002(C),b334,266.831655,-28.047724,VIRCAM,2011-09-02T03:29:00.960,16.00,Ks,,SCIENCE.SRCTBL,v20110901_00780_st_tl_cat.fits,ADP.2013-05-14T16:05:35.990,2012A&A...537A.107S -VVV,3,179.B-2002(C),b334,266.831655,-28.047724,VIRCAM,2011-09-02T03:29:00.960,16.00,Ks,,SCIENCE.IMAGE,v20110901_00780_st_tl.fits.fz,ADP.2013-05-14T16:05:27.153,2012A&A...537A.107S -VVV,3,179.B-2002(B),b334,266.832653,-28.051521,VIRCAM,2011-08-30T03:11:36.383,40.00,Y,,SCIENCE.IMAGE,v20110829_00343_st_tl.fits.fz,ADP.2013-05-14T16:05:35.407,2012A&A...537A.107S -VVV,3,179.B-2002(B),b334,266.832653,-28.051521,VIRCAM,2011-08-30T03:11:36.383,40.00,Y,,SCIENCE.SRCTBL,v20110829_00343_st_tl_cat.fits,ADP.2013-05-14T16:05:17.433,2012A&A...537A.107S -VVV,3,179.B-2002(B),b334,266.832667,-28.051403,VIRCAM,2011-08-05T04:45:50.400,16.00,Ks,,SCIENCE.IMAGE,v20110804_00779_st_tl.fits.fz,ADP.2013-05-14T16:05:21.883,2012A&A...537A.107S -VVV,3,179.B-2002(B),b334,266.832667,-28.051403,VIRCAM,2011-08-05T04:45:50.400,16.00,Ks,,SCIENCE.SRCTBL,v20110804_00779_st_tl_cat.fits,ADP.2013-05-14T16:05:25.823,2012A&A...537A.107S -VVV,3,179.B-2002(B),b334,266.832754,-28.051466,VIRCAM,2011-08-30T03:16:28.416,40.00,Z,,SCIENCE.IMAGE,v20110829_00355_st_tl.fits.fz,ADP.2013-05-14T16:05:15.087,2012A&A...537A.107S -VVV,3,179.B-2002(B),b334,266.832754,-28.051466,VIRCAM,2011-08-30T03:16:28.416,40.00,Z,,SCIENCE.SRCTBL,v20110829_00355_st_tl_cat.fits,ADP.2013-05-14T16:05:24.443,2012A&A...537A.107S -VVV,3,179.B-2002(B),b334,266.832765,-28.051513,VIRCAM,2011-09-16T02:36:23.903,16.00,Ks,,SCIENCE.SRCTBL,v20110915_00515_st_tl_cat.fits,ADP.2013-05-14T16:05:15.050,2012A&A...537A.107S -VVV,3,179.B-2002(B),b334,266.832765,-28.051513,VIRCAM,2011-09-16T02:36:23.903,16.00,Ks,,SCIENCE.IMAGE,v20110915_00515_st_tl.fits.fz,ADP.2013-05-14T16:05:23.170,2012A&A...537A.107S -VVV,3,179.B-2002(B),b334,266.832774,-28.051314,VIRCAM,2011-08-21T03:04:14.160,16.00,Ks,,SCIENCE.IMAGE,v20110820_00602_st_tl.fits.fz,ADP.2013-05-14T16:05:30.920,2012A&A...537A.107S -VVV,3,179.B-2002(B),b334,266.832774,-28.051314,VIRCAM,2011-08-21T03:04:14.160,16.00,Ks,,SCIENCE.SRCTBL,v20110820_00602_st_tl_cat.fits,ADP.2013-05-14T16:05:15.510,2012A&A...537A.107S -VVV,3,179.B-2002(B),b334,266.865821,-28.182590,VIRCAM,2010-08-15T04:12:06.480,16.00,H,,SCIENCE.IMAGE,v20100814_00794_st_tl.fits.fz,ADP.2011-06-24T14:56:28.483, -VVV,3,179.B-2002(B),b334,266.865821,-28.182590,VIRCAM,2010-08-15T04:12:06.480,16.00,H,,SCIENCE.SRCTBL,v20100814_00794_st_tl_cat.fits,ADP.2011-06-24T14:56:18.953, -VVV,3,179.B-2002(B),b334,266.865992,-28.182550,VIRCAM,2010-08-15T04:16:19.200,16.00,Ks,,SCIENCE.SRCTBL,v20100814_00806_st_tl_cat.fits,ADP.2011-06-24T14:57:15.417, -VVV,3,179.B-2002(B),b334,266.865992,-28.182550,VIRCAM,2010-08-15T04:16:19.200,16.00,Ks,,SCIENCE.IMAGE,v20100814_00806_st_tl.fits.fz,ADP.2011-06-24T14:57:04.863, -VVV,3,179.B-2002(C),b319,267.037580,-29.861132,VIRCAM,2011-09-02T02:04:30.143,16.00,Ks,,SCIENCE.IMAGE,v20110901_00576_st_tl.fits.fz,ADP.2013-05-14T16:05:11.280,2012A&A...537A.107S -VVV,3,179.B-2002(C),b319,267.037580,-29.861132,VIRCAM,2011-09-02T02:04:30.143,16.00,Ks,,SCIENCE.SRCTBL,v20110901_00576_st_tl_cat.fits,ADP.2013-05-14T16:05:26.283,2012A&A...537A.107S -VVV,3,179.B-2002(C),b319,267.037626,-29.861068,VIRCAM,2011-08-07T04:40:14.303,16.00,Ks,,SCIENCE.IMAGE,v20110806_00675_st_tl.fits.fz,ADP.2013-05-14T16:05:34.297,2012A&A...537A.107S -VVV,3,179.B-2002(C),b319,267.037626,-29.861068,VIRCAM,2011-08-07T04:40:14.303,16.00,Ks,,SCIENCE.SRCTBL,v20110806_00675_st_tl_cat.fits,ADP.2013-05-14T16:05:24.930,2012A&A...537A.107S -VVV,3,179.B-2002(B),b319,267.038687,-29.864848,VIRCAM,2011-08-02T04:31:50.590,40.00,Z,,SCIENCE.IMAGE,v20110801_00496_st_tl.fits.fz,ADP.2013-05-14T16:05:14.310,2012A&A...537A.107S -VVV,3,179.B-2002(B),b319,267.038687,-29.864848,VIRCAM,2011-08-02T04:31:50.590,40.00,Z,,SCIENCE.SRCTBL,v20110801_00496_st_tl_cat.fits,ADP.2013-05-14T16:05:37.093,2012A&A...537A.107S -VVV,3,179.B-2002(B),b319,267.038733,-29.864968,VIRCAM,2011-09-20T01:45:01.150,16.00,Ks,,SCIENCE.IMAGE,v20110919_00533_st_tl.fits.fz,ADP.2013-05-14T16:05:25.423,2012A&A...537A.107S -VVV,3,179.B-2002(B),b319,267.038733,-29.864968,VIRCAM,2011-09-20T01:45:01.150,16.00,Ks,,SCIENCE.SRCTBL,v20110919_00533_st_tl_cat.fits,ADP.2013-05-14T16:05:25.337,2012A&A...537A.107S -VVV,3,179.B-2002(B),b319,267.038737,-29.864909,VIRCAM,2011-09-16T01:14:47.616,16.00,Ks,,SCIENCE.IMAGE,v20110915_00299_st_tl.fits.fz,ADP.2013-05-14T16:05:25.527,2012A&A...537A.107S -VVV,3,179.B-2002(B),b319,267.038737,-29.864909,VIRCAM,2011-09-16T01:14:47.616,16.00,Ks,,SCIENCE.SRCTBL,v20110915_00299_st_tl_cat.fits,ADP.2013-05-14T16:05:12.863,2012A&A...537A.107S -VVV,3,179.B-2002(B),b319,267.038749,-29.864867,VIRCAM,2011-08-02T04:26:43.870,40.00,Y,,SCIENCE.SRCTBL,v20110801_00484_st_tl_cat.fits,ADP.2013-05-14T16:05:17.993,2012A&A...537A.107S -VVV,3,179.B-2002(B),b319,267.038749,-29.864867,VIRCAM,2011-08-02T04:26:43.870,40.00,Y,,SCIENCE.IMAGE,v20110801_00484_st_tl.fits.fz,ADP.2013-05-14T16:05:19.840,2012A&A...537A.107S -VVV,3,179.B-2002(B),b319,267.072950,-29.995730,VIRCAM,2010-07-12T04:53:23.996,16.00,H,,SCIENCE.IMAGE,v20100711_00494_st_tl.fits.fz,ADP.2011-06-24T14:56:06.843, -VVV,3,179.B-2002(B),b319,267.072950,-29.995730,VIRCAM,2010-09-06T01:08:30.913,16.00,Ks,,SCIENCE.SRCTBL,v20100905_00229_st_tl_cat.fits,ADP.2011-06-24T14:55:42.183, -VVV,3,179.B-2002(B),b319,267.072950,-29.995730,VIRCAM,2010-09-12T01:27:00.286,16.00,Ks,,SCIENCE.SRCTBL,v20100911_00256_st_tl_cat.fits,ADP.2011-06-24T14:55:59.280, -VVV,3,179.B-2002(B),b319,267.072950,-29.995730,VIRCAM,2010-07-11T06:43:56.926,16.00,H,,SCIENCE.IMAGE,v20100710_00698_st_tl.fits.fz,ADP.2011-06-24T14:56:26.630, -VVV,3,179.B-2002(B),b319,267.072950,-29.995730,VIRCAM,2010-07-12T04:53:23.996,16.00,H,,SCIENCE.SRCTBL,v20100711_00494_st_tl_cat.fits,ADP.2011-06-24T14:56:20.930, -VVV,3,179.B-2002(B),b319,267.072950,-29.995730,VIRCAM,2010-07-11T04:37:37.560,16.00,H,,SCIENCE.SRCTBL,v20100710_00500_st_tl_cat.fits,ADP.2011-06-24T14:56:04.870, -VVV,3,179.B-2002(B),b319,267.072950,-29.995730,VIRCAM,2010-09-06T01:08:30.913,16.00,Ks,,SCIENCE.IMAGE,v20100905_00229_st_tl.fits.fz,ADP.2011-06-24T14:57:09.257, -VVV,3,179.B-2002(B),b319,267.072950,-29.995730,VIRCAM,2010-07-11T04:37:37.560,16.00,H,,SCIENCE.IMAGE,v20100710_00500_st_tl.fits.fz,ADP.2011-06-24T14:57:16.523, -VVV,3,179.B-2002(B),b319,267.072950,-29.995730,VIRCAM,2010-08-10T02:26:02.686,16.00,H,,SCIENCE.SRCTBL,v20100809_00353_st_tl_cat.fits,ADP.2011-06-24T14:55:37.577, -VVV,3,179.B-2002(B),b319,267.072950,-29.995730,VIRCAM,2010-09-12T01:27:00.286,16.00,Ks,,SCIENCE.IMAGE,v20100911_00256_st_tl.fits.fz,ADP.2011-06-24T14:56:29.613, -VVV,3,179.B-2002(B),b319,267.072950,-29.995730,VIRCAM,2010-08-10T02:26:02.686,16.00,H,,SCIENCE.IMAGE,v20100809_00353_st_tl.fits.fz,ADP.2011-06-24T14:56:33.187, -VVV,3,179.B-2002(B),b319,267.072950,-29.995730,VIRCAM,2010-07-11T06:43:56.926,16.00,H,,SCIENCE.SRCTBL,v20100710_00698_st_tl_cat.fits,ADP.2011-06-24T14:56:50.367, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-07-11T06:48:20.446,16.00,Ks,,SCIENCE.IMAGE,v20100710_00710_st_tl.fits.fz,ADP.2011-06-24T14:55:51.327, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-07-12T05:02:29.183,48.00,J,,SCIENCE.SRCTBL,v20100711_00518_st_tl_cat.fits,ADP.2011-06-24T14:56:23.240, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-08-10T02:35:38.976,48.00,J,,SCIENCE.SRCTBL,v20100809_00377_st_tl_cat.fits,ADP.2011-06-24T14:56:30.097, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-07-12T05:02:29.183,48.00,J,,SCIENCE.IMAGE,v20100711_00518_st_tl.fits.fz,ADP.2011-06-24T14:56:05.303, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-07-11T06:52:39.646,48.00,J,,SCIENCE.IMAGE,v20100710_00722_st_tl.fits.fz,ADP.2011-06-24T14:56:22.643, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-07-11T06:52:39.646,48.00,J,,SCIENCE.SRCTBL,v20100710_00722_st_tl_cat.fits,ADP.2011-06-24T14:56:07.843, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-04-22T08:14:02.976,48.00,J,,SCIENCE.SRCTBL,v20100421_01023_st_tl_cat.fits,ADP.2011-06-24T14:56:03.257, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-04-22T08:10:38.206,16.00,Ks,,SCIENCE.SRCTBL,v20100421_01011_st_tl_cat.fits,ADP.2011-06-24T14:56:11.907, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-07-11T06:48:20.446,16.00,Ks,,SCIENCE.SRCTBL,v20100710_00710_st_tl_cat.fits,ADP.2011-06-24T14:56:21.180, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-04-22T08:14:02.976,48.00,J,,SCIENCE.IMAGE,v20100421_01023_st_tl.fits.fz,ADP.2011-06-24T14:57:07.323, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-07-11T04:47:11.616,48.00,J,,SCIENCE.IMAGE,v20100710_00524_st_tl.fits.fz,ADP.2011-06-24T14:55:29.060, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-08-10T02:35:38.976,48.00,J,,SCIENCE.IMAGE,v20100809_00377_st_tl.fits.fz,ADP.2011-06-24T14:56:52.797, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-07-12T04:57:57.240,16.00,Ks,,SCIENCE.IMAGE,v20100711_00506_st_tl.fits.fz,ADP.2011-06-24T14:56:36.737, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-07-11T04:47:11.616,48.00,J,,SCIENCE.SRCTBL,v20100710_00524_st_tl_cat.fits,ADP.2011-06-24T14:55:52.640, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-07-12T04:57:57.240,16.00,Ks,,SCIENCE.SRCTBL,v20100711_00506_st_tl_cat.fits,ADP.2011-06-24T14:56:53.103, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-08-10T02:30:50.400,16.00,Ks,,SCIENCE.SRCTBL,v20100809_00365_st_tl_cat.fits,ADP.2011-06-24T14:56:01.750, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-04-22T08:10:38.206,16.00,Ks,,SCIENCE.IMAGE,v20100421_01011_st_tl.fits.fz,ADP.2011-06-24T14:57:00.870, -VVV,3,179.B-2002(B),b319,267.073133,-29.995690,VIRCAM,2010-08-10T02:30:50.400,16.00,Ks,,SCIENCE.IMAGE,v20100809_00365_st_tl.fits.fz,ADP.2011-06-24T14:56:28.187, - -# A total of 82 records were found matching the provided criteria. -# \ No newline at end of file diff --git a/astroquery/eso/tests/test_eso.py b/astroquery/eso/tests/test_eso.py index ef8b9efafd..25aab95b15 100644 --- a/astroquery/eso/tests/test_eso.py +++ b/astroquery/eso/tests/test_eso.py @@ -1,14 +1,29 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst +""" +=========================== +ESO Astroquery Module tests +=========================== + +European Southern Observatory (ESO) + +""" import os import shutil import sys +import pickle import pytest +import pyvo +from astropy.table import Table from astroquery.utils.mocks import MockResponse from ...eso import Eso +from ...eso.utils import py2adql, adql_sanitize_val +from ...exceptions import NoResultsWarning, MaxResultsWarning DATA_DIR = os.path.join(os.path.dirname(__file__), 'data') +EXPECTED_MAXREC = 1000 +MONKEYPATCH_TABLE_LENGTH = 50 def data_path(filename): @@ -18,27 +33,66 @@ def data_path(filename): DATA_FILES = { 'GET': { - 'http://archive.eso.org/wdb/wdb/eso/eso_archive_main/form': 'main_query_form.html', - 'http://archive.eso.org/wdb/wdb/eso/amber/form': 'amber_query_form.html', - 'http://archive.eso.org/wdb/wdb/adp/phase3_main/form': 'vvv_sgra_form.html', Eso.AUTH_URL: 'oidc_token.json', }, 'POST': { - 'http://archive.eso.org/wdb/wdb/eso/eso_archive_main/query': 'main_sgra_query.tbl', - 'http://archive.eso.org/wdb/wdb/eso/amber/query': 'amber_sgra_query.tbl', - 'http://archive.eso.org/wdb/wdb/adp/phase3_main/query': 'vvv_sgra_survey_response.tbl', + 'https://archive.eso.org/wdb/wdb/eso/eso_archive_main/query': 'main_sgra_query.tbl', + 'https://archive.eso.org/wdb/wdb/eso/amber/query': 'amber_sgra_query.tbl', + 'https://archive.eso.org/wdb/wdb/adp/phase3_main/query': 'vvv_sgra_survey_response.tbl', + }, + 'ADQL': + { + # TODO: Point the second query to an IST when the ISTs are available. + # TODO: Fix the apex query when the backend is available. + "select * from ivoa.ObsCore where obs_collection in ('VVV') and " + "intersects(s_region, circle('ICRS', 266.41681662, -29.00782497, 0.1775))=1": + "query_coll_vvv_sgra.pickle", + + "select * from ist.sinfoni where target = 'SGRA'": + "query_inst_sinfoni_sgra.pickle", + + "select * from dbo.raw where target = 'SGR A' and object = 'SGR A'": + "query_main_sgra.pickle", + + "select distinct obs_collection from ivoa.ObsCore": "query_list_collections.pickle", + + "select table_name from TAP_SCHEMA.tables where schema_name='ist' order by table_name": + "query_list_instruments.pickle", + + "APEX_QUERY_PLACEHOLDER": "query_apex_ql_5.pickle", + + "generic cached query": + "fd303fa27993048bd2393af067fe5ceccf4817c288ce5c0b4343386f.pickle", + + "query points to non table file": + "2031769bb0e68fb2816bf5680203e586eea71ca58b2694a71a428605.pickle" } } +TEST_COLLECTIONS = [ + '081.C-0827', 'ADHOC', 'CAFFEINE', 'ENTROPY', 'GAIAESO', 'HARPS', 'INSPIRE', 'KIDS', 'ZCOSMOS'] +TEST_INSTRUMENTS = [ + 'amber', 'crires', 'espresso', 'fors1', 'giraffe', 'gravity', 'midi', 'xshooter'] + def eso_request(request_type, url, **kwargs): + _ = kwargs with open(data_path(DATA_FILES[request_type][url]), 'rb') as f: response = MockResponse(content=f.read(), url=url) return response +def monkey_tap(query_str, **kwargs): + _ = kwargs + table_file = data_path(DATA_FILES['ADQL'][query_str]) + with open(table_file, "rb") as f: + table = pickle.load(f) + return table + + def download_request(url, **kwargs): + _ = kwargs filename = 'testfile.fits.Z' with open(data_path(filename), 'rb') as f: header = {'Content-Disposition': f'filename={filename}'} @@ -51,7 +105,8 @@ def calselector_request(url, **kwargs): if is_multipart: filename = 'FORS2.2021-01-02T00_59_12.533_raw2raw_multipart.xml' header = { - 'Content-Type': 'multipart/form-data; boundary=uFQlfs9nBIDEAIoz0_ZM-O2SXKsZ2iSd4h7H;charset=UTF-8' + 'Content-Type': 'multipart/form-data; ' + 'boundary=uFQlfs9nBIDEAIoz0_ZM-O2SXKsZ2iSd4h7H;charset=UTF-8' } else: filename = 'FORS2.2021-01-02T00_59_12.533_raw2raw.xml' @@ -64,67 +119,59 @@ def calselector_request(url, **kwargs): return response -# @pytest.fixture -# def patch_get(request): -# mp = request.getfixturevalue("monkeypatch") -# -# mp.setattr(Eso, 'request', eso_request) -# return mp - -# This test should attempt to access the internet and therefore should fail -# (_activate_form always connects to the internet) -# @pytest.mark.xfail -def test_amber_SgrAstar(monkeypatch): - # Local caching prevents a remote query here - - eso = Eso() - +def test_sinfoni_sgr_a_star(monkeypatch): # monkeypatch instructions from https://pytest.org/latest/monkeypatch.html - monkeypatch.setattr(eso, '_request', eso_request) - # set up local cache path to prevent remote query - eso.cache_location = DATA_DIR - - # the failure should occur here - result = eso.query_instrument('amber', target='Sgr A*') - - # test that max_results = 50 - assert len(result) == 50 - assert 'GC_IRS7' in result['Object'] - - -def test_main_SgrAstar(monkeypatch): - # Local caching prevents a remote query here - eso = Eso() + monkeypatch.setattr(eso, 'query_tap_service', monkey_tap) + result = eso.query_instrument('sinfoni', target='SGRA') + # test all results are there and the expected target is present + assert len(result) == MONKEYPATCH_TABLE_LENGTH + assert 'SGRA' in result['target'] - # monkeypatch instructions from https://pytest.org/latest/monkeypatch.html - monkeypatch.setattr(eso, '_request', eso_request) - # set up local cache path to prevent remote query - eso.cache_location = DATA_DIR - - # the failure should occur here - result = eso.query_main(target='Sgr A*') - # test that max_results = 50 - assert len(result) == 50 - assert 'GC_IRS7' in result['OBJECT'] +def test_main_sgr_a_star(monkeypatch): + # monkeypatch instructions from https://pytest.org/latest/monkeypatch.html + eso = Eso() + monkeypatch.setattr(eso, 'query_tap_service', monkey_tap) + result = eso.query_main(target='SGR A', object='SGR A') + # test all results are there and the expected target is present + assert len(result) == 23 + assert 'SGR A' in result['object'] + assert 'SGR A' in result['target'] def test_vvv(monkeypatch): + # monkeypatch instructions from https://pytest.org/latest/monkeypatch.html eso = Eso() - monkeypatch.setattr(eso, '_request', eso_request) - eso.cache_location = DATA_DIR + monkeypatch.setattr(eso, 'query_tap_service', monkey_tap) + result = eso.query_surveys(surveys='VVV', + ra=266.41681662, dec=-29.00782497, + radius=0.1775, + ) + # test all results are there and the expected target is present + assert len(result) == MONKEYPATCH_TABLE_LENGTH + assert 'target_name' in result.colnames + assert 'b333' in result['target_name'] + + +def test_list_collections(monkeypatch): + eso = Eso() + monkeypatch.setattr(eso, 'query_tap_service', monkey_tap) + saved_list = eso.list_surveys() + assert isinstance(saved_list, list) + assert set(TEST_COLLECTIONS) <= set(saved_list) + - result_s = eso.query_surveys(surveys='VVV', - coord1=266.41681662, coord2=-29.00782497, - box='01 00 00', - ) - assert result_s is not None - assert 'Object' in result_s.colnames - assert 'b333' in result_s['Object'] +def test_list_instruments(monkeypatch): + eso = Eso() + monkeypatch.setattr(eso, 'query_tap_service', monkey_tap) + saved_list = eso.list_instruments() + assert isinstance(saved_list, list) + assert set(TEST_INSTRUMENTS) <= set(saved_list) def test_authenticate(monkeypatch): + # monkeypatch instructions from https://pytest.org/latest/monkeypatch.html eso = Eso() monkeypatch.setattr(eso, '_request', eso_request) eso.cache_location = DATA_DIR @@ -133,6 +180,7 @@ def test_authenticate(monkeypatch): def test_download(monkeypatch, tmp_path): + # monkeypatch instructions from https://pytest.org/latest/monkeypatch.html eso = Eso() eso.cache_location = tmp_path fileid = 'testfile' @@ -163,17 +211,19 @@ def test_cached_file(): def test_calselector(monkeypatch, tmp_path): + # monkeypatch instructions from https://pytest.org/latest/monkeypatch.html eso = Eso() eso.cache_location = tmp_path dataset = 'FORS2.2021-01-02T00:59:12.533' monkeypatch.setattr(eso._session, 'post', calselector_request) result = eso.get_associated_files([dataset], savexml=True) assert isinstance(result, list) - assert len(result) == 50 + assert len(result) == MONKEYPATCH_TABLE_LENGTH assert dataset not in result def test_calselector_multipart(monkeypatch, tmp_path): + # monkeypatch instructions from https://pytest.org/latest/monkeypatch.html eso = Eso() eso.cache_location = tmp_path datasets = ['FORS2.2021-01-02T00:59:12.533', 'FORS2.2021-01-02T00:59:12.534'] @@ -182,3 +232,228 @@ def test_calselector_multipart(monkeypatch, tmp_path): assert isinstance(result, list) assert len(result) == 99 assert datasets[0] not in result and datasets[1] not in result + + +def test_tap_url(): + tap_url_env_var = "ESO_TAP_URL" + tmpvar = None + dev_url = "dev_url" + prod_url = "https://archive.eso.org/tap_obs" + + # ESO_TAP_URL shouldn't be set to start the test + try: + tmpvar = os.environ[tap_url_env_var] + del os.environ[tap_url_env_var] + except KeyError: + pass + + eso_instance = Eso() + + # ESO_TAP_URL not set + assert eso_instance._tap_url() == prod_url + + # ESO_TAP_URL set + os.environ[tap_url_env_var] = dev_url + assert eso_instance._tap_url() == dev_url + + # set again the env vars, in case we deleted it earlier + if tmpvar: + os.environ[tap_url_env_var] = tmpvar + + +def test_adql_sanitize_val(): + # adql queries are themselves strings. + # field that are strings are surrounded by single quotes ('') + # This function sanitizes values so that the following queries + # are correctly written: + # select [...] where x_int = 9 + # select [...] where x_str = '9' + + assert adql_sanitize_val("ciao") == "'ciao'" + assert adql_sanitize_val(1) == "1" + assert adql_sanitize_val(1.5) == "1.5" + assert adql_sanitize_val("1.5") == "'1.5'" + + +def test_maxrec(): + eso_instance = Eso() + + # EXPECTED_MAXREC is the default value in the conf + maxrec = eso_instance.maxrec + assert maxrec == EXPECTED_MAXREC + + # we change it to 5 + eso_instance.maxrec = 5 + maxrec = eso_instance.maxrec + assert maxrec == 5 + + # change it to no-truncation + eso_instance.maxrec = None + maxrec = eso_instance.maxrec + assert maxrec == sys.maxsize + + # no truncation + eso_instance.maxrec = 0 + maxrec = eso_instance.maxrec + assert maxrec == sys.maxsize + + # no truncation + eso_instance.maxrec = -1 + maxrec = eso_instance.maxrec + assert maxrec == sys.maxsize + + +def test_download_pyvo_table(): + eso_instance = Eso() + dal = pyvo.dal.TAPService(eso_instance._tap_url()) + + q_str = "select * from ivoa.ObsCore" + table = None + with pytest.raises(pyvo.dal.exceptions.DALFormatError): + table = eso_instance._try_download_pyvo_table(q_str, dal) + + assert table is None + + +def test_issue_table_length_warnings(): + eso_instance = Eso() + + # should warn, since the table is empty + t = Table() + with pytest.warns(NoResultsWarning): + eso_instance._maybe_warn_about_table_length(t) + + # should warn, since EXPECTED_MAXREC = eso_instance.maxrec + t = Table({"col_name": [i for i in range(EXPECTED_MAXREC)]}) + with pytest.warns(MaxResultsWarning): + eso_instance._maybe_warn_about_table_length(t) + + # should not warn + t = Table({"col_name": [i for i in range(51)]}) + eso_instance._maybe_warn_about_table_length(t) + + +def test_py2adql(): + """ + # Example query: + # + # SELECT + # target_name, dp_id, s_ra, s_dec, t_exptime, em_min, em_max, + # dataproduct_type, instrument_name, obstech, abmaglim, + # proposal_id, obs_collection + # FROM + # ivoa.ObsCore + # WHERE + # intersects(s_region, circle('ICRS', 109.668246, -24.558700, 0.001389))=1 + # AND + # dataproduct_type in ('spectrum') + # AND + # em_min>4.0e-7 + # AND + # em_max<1.2e-6 + # ORDER BY SNR DESC + """ + + # Simple tests + q = py2adql('ivoa.ObsCore') + eq = "select * from ivoa.ObsCore" + assert eq == q, f"Expected:\n{eq}\n\nObtained:\n{q}\n\n" + + q = py2adql('ivoa.ObsCore', columns='') + eq = "select * from ivoa.ObsCore" + assert eq == q, f"Expected:\n{eq}\n\nObtained:\n{q}\n\n" + + q = py2adql('ivoa.ObsCore', columns='*') + eq = "select * from ivoa.ObsCore" + assert eq == q, f"Expected:\n{eq}\n\nObtained:\n{q}\n\n" + + q = py2adql('pinko.Pallino', ['pippo', 'tizio', 'caio']) + eq = "select pippo, tizio, caio from pinko.Pallino" + assert eq == q, f"Expected:\n{eq}\n\nObtained:\n{q}\n\n" + + q = py2adql('pinko.Pallino', ['pippo', 'tizio', 'caio']) + eq = "select pippo, tizio, caio from pinko.Pallino" + assert eq == q, f"Expected:\n{eq}\n\nObtained:\n{q}\n\n" + + q = py2adql('pinko.Pallino', ['pippo', 'tizio', 'caio'], + where_constraints=['asdf > 1', 'asdf < 2', 'asdf = 3', 'asdf != 4'], + order_by='order_col') + eq = "select pippo, tizio, caio from pinko.Pallino " + \ + "where asdf > 1 and asdf < 2 and asdf = 3 and asdf != 4 " + \ + "order by order_col desc" + assert eq == q, f"Expected:\n{eq}\n\nObtained:\n{q}\n\n" + + q = py2adql('pinko.Pallino', ['pippo', 'tizio', 'caio'], + where_constraints=["asdf = 'ASDF'", "bcd = 'BCD'"], + order_by='order_col') + eq = "select pippo, tizio, caio from pinko.Pallino " + \ + "where asdf = 'ASDF' and bcd = 'BCD' " + \ + "order by order_col desc" + assert eq == q, f"Expected:\n{eq}\n\nObtained:\n{q}\n\n" + + # All arguments + columns = 'target_name, dp_id, s_ra, s_dec, t_exptime, em_min, em_max, ' + \ + 'dataproduct_type, instrument_name, obstech, abmaglim, ' + \ + 'proposal_id, obs_collection' + table = 'ivoa.ObsCore' + and_c_list = ['em_min>4.0e-7', 'em_max<1.2e-6', 'asdasdads'] + + q = py2adql(columns=columns, table=table, + where_constraints=and_c_list, + order_by='snr', order_by_desc=True) + expected_query = 'select ' + columns + ' from ' + table + \ + ' where ' + and_c_list[0] + ' and ' + and_c_list[1] + ' and ' + and_c_list[2] + \ + " order by snr desc" + assert expected_query == q, f"Expected:\n{expected_query}\n\nObtained:\n{q}\n\n" + + # All arguments + q = py2adql(columns=columns, table=table, + where_constraints=and_c_list, + order_by='snr', order_by_desc=False) + expected_query = 'select ' + columns + ' from ' + table + \ + ' where ' + and_c_list[0] + ' and ' + and_c_list[1] + ' and ' + and_c_list[2] + \ + " order by snr asc" + assert expected_query == q, f"Expected:\n{expected_query}\n\nObtained:\n{q}\n\n" + + # ra, dec, radius + q = py2adql(columns=columns, table=table, + where_constraints=and_c_list, + order_by='snr', order_by_desc=False, + ra=1, dec=2, radius=3) + expected_query = 'select ' + columns + ' from ' + table + \ + ' where ' + and_c_list[0] + ' and ' + and_c_list[1] + ' and ' + and_c_list[2] + \ + ' and intersects(s_region, circle(\'ICRS\', 1, 2, 3))=1' + \ + " order by snr asc" + assert expected_query == q, f"Expected:\n{expected_query}\n\nObtained:\n{q}\n\n" + + # ra, dec, radius + q = py2adql(columns=columns, table=table, + where_constraints=and_c_list, + order_by='snr', order_by_desc=False, + ra=1.23, dec=2.34, radius=3.45) + expected_query = 'select ' + columns + ' from ' + table + \ + ' where ' + and_c_list[0] + ' and ' + and_c_list[1] + ' and ' + and_c_list[2] + \ + ' and intersects(s_region, circle(\'ICRS\', 1.23, 2.34, 3.45))=1' + \ + " order by snr asc" + + # count only + q = py2adql(columns=columns, table=table, + where_constraints=and_c_list, + order_by='snr', order_by_desc=False, + ra=1.23, dec=2.34, radius=3.45, count_only=True) + expected_query = ("select count(*) from ivoa.ObsCore where " + "em_min>4.0e-7 and em_max<1.2e-6 and asdasdads " + "and intersects(s_region, circle('ICRS', 1.23, 2.34, 3.45))=1 " + "order by snr asc") + + # top + q = py2adql(columns=columns, table=table, + where_constraints=and_c_list, + order_by='snr', order_by_desc=False, + ra=1.23, dec=2.34, radius=3.45, top=5) + expected_query = 'select top 5 ' + columns + ' from ' + table + \ + ' where ' + and_c_list[0] + ' and ' + and_c_list[1] + ' and ' + and_c_list[2] + \ + ' and intersects(s_region, circle(\'ICRS\', 1.23, 2.34, 3.45))=1' + \ + " order by snr asc" + + assert expected_query == q, f"Expected:\n{expected_query}\n\nObtained:\n{q}\n\n" diff --git a/astroquery/eso/tests/test_eso_remote.py b/astroquery/eso/tests/test_eso_remote.py index 5e5d362985..12c3cd398b 100644 --- a/astroquery/eso/tests/test_eso_remote.py +++ b/astroquery/eso/tests/test_eso_remote.py @@ -1,105 +1,199 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst +""" +=========================== +ESO Astroquery Module tests +=========================== -import numpy as np -import pytest +European Southern Observatory (ESO) -from astroquery.eso import Eso -from astroquery.exceptions import NoResultsWarning +""" -instrument_list = [u'fors1', u'fors2', u'sphere', u'vimos', u'omegacam', - u'hawki', u'isaac', u'naco', u'visir', u'vircam', u'apex', - u'giraffe', u'uves', u'xshooter', u'muse', u'crires', - u'kmos', u'sinfoni', u'amber', u'midi', u'pionier', - u'gravity', u'espresso', u'wlgsu', u'matisse', u'eris'] +from collections import Counter +import pytest -# Some tests take too long, leading to travis timeouts -# TODO: make this a configuration item -SKIP_SLOW = True +from astropy.table import Table +from astroquery.exceptions import NoResultsWarning, MaxResultsWarning +from astroquery.eso import Eso -SGRA_SURVEYS = ['195.B-0283', 'GIRAFFE', 'HARPS', 'HAWKI', 'KMOS', - 'ERIS-SPIFFIER', - 'MW-BULGE-PSFPHOT', 'VPHASplus', 'VVV', 'VVVX', 'XSHOOTER'] +instrument_list = ['alpaca', 'fors1', 'fors2', 'sphere', 'vimos', 'omegacam', + 'hawki', 'isaac', 'naco', 'visir', 'vircam', + 'apex', + 'giraffe', 'uves', 'xshooter', 'muse', 'crires', + 'kmos', 'sinfoni', 'amber', 'midi', 'pionier', + 'gravity', 'espresso', 'wlgsu', 'matisse', 'eris', + 'fiat', + 'efosc', 'harps', 'nirps', 'sofi' + ] + +SGRA_COLLECTIONS = ['195.B-0283', + 'ALMA', + 'ATLASGAL', + 'ERIS-SPIFFIER', + 'GIRAFFE', + 'HARPS', + 'HAWKI', + 'KMOS', + 'MW-BULGE-PSFPHOT', + 'VPHASplus', + 'VVV', + 'VVVX', + 'XSHOOTER' + ] @pytest.mark.remote_data class TestEso: - def test_SgrAstar(self, tmp_path): + @pytest.mark.filterwarnings("ignore::pyvo.dal.exceptions.DALOverflowWarning") + def test_query_tap_service(self): eso = Eso() - eso.cache_location = tmp_path + eso.maxrec = 7 + with pytest.warns(MaxResultsWarning): + t = eso.query_tap_service("select * from ivoa.ObsCore") + lt = len(t) + assert isinstance(t, Table), f"Expected type {type(Table)}; Obtained {type(t)}" + assert len(t) > 0, "Table length is zero" + assert len(t) == eso.maxrec, f"Table length is {lt}, expected {eso.maxrec}" + + @pytest.mark.filterwarnings("ignore::pyvo.dal.exceptions.DALOverflowWarning") + def test_row_limit(self): + eso = Eso() + eso.maxrec = 5 + # since in this case the results are truncated, a warning is issued + + with pytest.warns(MaxResultsWarning): + table = eso.query_instrument('UVES') + n = len(table) + assert n == eso.maxrec, f"Expected {eso.maxrec}; Obtained {n}" + + with pytest.warns(MaxResultsWarning): + table = eso.query_surveys('VVV') + n = len(table) + assert n == eso.maxrec, f"Expected {eso.maxrec}; Obtained {n}" + + with pytest.warns(MaxResultsWarning): + table = eso.query_main() + n = len(table) + assert n == eso.maxrec, f"Expected {eso.maxrec}; Obtained {n}" + + @pytest.mark.filterwarnings("ignore::pyvo.dal.exceptions.DALOverflowWarning") + def test_top(self): + eso = Eso() + top = 5 + eso.maxrec = None + # in this case the results are NOT truncated, no warnings should be issued + + table = eso.query_instrument('UVES', top=top) + n = len(table) + assert n == top, f"Expected {top}; Obtained {n}" + + table = eso.query_surveys('VVV', top=top) + n = len(table) + assert n == top, f"Expected {top}; Obtained {n}" - instruments = eso.list_instruments(cache=False) + table = eso.query_main(top=top) + n = len(table) + assert n == top, f"Expected {top}; Obtained {n}" + + @pytest.mark.filterwarnings("ignore::pyvo.dal.exceptions.DALOverflowWarning") + def test_sgrastar(self): + eso = Eso() + eso.maxrec = 1 + + instruments = eso.list_instruments() # in principle, we should run both of these tests # result_i = eso.query_instrument('midi', target='Sgr A*') # Equivalent, does not depend on SESAME: - result_i = eso.query_instrument('midi', coord1=266.41681662, - coord2=-29.00782497, cache=False) + with pytest.warns(MaxResultsWarning): + result_i = eso.query_instrument('midi', ra=266.41681662, + dec=-29.00782497, radius=1.0) - surveys = eso.list_surveys(cache=False) - assert len(surveys) > 0 - # result_s = eso.query_surveys('VVV', target='Sgr A*') + collections = eso.list_surveys() + assert len(collections) > 0 + # result_s = eso.query_collections('VVV', target='Sgr A*') # Equivalent, does not depend on SESAME: - result_s = eso.query_surveys(surveys='VVV', coord1=266.41681662, - coord2=-29.00782497, - box='01 00 00', - cache=False) + with pytest.warns(MaxResultsWarning): + result_s = eso.query_surveys(surveys='VVV', ra=266.41681662, + dec=-29.00782497, + radius=1.0) assert 'midi' in instruments assert result_i is not None - assert 'VVV' in surveys + assert 'VVV' in collections assert result_s is not None - assert 'Object' in result_s.colnames - assert 'b333' in result_s['Object'] - def test_multisurvey(self, tmp_path): + # From obs.raw, we have "object" (when query_instruments) + # object: Target designation as given by the astronomer, + # though at times overwritten by the obeservatory, + # especially for CALIB observations. Compare with the similar field called "target".) + + # From ivoa.ObsCore, we have "target_name" (when query_collections) + # target_name: The target name as assigned by the Principal Investigator; + # ref. Ref. OBJECT keyword in ESO SDP standard. + # For spectroscopic public surveys, the value shall be set to the survey source identifier. + assert 'target_name' in result_s.colnames + assert 'b319' in result_s['target_name'] + + @pytest.mark.filterwarnings("ignore::pyvo.dal.exceptions.DALOverflowWarning") + def test_multicollection(self, tmp_path): eso = Eso() eso.cache_location = tmp_path - eso.ROW_LIMIT = 1000 - # first b333 was at 157 - # first pistol....? + eso.maxrec = 1000 - result_s = eso.query_surveys(surveys=['VVV', 'XSHOOTER'], - coord1=266.41681662, - coord2=-29.00782497, - box='01 00 00', - cache=False) + test_collections = ['VVV', 'XSHOOTER'] + with pytest.warns(MaxResultsWarning): + result_s = eso.query_surveys(surveys=test_collections, + ra=266.41681662, + dec=-29.00782497, + radius=1.0) assert result_s is not None - assert 'Object' in result_s.colnames - assert 'b333_414_58214' in result_s['Object'] - assert 'Pistol-Star' in result_s['Object'] + assert 'target_name' in result_s.colnames + counts = Counter(result_s["obs_collection"].data) + for tc in test_collections: + assert counts[tc] > 0, f"{tc} : collection not present in results" + + @pytest.mark.filterwarnings("ignore::pyvo.dal.exceptions.DALOverflowWarning") def test_empty_return(self): # test for empty return with an object from the North eso = Eso() - surveys = eso.list_surveys(cache=False) - assert len(surveys) > 0 + collections = eso.list_surveys() + assert len(collections) > 0 # Avoid SESAME with pytest.warns(NoResultsWarning): - result_s = eso.query_surveys(surveys=surveys[0], coord1=202.469575, - coord2=47.195258, cache=False) + result_s = eso.query_surveys(surveys=collections[0], ra=202.469575, + dec=47.195258, radius=1.0) - assert result_s is None + assert len(result_s) == 0 - def test_SgrAstar_remotevslocal(self, tmp_path): + @pytest.mark.filterwarnings("ignore::pyvo.dal.exceptions.DALOverflowWarning") + def test_sgrastar_column_filters(self): eso = Eso() - # Remote version - result1 = eso.query_instrument('gravity', coord1=266.41681662, - coord2=-29.00782497, cache=False) - # Local version - eso.cache_location = tmp_path - result2 = eso.query_instrument('gravity', coord1=266.41681662, - coord2=-29.00782497, cache=True) - assert all(result1 == result2) - def test_list_instruments(self): - # If this test fails, we may simply need to update it + result1 = eso.query_surveys(["sphere", "vegas"], + columns=("obs_collection, calib_level, " + "multi_ob, filter, s_pixel_scale, instrument_name"), + calib_level=3, + multi_ob='M' + ) - inst = set(Eso.list_instruments(cache=False)) + result2 = eso.query_surveys("sphere, vegas", + columns=("obs_collection, calib_level, " + "multi_ob, filter, s_pixel_scale, instrument_name"), + column_filters={ + 'calib_level': 3, + 'multi_ob': 'M' + } + ) - # we only care about the sets matching - assert set(inst) == set(instrument_list) + assert all(result1.values_equal(result2)) + + def test_list_instruments(self): + # If this test fails, we may simply need to update it + inst = set(Eso.list_instruments()) + assert set(inst) == set(instrument_list), f"Expected result {instrument_list}; Obtained: {inst}" def test_retrieve_data(self): eso = Eso() @@ -124,72 +218,78 @@ def test_retrieve_data_list(self): assert isinstance(result, list) assert len(result) == 2 - # TODO: remove filter when https://github.com/astropy/astroquery/issues/2539 is fixed - @pytest.mark.filterwarnings("ignore::pytest.PytestUnraisableExceptionWarning") @pytest.mark.parametrize('instrument', instrument_list) def test_help(self, instrument): eso = Eso() eso.query_instrument(instrument, help=True) def test_apex_retrieval(self): - eso = Eso() - - tbl = eso.query_apex_quicklooks(prog_id='095.F-9802') - tblb = eso.query_apex_quicklooks(project_id='095.F-9802') + raise NotImplementedError - assert len(tbl) == 5 - assert set(tbl['Release Date']) == {'2015-07-17', '2015-07-18', - '2015-09-15', '2015-09-18'} - - assert np.all(tbl == tblb) - - def test_each_instrument_SgrAstar(self, tmp_path): + @pytest.mark.filterwarnings("ignore::pyvo.dal.exceptions.DALOverflowWarning") + @pytest.mark.parametrize('instrument', instrument_list) + def test_each_instrument_sgrastar(self, instrument): eso = Eso() - eso.cache_location = tmp_path - - instruments = eso.list_instruments(cache=False) - - for instrument in instruments: - try: - result = eso.query_instrument(instrument, coord1=266.41681662, coord2=-29.00782497, cache=False) - except NoResultsWarning: - # Sometimes there are ResourceWarnings, we ignore those for this test - pass - else: - assert len(result) > 0 - - def test_each_survey_and_SgrAstar(self, tmp_path): + eso.maxrec = 1 # Either we have maxrec results or none at all + try: + with pytest.warns(MaxResultsWarning): + result = eso.query_instrument(instrument, + ra=266.41681662, dec=-29.00782497, radius=1.0) + except NoResultsWarning: # we don't care if there are no results + pass + else: + assert result is not None, f"query_instrument({instrument}) returned None" + assert len(result) > 0, f"query_instrument({instrument}) returned no records" + + @pytest.mark.filterwarnings("ignore::pyvo.dal.exceptions.DALOverflowWarning") + def test_each_collection_sgrastar(self, tmp_path): eso = Eso() eso.cache_location = tmp_path - eso.ROW_LIMIT = 5 - - surveys = eso.list_surveys(cache=False) - for survey in surveys: - if survey in SGRA_SURVEYS: - result_s = eso.query_surveys(surveys=survey, coord1=266.41681662, - coord2=-29.00782497, - box='01 00 00', - cache=False) + eso.maxrec = 1 + + collections = eso.list_surveys() + for collection in collections: + if collection in SGRA_COLLECTIONS: + with pytest.warns(MaxResultsWarning): + result_s = eso.query_surveys( + surveys=collection, + ra=266.41681662, dec=-29.00782497, radius=0.1775) assert len(result_s) > 0 else: with pytest.warns(NoResultsWarning): - result_s = eso.query_surveys(surveys=survey, coord1=266.41681662, - coord2=-29.00782497, - box='01 00 00', - cache=False) - assert result_s is None + result_s = eso.query_surveys(surveys=collection, ra=266.41681662, + dec=-29.00782497, + radius=0.1775) + assert len(result_s) == 0, f"Failed for collection {collection}" + + with pytest.warns(MaxResultsWarning): + generic_result = eso.query_surveys(surveys=collection) - generic_result = eso.query_surveys(surveys=survey) - assert len(generic_result) > 0 + assert generic_result is not None, f"query_collection({collection}) returned None" + assert len(generic_result) > 0, f"query_collection({collection}) returned no records" + @pytest.mark.filterwarnings("ignore::pyvo.dal.exceptions.DALOverflowWarning") def test_mixed_case_instrument(self, tmp_path): eso = Eso() eso.cache_location = tmp_path - eso.ROW_LIMIT = 5 + eso.maxrec = 5 + + with pytest.warns(MaxResultsWarning): + result1 = eso.query_instrument('midi', ra=266.41681662, + dec=-29.00782497, radius=1.0) + result2 = eso.query_instrument('MiDi', ra=266.41681662, + dec=-29.00782497, radius=1.0) + + assert all(result1.values_equal(result2)) + + @pytest.mark.filterwarnings("ignore::pyvo.dal.exceptions.DALOverflowWarning") + def test_main_sgrastar(self): + eso = Eso() + eso.maxrec = 5 - result1 = eso.query_instrument('midi', coord1=266.41681662, - coord2=-29.00782497, cache=False) - result2 = eso.query_instrument('MiDi', coord1=266.41681662, - coord2=-29.00782497, cache=False) + with pytest.warns(MaxResultsWarning): + result = eso.query_main(target='SGR A', object='SGR A') - assert np.all(result1 == result2) + assert len(result) == 5 + assert 'SGR A' in result['object'] + assert 'SGR A' in result['target'] diff --git a/astroquery/eso/utils.py b/astroquery/eso/utils.py new file mode 100644 index 0000000000..f9a7a28f14 --- /dev/null +++ b/astroquery/eso/utils.py @@ -0,0 +1,78 @@ +""" +utils.py: helper functions for the astropy.eso module +""" + +from typing import Union, List, Optional + + +def _split_str_as_list_of_str(column_str: str): + if column_str == '': + column_list = [] + else: + column_list = list(map(lambda x: x.strip(), column_str.split(','))) + return column_list + + +def adql_sanitize_val(x): + """ + If the value is a string, put it into single quotes + """ + retval = f"'{x}'" if isinstance(x, str) else f"{x}" + return retval + + +def are_coords_valid(ra: Optional[float] = None, + dec: Optional[float] = None, + radius: Optional[float] = None) -> bool: + """ + ra, dec, radius must be either present all three + or absent all three. Moreover, they must be float + """ + are_all_none = (ra is None) and (dec is None) and (radius is None) + are_all_float = isinstance(ra, (float, int)) and isinstance(dec, (float, int)) and isinstance(radius, (float, int)) + is_a_valid_combination = are_all_none or are_all_float + return is_a_valid_combination + + +def py2adql(table: str, columns: Union[List, str] = None, + ra: float = None, dec: float = None, radius: float = None, + where_constraints: List = None, + order_by: str = '', order_by_desc=True, + count_only: bool = False, top: int = None): + """ + Return the adql string corresponding to the parameters passed + See adql examples at https://archive.eso.org/tap_obs/examples + """ + # We assume the coordinates passed are valid + where_circle = [] + if ra: + where_circle += [f'intersects(s_region, circle(\'ICRS\', {ra}, {dec}, {radius}))=1'] + + # Initialize / validate + query_string = None + # do not modify the original list + wc = [] if where_constraints is None else where_constraints[:] + wc += where_circle + if isinstance(columns, str): + columns = _split_str_as_list_of_str(columns) + if columns is None or len(columns) < 1: + columns = ['*'] + if count_only: + columns = ['count(*)'] + + # Build the query + query_string = ', '.join(columns) + ' from ' + table + if len(wc) > 0: + where_string = ' where ' + ' and '.join(wc) + query_string += where_string + + if len(order_by) > 0: + order_string = ' order by ' + order_by + (' desc ' if order_by_desc else ' asc ') + query_string += order_string + + if top is not None: + query_string = f"select top {top} " + query_string + else: + query_string = "select " + query_string + + return query_string.strip() diff --git a/docs/eso/eso.rst b/docs/eso/eso.rst index 80f25c31ec..dea602100d 100644 --- a/docs/eso/eso.rst +++ b/docs/eso/eso.rst @@ -12,10 +12,12 @@ For now, it supports the following: - listing available instruments - listing available surveys (phase 3) -- searching all instrument specific raw data: http://archive.eso.org/cms/eso-data/instrument-specific-query-forms.html -- searching data products (phase 3): http://archive.eso.org/wdb/wdb/adp/phase3_main/form +- searching INSTRUMENT SPECIFIC raw data (table ``ist.<instrument_name>``) via the ESO TAP service* +- searching data products (phase 3; table ``ivoa.ObsCore``) via the ESO TAP service* +- searching raw data (table ``dbo.raw``)via the ESO TAP service* - downloading data by dataset identifiers: http://archive.eso.org/cms/eso-data/eso-data-direct-retrieval.html +\* ESO TAP website: https://archive.eso.org/programmatic/#TAP Requirements ============ @@ -125,110 +127,100 @@ list of available instrument-specific queries can be obtained with the >>> from astroquery.eso import Eso >>> eso = Eso() >>> eso.list_instruments() - ['fors1', 'fors2', 'sphere', 'vimos', 'omegacam', 'eris', 'hawki', 'isaac', 'naco', 'visir', - 'vircam', 'apex', 'giraffe', 'uves', 'xshooter', 'espresso', 'muse', 'crires', - 'kmos', 'sinfoni', 'amber', 'gravity', 'matisse', 'midi', 'pionier', 'wlgsu'] + ['alpaca', 'amber', 'apex', 'crires', 'efosc', 'eris', 'espresso', 'fiat', + 'fors1', 'fors2', 'giraffe', 'gravity', 'harps', 'hawki', 'isaac', 'kmos', + 'matisse', 'midi', 'muse', 'naco', 'nirps', 'omegacam', 'pionier', 'sinfoni', + 'sofi', 'sphere', 'uves', 'vimos', 'vircam', 'visir', 'wlgsu', 'xshooter'] +In the example above, the instruments listed correspond to those retrieved by running the +following query on the ESO **Programmatic Access** website (https://archive.eso.org/programmatic/#TAP): + +``select table_name from TAP_SCHEMA.tables where schema_name='ist' order by table_name`` -In the example above, 22 instruments are available, they correspond to the instruments listed on -the following web page: http://archive.eso.org/cms/eso-data/instrument-specific-query-forms.html. Inspecting available query options ---------------------------------- -Once an instrument is chosen, ``midi`` in our case, the query options for that instrument can be +Once an instrument is chosen, ``midi`` for example, the columns available for that instrument can be inspected by setting the ``help=True`` keyword of the :meth:`~astroquery.eso.EsoClass.query_instrument` -method. +method. The list of columns contains its datatype and unit. The xtype is to be more specific, +as certain columns with datatype ``char`` actually define timestamps or regions in the sky. .. doctest-remote-data:: >>> eso.query_instrument('midi', help=True) # doctest: +IGNORE_OUTPUT - List of the column_filters parameters accepted by the midi instrument query. - The presence of a column in the result table can be controlled if prefixed with a [ ] checkbox. - The default columns in the result table are shown as already ticked: [x]. - - Target Information - ------------------ - target: - resolver: simbad (SIMBAD name), ned (NED name), none (OBJECT as specified by the observer) - coord_sys: eq (Equatorial (FK5)), gal (Galactic) - coord1: - coord2: - box: - format: sexagesimal (Sexagesimal), decimal (Decimal) - [x] wdb_input_file: - - Observation and proposal parameters - ------------------------------------ - [ ] night: - stime: - starttime: 00 (00 hrs [UT]), 01 (01 hrs [UT]), 02 (02 hrs [UT]), 03 (03 hrs [UT]), 04 (04 hrs [UT]), 05 (05 hrs [UT]), 06 (06 hrs [UT]), 07 (07 hrs [UT]), 08 (08 hrs [UT]), 09 (09 hrs [UT]), 10 (10 hrs [UT]), 11 (11 hrs [UT]), 12 (12 hrs [UT]), 13 (13 hrs [UT]), 14 (14 hrs [UT]), 15 (15 hrs [UT]), 16 (16 hrs [UT]), 17 (17 hrs [UT]), 18 (18 hrs [UT]), 19 (19 hrs [UT]), 20 (20 hrs [UT]), 21 (21 hrs [UT]), 22 (22 hrs [UT]), 23 (23 hrs [UT]), 24 (24 hrs [UT]) - etime: - endtime: 00 (00 hrs [UT]), 01 (01 hrs [UT]), 02 (02 hrs [UT]), 03 (03 hrs [UT]), 04 (04 hrs [UT]), 05 (05 hrs [UT]), 06 (06 hrs [UT]), 07 (07 hrs [UT]), 08 (08 hrs [UT]), 09 (09 hrs [UT]), 10 (10 hrs [UT]), 11 (11 hrs [UT]), 12 (12 hrs [UT]), 13 (13 hrs [UT]), 14 (14 hrs [UT]), 15 (15 hrs [UT]), 16 (16 hrs [UT]), 17 (17 hrs [UT]), 18 (18 hrs [UT]), 19 (19 hrs [UT]), 20 (20 hrs [UT]), 21 (21 hrs [UT]), 22 (22 hrs [UT]), 23 (23 hrs [UT]), 24 (24 hrs [UT]) - [x] prog_id: - [ ] prog_type: % (Any), 0 (Normal), 1 (GTO), 2 (DDT), 3 (ToO), 4 (Large), 5 (Short), 6 (Calibration) - [ ] obs_mode: % (All modes), s (Service), v (Visitor) - [ ] pi_coi: - pi_coi_name: PI_only (as PI only), none (as PI or CoI) - [ ] prog_title: - ... - -Only the first two sections, of the parameters accepted by the ``midi`` instrument query, -are shown in the example above: ``Target Information`` and ``Observation and proposal parameters``. - -As stated at the beginning of the help message, the parameters accepted by the query are given just before -the first ``:`` sign (e.g. ``target``, ``resolver``, ``stime``, ``etime``...). When a parameter is prefixed -by ``[ ]``, the presence of the associated column in the query result can be controlled. - -Note: the instrument query forms can be opened in your web browser directly using the ``open_form`` option of -the :meth:`~astroquery.eso.EsoClass.query_instrument` method. This should also help with the identification of -acceptable keywords. + INFO: + Columns present in the table ist.midi: + column_name datatype xtype unit + ------------------- -------- ----------- ------ + access_estsize long kbyte + access_url char + datalink_url char + date_obs char + dec double deg + del_ft_sensor char + del_ft_status char + det_dit float s + det_ndit int + dimm_fwhm_avg float arcsec + dimm_fwhm_rms float arcsec + dp_cat char + dp_id char + ... ... + release_date char timestamp + s_region char adql:REGION + ... ... + telescope char + tpl_expno int + tpl_id char + tpl_name char + tpl_nexp int + tpl_start char + utc float s + + Number of records present in the table ist.midi: + 421764 + [astroquery.eso.core] + +**Note:** for a deeper description of each column, the following query can be issued +on the ESO **Programmatic Access** website (https://archive.eso.org/programmatic/#TAP): + +``select column_name, description from TAP_SCHEMA.columns where table_name = 'ist.midi'`` Querying with constraints ------------------------- It is now time to query the ``midi`` instrument for datasets. In the following example, observations of -target ``NGC 4151`` between ``2007-01-01`` and ``2008-01-01`` are searched, and the query is configured to -return the observation date column. +target ``NGC 4151`` between ``2008-01-01`` and ``2009-05-12`` are searched, and the query is configured to +return two columns: the date of observation and the name of the object. .. doctest-remote-data:: + >>> table = eso.query_instrument('midi', column_filters={'object':'NGC4151'}, columns=['object', 'date_obs']) + >>> t_left = table[table["date_obs"] >= "2008-01-01"] + >>> t_2008_2009 = t_left[t_left["date_obs"] <= "2009-05-12"] + >>> t_2008_2009 + <Table length=196> + object date_obs + ------- ----------------------- + NGC4151 2008-04-22T02:07:50.154 + NGC4151 2008-04-22T02:08:20.345 + NGC4151 2008-04-22T02:09:47.846 + NGC4151 2008-04-22T02:10:18.038 + ... ... + NGC4151 2009-05-11T01:39:09.750 + NGC4151 2009-05-11T01:40:24.235 + NGC4151 2009-05-11T01:41:38.742 + NGC4151 2009-05-11T01:42:08.432 - >>> table = eso.query_instrument('midi', column_filters={'target':'NGC 4151', - ... 'stime':'2007-01-01', - ... 'etime':'2008-01-01'}, - ... columns=['night']) - >>> print(len(table)) - 38 - >>> print(table.columns) - <TableColumns names=('Release Date','Object','RA','DEC','Target Ra Dec','Target l b','DATE OBS','Program ID','DP.ID','OB.ID','OBS.TARG.NAME','DPR.CATG','DPR.TYPE','DPR.TECH','INS.MODE','DIMM Seeing-avg')> - >>> table.pprint(max_width=100) - Release Date Object RA ... DPR.TECH INS.MODE DIMM Seeing-avg - ------------ ----------------------- ---------- ... -------------------- -------- --------------- - 2008-02-07 NGC4151 182.635969 ... IMAGE,WINDOW STARINTF 0.69 [0.03] - 2008-02-07 NGC4151 182.635969 ... IMAGE,WINDOW STARINTF 0.68 [0.01] - 2008-02-07 NGC4151 182.635969 ... IMAGE,WINDOW STARINTF 0.68 [0.01] - 2008-02-07 NGC4151 182.635969 ... IMAGE,WINDOW STARINTF 0.69 [0.06] - 2008-02-07 NGC4151 182.635969 ... IMAGE,WINDOW STARINTF 0.69 [0.05] - 2008-02-07 NGC4151 182.635969 ... IMAGE,WINDOW STARINTF 0.74 [0.01] - ... ... ... ... ... ... ... - 2007-02-07 SEARCH,OBJECT,DISPERSED 182.635969 ... INTERFEROMETRY STARINTF 0.54 [0.03] - 2007-02-07 SEARCH,OBJECT,DISPERSED 182.635969 ... INTERFEROMETRY STARINTF 0.53 [0.04] - 2007-02-07 TRACK,OBJECT,DISPERSED 182.635969 ... INTERFEROMETRY STARINTF 0.51 [0.02] - 2007-02-07 TRACK,OBJECT,DISPERSED 182.635969 ... INTERFEROMETRY STARINTF 0.51 [0.02] - 2007-02-07 TRACK,OBJECT,DISPERSED 182.635969 ... INTERFEROMETRY STARINTF 0.51 [0.01] - 2007-02-07 PHOTOMETRY,OBJECT 182.635969 ... IMAGE,WINDOW,CHOPNOD STARINTF 0.54 [0.02] - 2007-02-07 PHOTOMETRY,OBJECT 182.635969 ... IMAGE,WINDOW,CHOPNOD STARINTF 0.54 [0.03] - Length = 38 rows - -And indeed, 38 datasets are found, and the ``DATE OBS`` column is in the result table. Querying all instruments ------------------------ The ESO database can also be queried without a specific instrument in mind. This is what the method :meth:`~astroquery.eso.EsoClass.query_main` is for. -The associated query form on the ESO archive website is http://archive.eso.org/wdb/wdb/eso/eso_archive_main/form. -Except for the keyword specifying the instrument the behaviour of :meth:`~astroquery.eso.EsoClass.query_main` +The associated table on the ESO **Programmatic Access** website (https://archive.eso.org/programmatic/#TAP) +is ``dbo.raw``, and the simplest query would be: ``select * from dbo.raw``. +Except for the keyword specifying the instrument,the behaviour of :meth:`~astroquery.eso.EsoClass.query_main` is identical to :meth:`~astroquery.eso.EsoClass.query_instrument`. ESO instruments without a specific query interface can be queried with @@ -238,38 +230,57 @@ query all-sky images from APICAM with ``luminance`` filter. .. doctest-remote-data:: - >>> eso.ROW_LIMIT = -1 # Return all results - >>> table = eso.query_main(column_filters={'instrument': 'APICAM', 'filter_path': 'LUMINANCE', - ... 'stime':'2019-04-26', 'etime':'2019-04-27'}, cache=False) + >>> eso.maxrec = -1 # Return all results + #(i.e. do not truncate the query even if it is slow) + >>> table = eso.query_main(column_filters={'instrument': 'APICAM', + 'filter_path': 'LUMINANCE'}) >>> print(len(table)) - 207 + 102147 + >>> table_filtered = table[table['date_obs']>='2019-04-26'] + >>> table_filtered = table_filtered[table_filtered['date_obs']<='2019-04-27'] + >>> len(table_filtered) + 215 >>> print(table.columns) - <TableColumns names=('OBJECT','RA','DEC','Program_ID','Instrument','Category','Type','Mode','Dataset ID','Release_Date','TPL ID','TPL START','Exptime','Exposure','filter_lambda_min','filter_lambda_max','MJD-OBS','Airmass','DIMM Seeing at Start')> - >>> table.pprint(max_width=100) - OBJECT RA DEC Program_ID ... MJD-OBS Airmass DIMM Seeing at Start - ------- ----------- ----------- ------------ ... ------------ ------- -------------------- - ALL SKY 09:18:37.39 -24:32:32.7 60.A-9008(A) ... 58599.987766 1.0 N/A - ALL SKY 09:21:07.68 -24:32:30.1 60.A-9008(A) ... 58599.989502 1.0 N/A - ALL SKY 09:23:38.98 -24:32:27.5 60.A-9008(A) ... 58599.99125 1.0 N/A - ALL SKY 09:26:10.28 -24:32:24.9 60.A-9008(A) ... 58599.992998 1.0 N/A - ALL SKY 09:28:40.58 -24:32:22.4 60.A-9008(A) ... 58599.994734 1.0 N/A - ALL SKY 09:31:43.93 -24:32:19.4 60.A-9008(A) ... 58599.996852 1.0 N/A - ALL SKY 09:34:15.23 -24:32:17.0 60.A-9008(A) ... 58599.9986 1.0 N/A - ALL SKY 09:36:47.53 -24:32:14.5 60.A-9008(A) ... 58600.000359 1.0 N/A - ALL SKY 09:39:18.82 -24:32:12.2 60.A-9008(A) ... 58600.002106 1.0 N/A - ALL SKY 09:41:49.11 -24:32:09.9 60.A-9008(A) ... 58600.003843 1.0 N/A - ... ... ... ... ... ... ... ... - ALL SKY 19:07:39.21 -24:39:35.1 60.A-9008(A) ... 58600.395914 1.0 N/A - ALL SKY 19:10:11.68 -24:39:39.1 60.A-9008(A) ... 58600.397674 1.0 N/A - ALL SKY 19:12:44.15 -24:39:43.2 60.A-9008(A) ... 58600.399433 1.0 N/A - ALL SKY 19:15:15.62 -24:39:47.1 60.A-9008(A) ... 58600.401181 1.0 N/A - ALL SKY 19:17:46.09 -24:39:51.1 60.A-9008(A) ... 58600.402917 1.0 N/A - ALL SKY 19:20:46.65 -24:39:55.8 60.A-9008(A) ... 58600.405 1.0 N/A - ALL SKY 19:23:18.12 -24:39:59.7 60.A-9008(A) ... 58600.406748 1.0 N/A - ALL SKY 19:25:51.60 -24:40:03.7 60.A-9008(A) ... 58600.408519 1.0 N/A - ALL SKY 19:28:22.08 -24:40:07.6 60.A-9008(A) ... 58600.410255 1.0 N/A - ALL SKY 19:30:52.55 -24:40:11.4 60.A-9008(A) ... 58600.411991 1.0 N/A - Length = 207 rows + <TableColumns names=('access_estsize','access_url','datalink_url','date_obs', + 'dec','dec_pnt','det_chip1id','det_chop_ncycles','det_dit','det_expid','det_ndit', + 'dp_cat','dp_id','dp_tech','dp_type','ecl_lat','ecl_lon','exp_start','exposure', + 'filter_path','gal_lat','gal_lon','grat_path','gris_path','ins_mode','instrument', + 'lambda_max','lambda_min','last_mod_date','mjd_obs','ob_id','ob_name','object', + 'obs_mode','origfile','period','pi_coi','prog_id','prog_title','prog_type','ra', + 'ra_pnt','release_date','s_region','slit_path','target','tel_airm_end', + 'tel_airm_start','tel_alt','tel_ambi_fwhm_end','tel_ambi_fwhm_start', + 'tel_ambi_pres_end','tel_ambi_pres_start','tel_ambi_rhum','tel_az','telescope', + 'tpl_expno','tpl_id','tpl_name','tpl_nexp','tpl_seqno','tpl_start')> + >>> table_filtered[["object", "ra", "dec", "date_obs", "prog_id"]].pprint(max_width=200) + object ra dec date_obs prog_id + deg deg + ------- ------------ ------------ ----------------------- ------------ + ALL SKY 145.29212694 -24.53624194 2019-04-26T00:08:49.000 60.A-9008(A) + ALL SKY 145.92251305 -24.53560305 2019-04-26T00:11:20.000 60.A-9008(A) + ALL SKY 146.55707 -24.53497111 2019-04-26T00:13:52.000 60.A-9008(A) + ALL SKY 147.18745 -24.53435388 2019-04-26T00:16:23.000 60.A-9008(A) + ALL SKY 147.81365305 -24.53375305 2019-04-26T00:18:53.000 60.A-9008(A) + ALL SKY 148.56509194 -24.533045 2019-04-26T00:21:53.000 60.A-9008(A) + ALL SKY 149.19963805 -24.53246 2019-04-26T00:24:25.000 60.A-9008(A) + ALL SKY 149.83418111 -24.53188611 2019-04-26T00:26:57.000 60.A-9008(A) + ALL SKY 150.46037194 -24.53133111 2019-04-26T00:29:27.000 60.A-9008(A) + ALL SKY 151.08656111 -24.53078805 2019-04-26T00:31:57.000 60.A-9008(A) + ALL SKY 151.85050805 -24.53014 2019-04-26T00:35:00.000 60.A-9008(A) + ALL SKY 152.48504 -24.529615 2019-04-26T00:37:32.000 60.A-9008(A) + ... ... ... ... ... + ALL SKY 289.40910694 -24.66412305 2019-04-26T09:44:00.000 60.A-9008(A) + ALL SKY 290.04024305 -24.66522194 2019-04-26T09:46:31.000 60.A-9008(A) + ALL SKY 290.67974305 -24.66633 2019-04-26T09:49:04.000 60.A-9008(A) + ALL SKY 291.30671 -24.66741111 2019-04-26T09:51:34.000 60.A-9008(A) + ALL SKY 291.93786305 -24.66849388 2019-04-26T09:54:05.000 60.A-9008(A) + ALL SKY 139.655775 -24.542425 2019-04-26T23:42:23.000 60.A-9008(A) + ALL SKY 140.282015 -24.54169694 2019-04-26T23:44:53.000 60.A-9008(A) + ALL SKY 140.91242694 -24.54097305 2019-04-26T23:47:24.000 60.A-9008(A) + ALL SKY 141.54283388 -24.54026 2019-04-26T23:49:55.000 60.A-9008(A) + ALL SKY 142.16906388 -24.53956194 2019-04-26T23:52:25.000 60.A-9008(A) + ALL SKY 142.93306 -24.53872388 2019-04-26T23:55:28.000 60.A-9008(A) + ALL SKY 143.56345694 -24.53804388 2019-04-26T23:57:59.000 60.A-9008(A) + Length = 215 rows Query the ESO archive for reduced data @@ -291,16 +302,15 @@ Query a specific survey with constraints ---------------------------------------- Let's assume that we work with the ``HARPS`` survey, and that we are interested in -target ``HD203608``. -The archive can be queried as follows: - +target ``HD203608``. The archive can be queried as follows: .. doctest-remote-data:: - >>> table = eso.query_surveys(surveys='HARPS', cache=False, target="HD203608") + >>> table = eso.query_surveys(surveys='HARPS', target_name="HD203608") -The returned table has an ``ARCFILE`` column. It can be used to retrieve the datasets with -:meth:`astroquery.eso.EsoClass.retrieve_data` (see next section). +The returned table has a ``dp_id`` column, which can be used to retrieve the datasets with +:meth:`astroquery.eso.EsoClass.retrieve_data`: ``eso.retrieve_data(table["dp_id"][0])``. +More details about this method in the next section. Obtaining extended information on data products @@ -315,61 +325,59 @@ This method is detailed in the example below. .. doctest-remote-data:: - >>> table = eso.query_instrument('midi', column_filters={'target':'NGC 4151', - ... 'stime':'2007-01-01', - ... 'etime':'2008-01-01'}, - ... columns=['night']) - >>> table_headers = eso.get_headers(table['DP.ID']) - >>> table_headers.pprint() # doctest: +IGNORE_OUTPUT - DP.ID SIMPLE BITPIX ... HIERARCH ESO OCS TPL NFILE HIERARCH ESO OCS EXPO1 FNAME3 - ---------------------------- ------ ------ ... -------------------------- --------------------------------- - MIDI.2007-02-07T07:01:51.000 True 16 ... 0 - MIDI.2007-02-07T07:02:49.000 True 16 ... 0 - MIDI.2007-02-07T07:03:30.695 True 16 ... 0 - MIDI.2007-02-07T07:05:47.000 True 16 ... 0 - MIDI.2007-02-07T07:06:28.695 True 16 ... 0 - MIDI.2007-02-07T07:09:03.000 True 16 ... 0 - MIDI.2007-02-07T07:09:44.695 True 16 ... 0 - MIDI.2007-02-07T07:13:09.000 True 16 ... 0 - MIDI.2007-02-07T07:13:50.695 True 16 ... 0 - MIDI.2007-02-07T07:15:55.000 True 16 ... 0 - ... ... ... ... ... ... - MIDI.2007-02-07T07:52:27.992 True 16 ... 8 MIDI.2007-02-07T07:52:27.992.fits - MIDI.2007-02-07T07:56:21.000 True 16 ... 0 - MIDI.2007-02-07T07:57:35.485 True 16 ... 0 - MIDI.2007-02-07T07:59:46.000 True 16 ... 0 - MIDI.2007-02-07T08:01:00.486 True 16 ... 0 - MIDI.2007-02-07T08:03:42.000 True 16 ... 8 - MIDI.2007-02-07T08:04:56.506 True 16 ... 8 - MIDI.2007-02-07T08:06:11.013 True 16 ... 8 MIDI.2007-02-07T08:06:11.013.fits - MIDI.2007-02-07T08:08:19.000 True 16 ... 8 MIDI.2007-02-07T08:06:11.013.fits - MIDI.2007-02-07T08:09:33.506 True 16 ... 8 MIDI.2007-02-07T08:06:11.013.fits - Length = 38 rows + >>> table = eso.query_instrument('midi', column_filters={'object':'NGC4151'}, + ... columns=['object', 'date_obs', 'dp_id']) + >>> table_filtered = table[table['date_obs']<='2008-01-01'] + >>> table_headers = eso.get_headers(table_filtered["dp_id"]) + >>> table_headers.pprint() + DP.ID SIMPLE BITPIX ... HIERARCH ESO OCS EXPO7 FNAME2 HIERARCH ESO OCS EXPO8 FNAME1 HIERARCH ESO OCS EXPO8 FNAME2 + ---------------------------- ------ ------ ... --------------------------------- --------------------------------- --------------------------------- + MIDI.2007-02-07T07:01:51.000 True 16 ... + MIDI.2007-02-07T07:02:49.000 True 16 ... + MIDI.2007-02-07T07:03:30.695 True 16 ... + MIDI.2007-02-07T07:05:47.000 True 16 ... + MIDI.2007-02-07T07:06:28.695 True 16 ... + MIDI.2007-02-07T07:09:03.000 True 16 ... + MIDI.2007-02-07T07:09:44.695 True 16 ... + MIDI.2007-02-07T07:13:09.000 True 16 ... + MIDI.2007-02-07T07:13:50.695 True 16 ... + MIDI.2007-02-07T07:15:55.000 True 16 ... + MIDI.2007-02-07T07:16:36.694 True 16 ... + MIDI.2007-02-07T07:19:25.000 True 16 ... + MIDI.2007-02-07T07:20:06.695 True 16 ... MIDI.2007-02-07T07:20:06.695.fits + MIDI.2007-02-07T07:22:57.000 True 16 ... MIDI.2007-02-07T07:20:06.695.fits MIDI.2007-02-07T07:22:57.000.fits + MIDI.2007-02-07T07:23:38.695 True 16 ... MIDI.2007-02-07T07:20:06.695.fits MIDI.2007-02-07T07:22:57.000.fits MIDI.2007-02-07T07:23:38.695.fits >>> len(table_headers.columns) - 340 + 336 + -As shown above, for each data product ID (``DP.ID``), the full header (570 columns in our case) of the archive -FITS file is collected. In the above table ``table_headers``, there are as many rows as in the column ``table['DP.ID']``. +.. + ## TODO ... Is this paragraph true?? What does it actually mean? To me it does not make sense. + ## As shown above, for each data product ID (``DP.ID``), the full header (336 columns in our case) of the archive + ## FITS file is collected. In the above table ``table_headers``, there are as many rows as in the column ``table['DP.ID']``. + ## The original paragraph reads: + ## As shown above, for each data product ID (``DP.ID``), the full header (570 columns in our case) of the archive + ## FITS file is collected. In the above table ``table_headers``, there are as many rows as in the column ``table['DP.ID']``. Downloading datasets from the archive ===================================== Continuing from the query with constraints example, the first two datasets are selected, -using their data product IDs ``DP.ID`` (or ``ARCFILE`` for surveys), and retrieved from the ESO archive. +using their data product IDs ``dp_id``, and retrieved from the ESO archive. .. doctest-skip:: - >>> data_files = eso.retrieve_data(table['DP.ID'][:2]) - INFO: Downloading datasets ... - INFO: Downloading 2 files ... - INFO: Downloading file 1/2 https://dataportal.eso.org/dataPortal/file/MIDI.2007-02-07T07:01:51.000 to ... - INFO: Successfully downloaded dataset MIDI.2007-02-07T07:01:51.000 to ... - INFO: Downloading file 2/2 https://dataportal.eso.org/dataPortal/file/MIDI.2007-02-07T07:02:49.000 to ... - INFO: Successfully downloaded dataset MIDI.2007-02-07T07:02:49.000 to ... - INFO: Uncompressing file /Users/szampier/.astropy/cache/astroquery/Eso/MIDI.2007-02-07T07:01:51.000.fits.Z - INFO: Uncompressing file /Users/szampier/.astropy/cache/astroquery/Eso/MIDI.2007-02-07T07:02:49.000.fits.Z - INFO: Done! + >>> data_files = eso.retrieve_data(table['dp_id'][:2]) + INFO: Downloading datasets ... [astroquery.eso.core] + INFO: Downloading 2 files ... [astroquery.eso.core] + INFO: Downloading file 1/2 https://dataportal.eso.org/dataPortal/file/MIDI.2007-02-07T07:01:51.000 to /Users/foobar/.astropy/cache/astroquery/Eso [astroquery.eso.core] + INFO: Successfully downloaded dataset MIDI.2007-02-07T07:01:51.000 to /Users/foobar/.astropy/cache/astroquery/Eso/MIDI.2007-02-07T07:01:51.000.fits.Z [astroquery.eso.core] + INFO: Downloading file 2/2 https://dataportal.eso.org/dataPortal/file/MIDI.2007-02-07T07:02:49.000 to /Users/foobar/.astropy/cache/astroquery/Eso [astroquery.eso.core] + INFO: Successfully downloaded dataset MIDI.2007-02-07T07:02:49.000 to /Users/foobar/.astropy/cache/astroquery/Eso/MIDI.2007-02-07T07:02:49.000.fits.Z [astroquery.eso.core] + INFO: Uncompressing file /Users/foobar/.astropy/cache/astroquery/Eso/MIDI.2007-02-07T07:01:51.000.fits.Z [astroquery.eso.core] + INFO: Uncompressing file /Users/foobar/.astropy/cache/astroquery/Eso/MIDI.2007-02-07T07:02:49.000.fits.Z [astroquery.eso.core] + INFO: Done! [astroquery.eso.core] The file names, returned in data_files, points to the decompressed datasets (without the .Z extension) that have been locally downloaded.