diff --git a/CHANGES.rst b/CHANGES.rst index 6b7a418315..575027c239 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,10 @@ New Tools and Services ---------------------- +astorbdb +^^^^^^^^ +- module added to query the Lowell Observatory astorbdb database [#3203] API changes ----------- diff --git a/astroquery/astorbdb/__init__.py b/astroquery/astorbdb/__init__.py new file mode 100644 index 0000000000..23682e8e7a --- /dev/null +++ b/astroquery/astorbdb/__init__.py @@ -0,0 +1,39 @@ +# Licensed under a 3-clause BSD style license - see LICENSE.rst + +""" +ASTORBDB +------------------------- + +:author: Henry Hsieh (hhsieh@gmail.com) +""" + +# Make the URL of the server, timeout and other items configurable +# See +# for docs and examples on how to do this +# Below is a common use case + +from astropy import config as _config + + +class Conf(_config.ConfigNamespace): + """ + Configuration parameters for `astroquery.astorbdb`. + """ + server = _config.ConfigItem( + ['https://asteroid.lowell.edu/api/asteroids/'], + 'AstorbDB') + + timeout = _config.ConfigItem( + 30, + 'Time limit for connecting to astorbdb server.') + + +conf = Conf() + +# Now import your public class +# Should probably have the same name as your module +from .core import AstInfo, AstInfoClass + +__all__ = ['AstInfo', 'AstInfoClass', + 'Conf', 'conf', + ] diff --git a/astroquery/astorbdb/core.py b/astroquery/astorbdb/core.py new file mode 100644 index 0000000000..d0e72fc6b5 --- /dev/null +++ b/astroquery/astorbdb/core.py @@ -0,0 +1,727 @@ +# Licensed under a 3-clause BSD style license - see LICENSE.rst + +import json +from collections import OrderedDict + +from astropy.time import Time +import astropy.units as u + +from ..query import BaseQuery +from ..utils import async_to_sync +from . import conf + +__all__ = ['AstInfo', 'AstInfoClass'] + + +@async_to_sync +class AstInfoClass(BaseQuery): + + """ + A class for querying Lowell Observatory's `astorbDB + `_ service. + """ + + URL = conf.server + TIMEOUT = conf.timeout + + # internal flag whether to return the raw reponse + _return_raw = False + + # actual query uri + _uri = None + + def albedos_async(self, object_name, *, + get_uri=False, + cache=True): + """ + This method uses a REST interface to query the `Lowell Observatory + astorbDB database `_ for albedo + data for a single object and returns a dictionary from JSON results + + Parameters + ---------- + object_name : str + name of the identifier to query. + + Returns + ------- + res : A dictionary holding available albedo data + + Examples + -------- + >>> from astroquery.astorbdb import AstInfo + >>> albedos = AstInfo.albedos('Beagle') # doctest: +SKIP + >>> print(albedos) # doctest: +SKIP + [{'albedo': 0.065, 'albedo_error_lower': -0.002, ..., 'survey_name': 'Usui et al. (2011)'}, + {'albedo': 0.0625, 'albedo_error_lower': -0.015, ..., 'survey_name': 'Infrared Astronomical Satellite (IRAS)'}, + ...] + """ + + self.query_type = 'albedos' + + response = self._request('GET', + url=self.URL + object_name + '/data/albedos', + timeout=self.TIMEOUT, cache=cache) + + if get_uri: + self._uri = response.url + + return response + + def colors_async(self, object_name, *, + get_uri=False, + cache=True): + """ + This method uses a REST interface to query the `Lowell Observatory + astorbDB database `_ for color + data for a single object and returns a dictionary from JSON results + + Parameters + ---------- + object_name : str + name of the identifier to query. + + Returns + ------- + res : A dictionary holding available color data + + Examples + -------- + >>> from astroquery.astorbdb import AstInfo + >>> colors = AstInfo.colors('Beagle') # doctest: +SKIP + >>> print(colors) # doctest: +SKIP + [{..., 'color': 0.431, 'color_error': 0.035, ..., 'sys_color': 'J-H'}, + {..., 'color': 0.076, 'color_error': 0.041, ..., 'sys_color': 'H-K'}, + ...] + """ + + self.query_type = 'colors' + + response = self._request('GET', + url=self.URL + object_name + '/data/colors', + timeout=self.TIMEOUT, cache=cache) + + if get_uri: + self._uri = response.url + + return response + + def designations_async(self, object_name, *, + get_uri=False, + cache=True): + """ + This method uses a REST interface to query the `Lowell Observatory + astorbDB database `_ for designation + data for a single object and returns a dictionary from JSON results + + Parameters + ---------- + object_name : str + name of the identifier to query. + + Returns + ------- + res : A dictionary holding available designation data + + Examples + -------- + >>> from astroquery.astorbdb import AstInfo + >>> designations = AstInfo.designations('Beagle') # doctest: +SKIP + >>> print(designations) # doctest: +SKIP + {'alternate_designations': ['1954 HJ', ...], 'name': 'Beagle', 'number': 656, ...} + """ + + self.query_type = 'designations' + + response = self._request('GET', + url=self.URL + object_name + '/designations', + timeout=self.TIMEOUT, cache=cache) + + if get_uri: + self._uri = response.url + + return response + + def dynamical_family_async(self, object_name, *, + get_uri=False, + cache=True): + """ + This method uses a REST interface to query the `Lowell Observatory + astorbDB database `_ for dynamical family + data for a single object and returns a dictionary from JSON results + + Parameters + ---------- + object_name : str + name of the identifier to query. + + Returns + ------- + res : A dictionary holding available dynamical family data + + Examples + -------- + >>> from astroquery.astorbdb import AstInfo + >>> dynamical_family = AstInfo.dynamical_family('Beagle') # doctest: +SKIP + >>> print(dynamical_family) # doctest: +SKIP + [{'citation_bibcode': '2015PDSS..234.....N', ..., 'family': 'Themis', ...}, + {'citation_bibcode': '2015PDSS..234.....N', ..., 'family': 'Beagle', ...}] + """ + + self.query_type = 'dynamical_family' + + response = self._request('GET', + url=self.URL + object_name + '/data/dynamical-family', + timeout=self.TIMEOUT, cache=cache) + + if get_uri: + self._uri = response.url + + return response + + def elements_async(self, object_name, *, + get_uri=False, + cache=True): + """ + This method uses a REST interface to query the `Lowell Observatory + astorbDB database `_ for orbital element + data for a single object and returns a dictionary from JSON results + + Parameters + ---------- + object_name : str + name of the identifier to query. + + Returns + ------- + res : A dictionary holding available orbital element data + + Examples + -------- + >>> from astroquery.astorbdb import AstInfo + >>> elements = AstInfo.elements('Beagle') # doctest: +SKIP + >>> print(elements) # doctest: +SKIP + {'a': , 'aphelion_dist': , ...} + """ + + self.query_type = 'elements' + + response = self._request('GET', + url=self.URL + object_name + '/elements', + timeout=self.TIMEOUT, cache=cache) + + if get_uri: + self._uri = response.url + + return response + + def escape_routes_async(self, object_name, *, + get_uri=False, + cache=True): + """ + This method uses a REST interface to query the `Lowell Observatory + astorbDB database `_ for NEO escape route + data for a single object and returns a dictionary from JSON results + + Parameters + ---------- + object_name : str + name of the identifier to query. + + Returns + ------- + res : A dictionary holding available NEO escape route data + + Examples + -------- + >>> from astroquery.astorbdb import AstInfo + >>> escape_routes = AstInfo.escape_routes('3552') # doctest: +SKIP + >>> print(escape_routes) # doctest: +SKIP + [{'citation_bibcode': '2018Icar..312..181G', ..., 'dp21_complex': 0.03695, 'dp31_complex': 0.00105, ...}] + """ + + self.query_type = 'escape_routes' + + response = self._request('GET', + url=self.URL + object_name + '/data/escape-routes', + timeout=self.TIMEOUT, cache=cache) + + if get_uri: + self._uri = response.url + + return response + + def lightcurves_async(self, object_name, *, + get_uri=False, + cache=True): + """ + This method uses a REST interface to query the `Lowell Observatory + astorbDB database `_ for lightcurve + data for a single object and returns a dictionary from JSON results + + Parameters + ---------- + object_name : str + name of the identifier to query. + + Returns + ------- + res : A dictionary holding available lightcurve data + + Examples + -------- + >>> from astroquery.astorbdb import AstInfo + >>> lightcurves = AstInfo.lightcurves('Beagle') # doctest: +SKIP + >>> print(lightcurves) # doctest: +SKIP + [{..., 'amp_max': , 'amp_min': , ..., 'period': , ...}] + """ + + self.query_type = 'lightcurves' + + response = self._request('GET', + url=self.URL + object_name + '/data/lightcurves', + timeout=self.TIMEOUT, cache=cache) + + if get_uri: + self._uri = response.url + + return response + + def orbit_async(self, object_name, *, + get_uri=False, + cache=True): + """ + This method uses a REST interface to query the `Lowell Observatory + astorbDB database `_ for orbit + data for a single object and returns a dictionary from JSON results + + Parameters + ---------- + object_name : str + name of the identifier to query. + + Returns + ------- + res : A dictionary holding available orbit fitting data + + Examples + -------- + >>> from astroquery.astorbdb import AstInfo + >>> orbit = AstInfo.orbit('Beagle') # doctest: +SKIP + >>> print(orbit) # doctest: +SKIP + {'a1con': , 'a2con': , ...} + """ + + self.query_type = 'orbit' + + response = self._request('GET', + url=self.URL + object_name + '/orbit', + timeout=self.TIMEOUT, cache=cache) + + if get_uri: + self._uri = response.url + + return response + + def taxonomies_async(self, object_name, *, + get_uri=False, + cache=True): + """ + This method uses a REST interface to query the `Lowell Observatory + astorbDB database `_ for taxonomy + data for a single object and returns a dictionary from JSON results + + Parameters + ---------- + object_name : str + name of the identifier to query. + + Returns + ------- + res : A dictionary holding available taxonomy data + + Examples + -------- + >>> from astroquery.astorbdb import AstInfo + >>> taxonomies = AstInfo.taxonomies('Beagle') # doctest: +SKIP + >>> print(taxonomies) # doctest: +SKIP + [{'citation_bibcode': '2011PDSS..145.....H', ..., 'survey_name': 'Carvano et al. (2010)', 'taxonomy': 'C', ...}, + {'citation_bibcode': '2013Icar..226..723D', ..., 'survey_name': 'DeMeo et al. (2013)', 'taxonomy': 'C', ...}] + """ + + self.query_type = 'taxonomies' + + response = self._request('GET', + url=self.URL + object_name + '/data/taxonomies', + timeout=self.TIMEOUT, cache=cache) + + if get_uri: + self._uri = response.url + + return response + + def all_astinfo_async(self, object_name, *, + get_uri=False, + cache=True): + """ + This method uses REST interfaces to query the `Lowell Observatory + astorbDB database `_ for all AstInfo + data for a single object and returns a dictionary from JSON results + + Parameters + ---------- + object_name : str + name of the identifier to query. + + Returns + ------- + res : A dictionary holding available AstInfo data + + Examples + -------- + >>> from astroquery.astorbdb import AstInfo + >>> all_astinfo = AstInfo.all_astinfo('Beagle') # doctest: +SKIP + >>> print(all_astinfo) # doctest: +SKIP + OrderedDict({ + 'albedos': [{'albedo': 0.065, ..., 'survey_name': 'Usui et al. (2011)'}, + {'albedo': 0.0625, ..., 'survey_name': 'Infrared Astronomical Satellite (IRAS)'}, + ...], + 'colors': [{..., 'color': 0.431, 'color_error': 0.035, ..., 'sys_color': 'J-H'}, + {..., 'color': 0.076, 'color_error': 0.041, ..., 'sys_color': 'H-K'}, + ...], + 'designations': {'alternate_designations': ['1954 HJ', ...], 'name': 'Beagle', ...}, + 'dynamical_family': [{'citation_bibcode': '2015PDSS..234.....N', ..., 'family': 'Themis', ...}, + {'citation_bibcode': '2015PDSS..234.....N', ..., 'family': 'Beagle', ...}], + 'elements': {'a': , 'aphelion_dist': , ...}, + 'escape_routes': [], + 'lightcurves': [{..., 'amp_max': , ..., 'period': , ...}], + 'orbit': {'a1con': , 'a2con': , ...}, + 'taxonomies': [{..., 'survey_name': 'Carvano et al. (2010)', 'taxonomy': 'C', ...}, + {..., 'survey_name': 'DeMeo et al. (2013)', 'taxonomy': 'C', ...}] + }) + """ + + self.query_type = 'all_astinfo' + + response = {} + + response['albedos'] = self._request('GET', + url=self.URL + object_name + '/data/albedos', + timeout=self.TIMEOUT, cache=cache) + + response['colors'] = self._request('GET', + url=self.URL + object_name + '/data/colors', + timeout=self.TIMEOUT, cache=cache) + + response['designations'] = self._request('GET', + url=self.URL + object_name + '/designations', + timeout=self.TIMEOUT, cache=cache) + + response['dynamical_family'] = self._request('GET', + url=self.URL + object_name + '/data/dynamical-family', + timeout=self.TIMEOUT, cache=cache) + + response['elements'] = self._request('GET', + url=self.URL + object_name + '/elements', + timeout=self.TIMEOUT, cache=cache) + + response['escape_routes'] = self._request('GET', + url=self.URL + object_name + '/data/escape-routes', + timeout=self.TIMEOUT, cache=cache) + + response['lightcurves'] = self._request('GET', + url=self.URL + object_name + '/data/lightcurves', + timeout=self.TIMEOUT, cache=cache) + + response['orbit'] = self._request('GET', + url=self.URL + object_name + '/orbit', + timeout=self.TIMEOUT, cache=cache) + + response['taxonomies'] = self._request('GET', + url=self.URL + object_name + '/data/taxonomies', + timeout=self.TIMEOUT, cache=cache) + + if get_uri: + self._uri = {'albedos': response['albedos'].url, + 'colors': response['colors'].url, + 'designations': response['designations'].url, + 'dynamical_family': response['dynamical_family'].url, + 'elements': response['elements'].url, + 'escape_routes': response['escape_routes'].url, + 'lightcurves': response['lightcurves'].url, + 'orbit': response['orbit'].url, + 'taxonomies': response['taxonomies'].url + } + + return response + + def _parse_result(self, response, *, verbose=None): + """ + Parser for astorbDB AstInfo request results + """ + + if self._return_raw: + return response.text + + # decode json response from Lowell astorbDB into ascii + try: + if isinstance(response, dict): + src = OrderedDict() + for key in response: + src[key] = OrderedDict(json.loads(response[key].text)) + else: + src = OrderedDict(json.loads(response.text)) + except ValueError: + raise ValueError('Server response not readable.') + + # extract desired data and add units to values or + # convert data to Time objects where appropriate + + if self.query_type == 'albedos': + src = self._process_data_albedos(src) + + elif self.query_type == 'colors': + src = self._process_data_colors(src) + + elif self.query_type == 'designations': + src = self._process_data_designations(src) + + elif self.query_type == 'dynamical_family': + src = self._process_data_dynamical_family(src) + + elif self.query_type == 'elements': + src = self._process_data_elements(src) + + elif self.query_type == 'escape_routes': + src = self._process_data_escape_routes(src) + + elif self.query_type == 'lightcurves': + src = self._process_data_lightcurves(src) + + elif self.query_type == 'orbit': + src = self._process_data_orbit(src) + + elif self.query_type == 'taxonomies': + src = self._process_data_taxonomies(src) + + elif self.query_type == 'all_astinfo': + src['albedos'] = self._process_data_albedos(src['albedos']) + src['colors'] = self._process_data_colors(src['colors']) + src['designations'] = self._process_data_designations(src['designations']) + src['dynamical_family'] = self._process_data_dynamical_family(src['dynamical_family']) + src['elements'] = self._process_data_elements(src['elements']) + src['escape_routes'] = self._process_data_escape_routes(src['escape_routes']) + src['lightcurves'] = self._process_data_lightcurves(src['lightcurves']) + src['orbit'] = self._process_data_orbit(src['orbit']) + src['taxonomies'] = self._process_data_taxonomies(src['taxonomies']) + + else: + raise ValueError('Query type not recognized.') + + # add query uri, if desired + if self._uri is not None: + if self.query_type in ['designations', 'elements', 'orbit', 'all_astinfo']: + src['query_uri'] = self._uri + else: + if len(src) > 0: + src[0]['query_uri'] = self._uri + else: + src = [{'query_uri': self._uri}] + + return src + + def _process_data_albedos(self, src): + """ + internal routine to return a dictionary of albedo data results + from REST interface output and assign units to values where + appropriate. + + """ + + if 'albedos' in src: + src = src['albedos'] + for i in range(len(src)): + if src[i]['diameter'] is not None: + src[i]['diameter'] = u.Quantity(src[i]['diameter'], u.km) + if src[i]['diameter_error_lower'] is not None: + src[i]['diameter_error_lower'] = u.Quantity(src[i]['diameter_error_lower'], u.km) + if src[i]['diameter_error_upper'] is not None: + src[i]['diameter_error_upper'] = u.Quantity(src[i]['diameter_error_upper'], u.km) + + return src + + def _process_data_colors(self, src): + """ + internal routine to return a dictionary of color data results + from REST interface output and convert values to Time objects + where appropriate. + + """ + + if 'colors' in src: + src = src['colors'] + for i in range(len(src)): + if src[i]['jd'] is not None: + src[i]['jd'] = Time(src[i]['jd'], format='jd', scale='utc') + + return src + + def _process_data_designations(self, src): + """ + internal routine to return a dictionary of designation + information results from REST interface output + + """ + + if 'designations' in src: + src = src['designations'] + + return src + + def _process_data_dynamical_family(self, src): + """ + internal routine to return a dictionary of dynamical family + association results from REST interface output + + """ + + if 'dynamical-family' in src: + src = src['dynamical-family'] + + return src + + def _process_data_elements(self, src): + """ + internal routine to return a dictionary of orbital element results + from REST interface output and assign units to values or convert + values to Time objects where appropriate. + + """ + + if 'elements' in src: + src = src['elements'] + if src['a'] is not None: + src['a'] = u.Quantity(src['a'], u.au) + if src['aphelion_dist'] is not None: + src['aphelion_dist'] = u.Quantity(src['aphelion_dist'], u.au) + if src['delta_v'] is not None: + src['delta_v'] = u.Quantity(src['delta_v'], u.km/u.s) + if src['ecc_anomaly'] is not None: + src['ecc_anomaly'] = u.Quantity(src['ecc_anomaly'], u.deg) + if src['epoch'] is not None: + src['epoch'] = Time(src['epoch'], format='isot', scale='utc') + if src['h'] is not None: + src['h'] = u.Quantity(src['h'], u.mag) + if src['i'] is not None: + src['i'] = u.Quantity(src['m'], u.deg) + if src['long_of_perihelion'] is not None: + src['long_of_perihelion'] = u.Quantity(src['long_of_perihelion'], u.deg) + if src['m'] is not None: + src['m'] = u.Quantity(src['m'], u.deg) + if src['moid_earth'] is not None: + src['moid_earth'] = u.Quantity(src['moid_earth'], u.au) + if src['moid_jupiter'] is not None: + src['moid_jupiter'] = u.Quantity(src['moid_jupiter'], u.au) + if src['moid_mars'] is not None: + src['moid_mars'] = u.Quantity(src['moid_mars'], u.au) + if src['moid_mercury'] is not None: + src['moid_mercury'] = u.Quantity(src['moid_mercury'], u.au) + if src['moid_neptune'] is not None: + src['moid_neptune'] = u.Quantity(src['moid_neptune'], u.au) + if src['moid_saturn'] is not None: + src['moid_saturn'] = u.Quantity(src['moid_saturn'], u.au) + if src['moid_uranus'] is not None: + src['moid_uranus'] = u.Quantity(src['moid_uranus'], u.au) + if src['moid_venus'] is not None: + src['moid_venus'] = u.Quantity(src['moid_venus'], u.au) + if src['node'] is not None: + src['node'] = u.Quantity(src['node'], u.deg) + if src['peri'] is not None: + src['peri'] = u.Quantity(src['peri'], u.deg) + if src['q'] is not None: + src['q'] = u.Quantity(src['q'], u.au) + if src['r'] is not None: + src['r'] = u.Quantity(src['r'], u.au) + if src['true_anomaly'] is not None: + src['true_anomaly'] = u.Quantity(src['true_anomaly'], u.deg) + if src['x'] is not None: + src['x'] = u.Quantity(src['x'], u.au) + if src['y'] is not None: + src['y'] = u.Quantity(src['y'], u.au) + if src['z'] is not None: + src['z'] = u.Quantity(src['z'], u.au) + + return src + + def _process_data_escape_routes(self, src): + """ + internal routine to return a dictionary of NEO escape route + results from REST interface output and convert values to Time + objects where appropriate. + + """ + + if 'escape-routes' in src: + src = src['escape-routes'] + if src is not None: + for i in range(len(src)): + if src[i]['epoch'] is not None: + src[i]['epoch'] = Time(src[i]['epoch'], format='isot', scale='utc') + + return src + + def _process_data_lightcurves(self, src): + """ + internal routine to return a dictionary of lightcurve data + results from REST interface output and assign units to values + where appropriate. + + """ + + if 'lightcurves' in src: + src = src['lightcurves'] + for i in range(len(src)): + if src[i]['amp_max'] is not None: + src[i]['amp_max'] = u.Quantity(src[i]['amp_max'], u.mag) + if src[i]['amp_min'] is not None: + src[i]['amp_min'] = u.Quantity(src[i]['amp_min'], u.mag) + if src[i]['period'] is not None: + src[i]['period'] = u.Quantity(src[i]['period'], u.h) + + return src + + def _process_data_orbit(self, src): + """ + internal routine to return a dictionary of orbit fit data + results from REST interface output and assign units to values + where appropriate. + + """ + + if 'orbit' in src: + src = src['orbit'] + if src['a1con'] is not None: + src['a1con'] = u.Quantity(src['a1con'], u.au/(u.d ** 2)) + if src['a2con'] is not None: + src['a2con'] = u.Quantity(src['a2con'], u.au/(u.d ** 2)) + if src['a3con'] is not None: + src['a3con'] = u.Quantity(src['a3con'], u.au/(u.d ** 2)) + if src['arc'] is not None: + src['arc'] = u.Quantity(src['arc'], u.yr) + + return src + + def _process_data_taxonomies(self, src): + """ + internal routine to return a dictionary of taxonomic + classification results from REST interface output + + """ + + if 'taxonomies' in src: + src = src['taxonomies'] + + return src + + +AstInfo = AstInfoClass() diff --git a/astroquery/astorbdb/tests/__init__.py b/astroquery/astorbdb/tests/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/astroquery/astorbdb/tests/data/apophis_albedos.dat b/astroquery/astorbdb/tests/data/apophis_albedos.dat new file mode 100644 index 0000000000..4e90f6ba63 --- /dev/null +++ b/astroquery/astorbdb/tests/data/apophis_albedos.dat @@ -0,0 +1,4 @@ +{ + "albedos": [], + "identifier": "Apophis" +} diff --git a/astroquery/astorbdb/tests/data/apophis_colors.dat b/astroquery/astorbdb/tests/data/apophis_colors.dat new file mode 100644 index 0000000000..1488619dee --- /dev/null +++ b/astroquery/astorbdb/tests/data/apophis_colors.dat @@ -0,0 +1,4 @@ +{ + "colors": [], + "identifier": "Apophis" +} diff --git a/astroquery/astorbdb/tests/data/apophis_desig.dat b/astroquery/astorbdb/tests/data/apophis_desig.dat new file mode 100644 index 0000000000..97220abb53 --- /dev/null +++ b/astroquery/astorbdb/tests/data/apophis_desig.dat @@ -0,0 +1,13 @@ +{ + "arguments": { + "identifier": "Apophis" + }, + "designations": { + "alternate_designations": [ + "2004 MN4" + ], + "name": "Apophis", + "number": 99942, + "primary_designation": "Apophis" + } +} diff --git a/astroquery/astorbdb/tests/data/apophis_dynfamily.dat b/astroquery/astorbdb/tests/data/apophis_dynfamily.dat new file mode 100644 index 0000000000..0d5d48f983 --- /dev/null +++ b/astroquery/astorbdb/tests/data/apophis_dynfamily.dat @@ -0,0 +1,4 @@ +{ + "dynamical-family": [], + "identifier": "Apophis" +} diff --git a/astroquery/astorbdb/tests/data/apophis_elements.dat b/astroquery/astorbdb/tests/data/apophis_elements.dat new file mode 100644 index 0000000000..2ed48e0324 --- /dev/null +++ b/astroquery/astorbdb/tests/data/apophis_elements.dat @@ -0,0 +1,38 @@ +{ + "date": "2025-02-08 05:49:11.162991+00:00", + "elements": { + "a": 0.9223801109215902, + "aphelion_dist": 1.0986725754453988, + "delta_v": 5.688488188518416, + "dyn_type_json": [ + "nea", + "aten", + "pha" + ], + "e": 0.19112778174246087, + "ecc_anomaly": 334.2686361702579, + "epoch": "2025-01-25T00:00:00", + "h": 19, + "i": 3.3409766407098083, + "long_of_perihelion": 330.574782259775, + "m": 339.02295747710565, + "moid_earth": 6.939871761815047e-05, + "moid_jupiter": 4.119241532119461, + "moid_mars": 0.5759508004769529, + "moid_mercury": 0.33871624462149613, + "moid_neptune": 28.89080329478233, + "moid_saturn": 7.9988227518989365, + "moid_uranus": 17.195566404866668, + "moid_venus": 0.06967795040033274, + "node": 203.90371377720749, + "peri": 126.67106848256789, + "q": 0.7460876463977817, + "r": 0.7635688952487887, + "tisserand_param": 6.467275153029916, + "true_anomaly": 329.0171500059247, + "x": 0.3765418891232769, + "y": -0.625713194735456, + "z": -0.22301717750182065 + }, + "identifier": "Apophis" +} diff --git a/astroquery/astorbdb/tests/data/apophis_escaperoutes.dat b/astroquery/astorbdb/tests/data/apophis_escaperoutes.dat new file mode 100644 index 0000000000..782d06a43d --- /dev/null +++ b/astroquery/astorbdb/tests/data/apophis_escaperoutes.dat @@ -0,0 +1,30 @@ +{ + "escape-routes": [ + { + "citation_bibcode": "2018Icar..312..181G", + "citation_url": "https://ui.adsabs.harvard.edu/abs/2018Icar..312..181G/abstract", + "dn": "NaN", + "dp21_complex": 0.00243, + "dp31_complex": 0.00561, + "dp52_complex": 0, + "dp_hungaria": 0.00671, + "dp_jfc": 0, + "dp_nu6_complex": 0.00991, + "dp_phocaea": 0.00014, + "epoch": "2021-07-05T00:00:00", + "extrapolated": false, + "interpolated": false, + "measurement_techniques": null, + "n": "NaN", + "p21_complex": 0.01848, + "p31_complex": 0.04723, + "p52_complex": 0, + "p_hungaria": 0.05514, + "p_jfc": 0, + "p_nu6_complex": 0.87852, + "p_phocaea": 0.00064, + "survey_name": "debiased absolute-magnitude and orbit distributions of source regions for NEOs" + } + ], + "identifier": "Apophis" +} diff --git a/astroquery/astorbdb/tests/data/apophis_lightcurves.dat b/astroquery/astorbdb/tests/data/apophis_lightcurves.dat new file mode 100644 index 0000000000..959eeee29f --- /dev/null +++ b/astroquery/astorbdb/tests/data/apophis_lightcurves.dat @@ -0,0 +1,25 @@ +{ + "identifier": "Apophis", + "lightcurves": [ + { + "ambiguous_period": false, + "amp_flag": "", + "amp_max": 1.14, + "amp_min": 0.3, + "citation_bibcode": "2009Icar..202..134W", + "citation_url": "http://www.minorplanet.info/datazips/LCLIST_PUB_2018JUN.zip", + "measurement_techniques": [ + "Literature compilation" + ], + "non_principal_axis_rotator": true, + "notes": "T", + "period": 30.56, + "period_desc": "", + "period_flag": "", + "quality_code": "3", + "sparse_data": false, + "survey_name": "Asteroid Lightcurve Database (LCDB)", + "wide_field": false + } + ] +} diff --git a/astroquery/astorbdb/tests/data/apophis_orbit.dat b/astroquery/astorbdb/tests/data/apophis_orbit.dat new file mode 100644 index 0000000000..c0feba1adc --- /dev/null +++ b/astroquery/astorbdb/tests/data/apophis_orbit.dat @@ -0,0 +1,45 @@ +{ + "identifier": "apophis", + "orbit": { + "a1con": 5e-13, + "a2con": -2.901766637153165e-14, + "a3con": 0, + "arc": 18.068, + "autores": 2.3, + "ceu": 0.0037194668700428067, + "ceuderiv": 4.572889366066478e-05, + "date10": "2028-09-01T00:00:00", + "dateceu": "2025-01-11T00:00:00", + "dateimp": "2028-09-01T00:00:00", + "datenext": "2025-03-29T00:00:00", + "ephname": "DE440", + "firstobs": "2004-03-15T00:00:00", + "j_astmass": "[4.74e-10, 1.02e-10, 1.35e-11, 1.31e-10, 5.29e-11, 1.31e-11, 1.1e-11, 1.67e-11, 1.48e-11, 1.82e-11]", + "j_cor": "[[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [-0.9588254758482087, 0.0, 0.0, 0.0, 0.0, 0.0], [-0.8650044428182518, 0.8543097056031524, 0.0, 0.0, 0.0, 0.0], [0.18472242230792077, -0.0943066256295217, -0.44407151935833133, 0.0, 0.0, 0.0], [-0.08454105799778672, 0.04687779374366212, 0.3394233681971903, -0.9227508028595729, 0.0, 0.0], [0.10725098821188875, -0.24605355752853353, 0.021901472613237886, -0.37887379374955377, 0.026066481663153486, 0.0]]", + "j_cov1diag": "[3.1547367258458803e-10, 1.644979896760288e-08, 4.912781939112448e-07, 5.269811753675127e-06, 4.760406397536539e-06, 2.782543292345833e-06]", + "j_eleerr": "[211.75157477317185, 126.4630514590098, 204.2240107966595, 3.330542299474602, 0.19118431301904087, 0.9220636721338946]", + "j_iastuse": "[1, 2, 3, 4, 10, 15, 31, 52, 511, 704, 16, 65, 88, 107, 7, 87]", + "jdeperr": 2456379.2, + "lastobs": "2022-04-09T00:00:00", + "met1": 9.9709e-12, + "met2": 2.9598e-08, + "met3": 1.9715e-08, + "met4": 2.0788e-08, + "met5": 2.0457e-08, + "nappar": 8, + "nsing": 1, + "nuse": 9420, + "orbcomputer": "L.H. Wasserman ", + "orbdate": "2024-11-12T00:00:00", + "orbqual": 7.53, + "qsky10": 0.047, + "qskyimp": 0.047, + "qskynext": 0.0068, + "qualimp": 0, + "ref": "JPL/SSD", + "resmax": 2.3, + "rmso": 0.41, + "tauc": 0, + "timefac": 0.01 + } +} diff --git a/astroquery/astorbdb/tests/data/apophis_taxonomies.dat b/astroquery/astorbdb/tests/data/apophis_taxonomies.dat new file mode 100644 index 0000000000..2618bbfc0e --- /dev/null +++ b/astroquery/astorbdb/tests/data/apophis_taxonomies.dat @@ -0,0 +1,34 @@ +{ + "identifier": "Apophis", + "taxonomies": [ + { + "citation_bibcode": "2009Icar..200..480B", + "citation_url": "https://ui.adsabs.harvard.edu/abs/2009Icar..200..480B", + "measurement_techniques": [ + "Near IR spectroscopy" + ], + "modifier": "", + "survey_name": "Binzel et al. (2009)", + "taxonomy": "Sq", + "taxonomy_system": "Bus-DeMeo" + }, + { + "citation_bibcode": "2019Icar..324...41B", + "citation_url": "http://smass.mit.edu/minus.html", + "measurement_techniques": null, + "modifier": "", + "survey_name": "MITHNEOS", + "taxonomy": "S_comp", + "taxonomy_system": "Bus-DeMeo" + }, + { + "citation_bibcode": "2019Icar..324...41B", + "citation_url": "http://smass.mit.edu/minus.html", + "measurement_techniques": null, + "modifier": "", + "survey_name": "MITHNEOS", + "taxonomy": "Sq", + "taxonomy_system": "Bus-DeMeo" + } + ] +} diff --git a/astroquery/astorbdb/tests/data/beagle_albedos.dat b/astroquery/astorbdb/tests/data/beagle_albedos.dat new file mode 100644 index 0000000000..ed7ebd658c --- /dev/null +++ b/astroquery/astorbdb/tests/data/beagle_albedos.dat @@ -0,0 +1,138 @@ +{ + "albedos": [ + { + "albedo": 0.065, + "albedo_error_lower": -0.002, + "albedo_error_upper": 0.002, + "citation_bibcode": "2011PASJ...63.1117U", + "citation_url": "https://darts.isas.jaxa.jp/astro/akari/catalogue/AcuA.html", + "count_bands_detection": 2, + "diameter": 54.32, + "diameter_error_lower": -0.77, + "diameter_error_upper": 0.77, + "eta": 0.82, + "eta_error_lower": null, + "eta_error_upper": null, + "measurement_techniques": [ + "Mid IR photometry" + ], + "observations_total": 11, + "survey_name": "Usui et al. (2011)" + }, + { + "albedo": 0.0625, + "albedo_error_lower": -0.015, + "albedo_error_upper": 0.015, + "citation_bibcode": "2004PDSS...12.....T", + "citation_url": "http://sbn.psi.edu/pds/asteroid/IRAS_A_FPA_3_RDR_IMPS_V6_0.zip", + "count_bands_detection": 3, + "diameter": 53.17, + "diameter_error_lower": -5.5, + "diameter_error_upper": 5.5, + "eta": 0.756, + "eta_error_lower": -1, + "eta_error_upper": 1, + "measurement_techniques": [ + "Mid IR photometry" + ], + "observations_total": 18, + "survey_name": "Infrared Astronomical Satellite (IRAS)" + }, + { + "albedo": 0.075, + "albedo_error_lower": -0.011, + "albedo_error_upper": 0.011, + "citation_bibcode": "2019PDSS..251.....M", + "citation_url": "http://sbnarchive.psi.edu/pds4/non_mission/neowise_diameters_albedos_V2_0.zip", + "count_bands_detection": 4, + "diameter": 48.471, + "diameter_error_lower": -0.535, + "diameter_error_upper": 0.535, + "eta": 1.033, + "eta_error_lower": -0.021, + "eta_error_upper": 0.021, + "measurement_techniques": [ + "Mid IR photometry" + ], + "observations_total": 58, + "survey_name": "NEOWISE" + }, + { + "albedo": 0.045, + "albedo_error_lower": -0.005, + "albedo_error_upper": 0.005, + "citation_bibcode": "2019PDSS..251.....M", + "citation_url": "http://sbnarchive.psi.edu/pds4/non_mission/neowise_diameters_albedos_V2_0.zip", + "count_bands_detection": 4, + "diameter": 62.604, + "diameter_error_lower": -0.512, + "diameter_error_upper": 0.512, + "eta": 1.458, + "eta_error_lower": -0.025, + "eta_error_upper": 0.025, + "measurement_techniques": [ + "Mid IR photometry" + ], + "observations_total": 46, + "survey_name": "NEOWISE" + }, + { + "albedo": 0.092, + "albedo_error_lower": -0.041, + "albedo_error_upper": 0.041, + "citation_bibcode": "2019PDSS..251.....M", + "citation_url": "http://sbnarchive.psi.edu/pds4/non_mission/neowise_diameters_albedos_V2_0.zip", + "count_bands_detection": 2, + "diameter": 38.214, + "diameter_error_lower": -10.329, + "diameter_error_upper": 10.329, + "eta": 0.95, + "eta_error_lower": -0.2, + "eta_error_upper": 0.2, + "measurement_techniques": [ + "Mid IR photometry" + ], + "observations_total": 16, + "survey_name": "NEOWISE" + }, + { + "albedo": 0.069, + "albedo_error_lower": -0.034, + "albedo_error_upper": 0.034, + "citation_bibcode": "2019PDSS..251.....M", + "citation_url": "http://sbnarchive.psi.edu/pds4/non_mission/neowise_diameters_albedos_V2_0.zip", + "count_bands_detection": 2, + "diameter": 45.005, + "diameter_error_lower": -15.483, + "diameter_error_upper": 15.483, + "eta": 0.95, + "eta_error_lower": -0.2, + "eta_error_upper": 0.2, + "measurement_techniques": [ + "Mid IR photometry" + ], + "observations_total": 26, + "survey_name": "NEOWISE" + }, + { + "albedo": 0.083, + "albedo_error_lower": -0.054, + "albedo_error_upper": 0.054, + "citation_bibcode": "2019PDSS..251.....M", + "citation_url": "http://sbnarchive.psi.edu/pds4/non_mission/neowise_diameters_albedos_V2_0.zip", + "count_bands_detection": 2, + "diameter": 40.12, + "diameter_error_lower": -14.369, + "diameter_error_upper": 14.369, + "eta": 0.95, + "eta_error_lower": -0.2, + "eta_error_upper": 0.2, + "measurement_techniques": [ + "Mid IR photometry" + ], + "observations_total": 22, + "survey_name": "NEOWISE" + } + ], + "identifier": "656" +} diff --git a/astroquery/astorbdb/tests/data/beagle_colors.dat b/astroquery/astorbdb/tests/data/beagle_colors.dat new file mode 100644 index 0000000000..90ca1200c3 --- /dev/null +++ b/astroquery/astorbdb/tests/data/beagle_colors.dat @@ -0,0 +1,149 @@ +{ + "colors": [ + { + "citation_bibcode": "2010PDSS..125.....S", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0054_I0055_5_2MASS_V2_0.zip", + "color": 0.431, + "color_error": 0.035, + "jd": 2450770.99139, + "measurement_techniques": [ + "Near IR photometry" + ], + "survey_name": "2 Micron All Sky Survey (2MASS)", + "sys_color": "J-H" + }, + { + "citation_bibcode": "2010PDSS..125.....S", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0054_I0055_5_2MASS_V2_0.zip", + "color": 0.076, + "color_error": 0.041, + "jd": 2450770.99139, + "measurement_techniques": [ + "Near IR photometry" + ], + "survey_name": "2 Micron All Sky Survey (2MASS)", + "sys_color": "H-K" + }, + { + "citation_bibcode": "2010PDSS..125.....S", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0054_I0055_5_2MASS_V2_0.zip", + "color": 0.382, + "color_error": 0.037, + "jd": 2450771.00914, + "measurement_techniques": [ + "Near IR photometry" + ], + "survey_name": "2 Micron All Sky Survey (2MASS)", + "sys_color": "J-H" + }, + { + "citation_bibcode": "2010PDSS..125.....S", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0054_I0055_5_2MASS_V2_0.zip", + "color": 0.112, + "color_error": 0.043, + "jd": 2450771.00914, + "measurement_techniques": [ + "Near IR photometry" + ], + "survey_name": "2 Micron All Sky Survey (2MASS)", + "sys_color": "H-K" + }, + { + "citation_bibcode": "2010PDSS..125.....S", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0054_I0055_5_2MASS_V2_0.zip", + "color": 0.377, + "color_error": 0.037, + "jd": 2450776.94234, + "measurement_techniques": [ + "Near IR photometry" + ], + "survey_name": "2 Micron All Sky Survey (2MASS)", + "sys_color": "J-H" + }, + { + "citation_bibcode": "2010PDSS..125.....S", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0054_I0055_5_2MASS_V2_0.zip", + "color": 0.145, + "color_error": 0.051, + "jd": 2450776.94234, + "measurement_techniques": [ + "Near IR photometry" + ], + "survey_name": "2 Micron All Sky Survey (2MASS)", + "sys_color": "H-K" + }, + { + "citation_bibcode": "2007PDSS...79.....B", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0287_3_ASTDENIS_V1_0.zip", + "color": 0.42, + "color_error": 0.09, + "jd": 2451762.67375, + "measurement_techniques": [ + "Near IR photometry" + ], + "survey_name": "Deep European Near-Infrared Southern Sky Survey (DENIS)", + "sys_color": "I-J" + }, + { + "citation_bibcode": "2007PDSS...79.....B", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0287_3_ASTDENIS_V1_0.zip", + "color": 0.37, + "color_error": 0.23, + "jd": 2451762.67375, + "measurement_techniques": [ + "Near IR photometry" + ], + "survey_name": "Deep European Near-Infrared Southern Sky Survey (DENIS)", + "sys_color": "J-K" + }, + { + "citation_bibcode": "2010PDSS..124.....I", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0035_3_SDSSMOC_V3_0.zip", + "color": 1.54, + "color_error": 0.03, + "jd": 2452225.662755839, + "measurement_techniques": [ + "Visible photometry" + ], + "survey_name": "Sloan Digital Sky Survey (SDSS) Moving Object Catalog (MOC)", + "sys_color": "u-g" + }, + { + "citation_bibcode": "2010PDSS..124.....I", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0035_3_SDSSMOC_V3_0.zip", + "color": 0.38, + "color_error": 0.03, + "jd": 2452225.662755839, + "measurement_techniques": [ + "Visible photometry" + ], + "survey_name": "Sloan Digital Sky Survey (SDSS) Moving Object Catalog (MOC)", + "sys_color": "g-r" + }, + { + "citation_bibcode": "2010PDSS..124.....I", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0035_3_SDSSMOC_V3_0.zip", + "color": 0.14, + "color_error": 0.03, + "jd": 2452225.662755839, + "measurement_techniques": [ + "Visible photometry" + ], + "survey_name": "Sloan Digital Sky Survey (SDSS) Moving Object Catalog (MOC)", + "sys_color": "r-i" + }, + { + "citation_bibcode": "2010PDSS..124.....I", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0035_3_SDSSMOC_V3_0.zip", + "color": 0.08, + "color_error": 0.03, + "jd": 2452225.662755839, + "measurement_techniques": [ + "Visible photometry" + ], + "survey_name": "Sloan Digital Sky Survey (SDSS) Moving Object Catalog (MOC)", + "sys_color": "i-z" + } + ], + "identifier": "656" +} diff --git a/astroquery/astorbdb/tests/data/beagle_desig.dat b/astroquery/astorbdb/tests/data/beagle_desig.dat new file mode 100644 index 0000000000..dfdd8ea412 --- /dev/null +++ b/astroquery/astorbdb/tests/data/beagle_desig.dat @@ -0,0 +1,15 @@ +{ + "arguments": { + "identifier": "656" + }, + "designations": { + "alternate_designations": [ + "1954 HJ", + "A908 BJ", + "A917 ST" + ], + "name": "Beagle", + "number": 656, + "primary_designation": "Beagle" + } +} diff --git a/astroquery/astorbdb/tests/data/beagle_dynfamily.dat b/astroquery/astorbdb/tests/data/beagle_dynfamily.dat new file mode 100644 index 0000000000..fac75a2899 --- /dev/null +++ b/astroquery/astorbdb/tests/data/beagle_dynfamily.dat @@ -0,0 +1,23 @@ +{ + "dynamical-family": [ + { + "citation_bibcode": "2015PDSS..234.....N", + "citation_url": "http://sbn.psi.edu/pds/asteroid/EAR_A_VARGBDET_5_NESVORNYFAM_V3_0.zip", + "family": "Themis", + "measurement_techniques": [ + "Simulation" + ], + "survey_name": "Nesvorny et al. (2015)" + }, + { + "citation_bibcode": "2015PDSS..234.....N", + "citation_url": "http://sbn.psi.edu/pds/asteroid/EAR_A_VARGBDET_5_NESVORNYFAM_V3_0.zip", + "family": "Beagle", + "measurement_techniques": [ + "Simulation" + ], + "survey_name": "Nesvorny et al. (2015)" + } + ], + "identifier": "656" +} diff --git a/astroquery/astorbdb/tests/data/beagle_elements.dat b/astroquery/astorbdb/tests/data/beagle_elements.dat new file mode 100644 index 0000000000..e5c3e51bea --- /dev/null +++ b/astroquery/astorbdb/tests/data/beagle_elements.dat @@ -0,0 +1,37 @@ +{ + "date": "2025-02-08 05:50:51.627005+00:00", + "elements": { + "a": 3.15597543366717, + "aphelion_dist": 3.5700983216150712, + "delta_v": null, + "dyn_type_json": [ + "mba", + "outer_belt" + ], + "e": 0.13121866651119643, + "ecc_anomaly": 275.8489423333028, + "epoch": "2025-01-25T00:00:00", + "h": 10.06, + "i": 0.5180865432798002, + "long_of_perihelion": 153.791591540672, + "m": 283.3280781476213, + "moid_earth": 1.7522716139428816, + "moid_jupiter": 1.4246548879973067, + "moid_mars": 1.0785787778872962, + "moid_mercury": 2.3755375994998014, + "moid_neptune": 26.364573834208688, + "moid_saturn": 5.919289269592209, + "moid_uranus": 15.51305031070249, + "moid_venus": 2.024940835328519, + "node": 184.26497485366622, + "peri": 329.5266166870055, + "q": 2.741852545719269, + "r": 3.1137737884876553, + "tisserand_param": 3.192950759780598, + "true_anomaly": 268.2975002350777, + "x": 1.4575594856831744, + "y": 2.533895939883413, + "z": 1.072603802627103 + }, + "identifier": "656" +} diff --git a/astroquery/astorbdb/tests/data/beagle_escaperoutes.dat b/astroquery/astorbdb/tests/data/beagle_escaperoutes.dat new file mode 100644 index 0000000000..db3e966e9b --- /dev/null +++ b/astroquery/astorbdb/tests/data/beagle_escaperoutes.dat @@ -0,0 +1,4 @@ +{ + "escape-routes": [], + "identifier": "656" +} diff --git a/astroquery/astorbdb/tests/data/beagle_lightcurves.dat b/astroquery/astorbdb/tests/data/beagle_lightcurves.dat new file mode 100644 index 0000000000..155b15349c --- /dev/null +++ b/astroquery/astorbdb/tests/data/beagle_lightcurves.dat @@ -0,0 +1,25 @@ +{ + "identifier": "656", + "lightcurves": [ + { + "ambiguous_period": false, + "amp_flag": "", + "amp_max": 1.2, + "amp_min": 0.57, + "citation_bibcode": "2009Icar..202..134W", + "citation_url": "http://www.minorplanet.info/datazips/LCLIST_PUB_2018JUN.zip", + "measurement_techniques": [ + "Literature compilation" + ], + "non_principal_axis_rotator": false, + "notes": "", + "period": 7.035, + "period_desc": "", + "period_flag": "", + "quality_code": "3", + "sparse_data": false, + "survey_name": "Asteroid Lightcurve Database (LCDB)", + "wide_field": false + } + ] +} diff --git a/astroquery/astorbdb/tests/data/beagle_orbit.dat b/astroquery/astorbdb/tests/data/beagle_orbit.dat new file mode 100644 index 0000000000..4bdd913285 --- /dev/null +++ b/astroquery/astorbdb/tests/data/beagle_orbit.dat @@ -0,0 +1,45 @@ +{ + "identifier": "656", + "orbit": { + "a1con": 0, + "a2con": 0, + "a3con": 0, + "arc": 116.943, + "autores": 2.3, + "ceu": 0.00918202538628214, + "ceuderiv": -3.952415533951413e-05, + "date10": "2032-02-26T00:00:00", + "dateceu": "2025-01-11T00:00:00", + "dateimp": "2032-02-26T00:00:00", + "datenext": "2026-01-18T00:00:00", + "ephname": "DE440", + "firstobs": "1908-01-26T00:00:00", + "j_astmass": "[4.74e-10, 1.02e-10, 1.35e-11, 1.31e-10, 5.29e-11, 1.31e-11, 1.1e-11, 1.67e-11, 1.48e-11, 1.82e-11]", + "j_cor": "[[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.017572662612471136, 0.0, 0.0, 0.0, 0.0, 0.0], [-0.0011842571147701218, -0.0034307741598523663, 0.0, 0.0, 0.0, 0.0], [0.0004964814519323222, -0.0007444819985609447, 0.06396694743995918, 0.0, 0.0, 0.0], [0.0027006818619532864, 0.009542747008856057, -0.0639343314293586, -0.9992019646300331, 0.0, 0.0], [0.5473587907456194, -0.14319432049504818, -0.0003553442588968104, 0.0007007192569142259, -0.031694982177774216, 0.0]]", + "j_cov1diag": "[3.035830489563973e-09, 1.5000791568512695e-08, 1.7166013061122893e-06, 0.000152806871102379, 0.0001529427163380573, 7.1702966647898146e-06]", + "j_eleerr": "[108.56083395235272, 336.65623029847376, 184.52060809460923, 0.5008727840751515, 0.12363053541727005, 3.1584181206595106]", + "j_iastuse": "[1, 2, 3, 4, 10, 15, 31, 52, 511, 704, 16, 65, 88, 107, 7, 87]", + "jdeperr": 2439323.2, + "lastobs": "2025-01-04T00:00:00", + "met1": 4.4185e-12, + "met2": 9.0422e-08, + "met3": 4.1988e-08, + "met4": 4.3066e-08, + "met5": 4.2897e-08, + "nappar": 58, + "nsing": 10, + "nuse": 5375, + "orbcomputer": "L.H. Wasserman ", + "orbdate": "2025-01-08T00:00:00", + "orbqual": 7.04, + "qsky10": 0.019, + "qskyimp": 0.019, + "qskynext": 0.017, + "qualimp": 0, + "ref": "E25A95 ", + "resmax": 2.3, + "rmso": 0.36, + "tauc": 0, + "timefac": 0.01 + } +} diff --git a/astroquery/astorbdb/tests/data/beagle_taxonomies.dat b/astroquery/astorbdb/tests/data/beagle_taxonomies.dat new file mode 100644 index 0000000000..f3d4c38787 --- /dev/null +++ b/astroquery/astorbdb/tests/data/beagle_taxonomies.dat @@ -0,0 +1,27 @@ +{ + "identifier": "656", + "taxonomies": [ + { + "citation_bibcode": "2011PDSS..145.....H", + "citation_url": "http://sbnarchive.psi.edu/pds4/non_mission/ast.sdss-based-taxonomy.zip", + "measurement_techniques": [ + "Visible photometry" + ], + "modifier": "", + "survey_name": "Carvano et al. (2010)", + "taxonomy": "C", + "taxonomy_system": "Carvano_SDSS" + }, + { + "citation_bibcode": "2013Icar..226..723D", + "citation_url": "http://www.mit.edu/~fdemeo/publications/alluniq_adr4.dat", + "measurement_techniques": [ + "Visible photometry" + ], + "modifier": "", + "survey_name": "DeMeo et al. (2013)", + "taxonomy": "C", + "taxonomy_system": "DeMeo_Carry_SDSS" + } + ] +} diff --git a/astroquery/astorbdb/tests/data/ceres_missing_value_albedos.dat b/astroquery/astorbdb/tests/data/ceres_missing_value_albedos.dat new file mode 100644 index 0000000000..2c3b7857ee --- /dev/null +++ b/astroquery/astorbdb/tests/data/ceres_missing_value_albedos.dat @@ -0,0 +1,62 @@ +{ + "albedos": [ + { + "albedo": null, + "albedo_error_lower": -0.003, + "albedo_error_upper": 0.003, + "citation_bibcode": "2011PASJ...63.1117U", + "citation_url": "https://darts.isas.jaxa.jp/astro/akari/catalogue/AcuA.html", + "count_bands_detection": 2, + "diameter": 973.89, + "diameter_error_lower": -13.31, + "diameter_error_upper": 13.31, + "eta": 0.82, + "eta_error_lower": null, + "eta_error_upper": null, + "measurement_techniques": [ + "Mid IR photometry" + ], + "observations_total": 7, + "survey_name": "Usui et al. (2011)" + }, + { + "albedo": 0.1132, + "albedo_error_lower": -0.005, + "albedo_error_upper": 0.005, + "citation_bibcode": "2004PDSS...12.....T", + "citation_url": "http://sbn.psi.edu/pds/asteroid/IRAS_A_FPA_3_RDR_IMPS_V6_0.zip", + "count_bands_detection": 3, + "diameter": 848.4, + "diameter_error_lower": -19.7, + "diameter_error_upper": 19.7, + "eta": 0.756, + "eta_error_lower": -1, + "eta_error_upper": 1, + "measurement_techniques": [ + "Mid IR photometry" + ], + "observations_total": 15, + "survey_name": "Infrared Astronomical Satellite (IRAS)" + }, + { + "albedo": 0.0936, + "albedo_error_lower": null, + "albedo_error_upper": null, + "citation_bibcode": "2006Icar..184..211S", + "citation_url": "http://sbn.psi.edu/pds/asteroid/EAR_A_VARGBDET_5_OCCALB_V1_0.zip", + "count_bands_detection": 1, + "diameter": 933, + "diameter_error_lower": null, + "diameter_error_upper": null, + "eta": null, + "eta_error_lower": null, + "eta_error_upper": null, + "measurement_techniques": [ + "Occultation" + ], + "observations_total": 1, + "survey_name": "Shevchenko and Tedesco (2006)" + } + ], + "identifier": "1" +} diff --git a/astroquery/astorbdb/tests/data/ceres_missing_value_colors.dat b/astroquery/astorbdb/tests/data/ceres_missing_value_colors.dat new file mode 100644 index 0000000000..7853ba7b38 --- /dev/null +++ b/astroquery/astorbdb/tests/data/ceres_missing_value_colors.dat @@ -0,0 +1,77 @@ +{ + "colors": [ + { + "citation_bibcode": "2010PDSS..125.....S", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0054_I0055_5_2MASS_V2_0.zip", + "color": null, + "color_error": 0.051, + "jd": 2451640.816, + "measurement_techniques": [ + "Near IR photometry" + ], + "survey_name": "2 Micron All Sky Survey (2MASS)", + "sys_color": "J-H" + }, + { + "citation_bibcode": "2010PDSS..125.....S", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0054_I0055_5_2MASS_V2_0.zip", + "color": 0.081, + "color_error": 0.044, + "jd": 2451640.816, + "measurement_techniques": [ + "Near IR photometry" + ], + "survey_name": "2 Micron All Sky Survey (2MASS)", + "sys_color": "H-K" + }, + { + "citation_bibcode": "2007PDSS...79.....B", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0287_3_ASTDENIS_V1_0.zip", + "color": 1.48, + "color_error": 0.05, + "jd": 2450184.851991, + "measurement_techniques": [ + "Near IR photometry" + ], + "survey_name": "Deep European Near-Infrared Southern Sky Survey (DENIS)", + "sys_color": "I-J" + }, + { + "citation_bibcode": "2007PDSS...79.....B", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0287_3_ASTDENIS_V1_0.zip", + "color": 1.29, + "color_error": 0.08, + "jd": 2450184.851991, + "measurement_techniques": [ + "Near IR photometry" + ], + "survey_name": "Deep European Near-Infrared Southern Sky Survey (DENIS)", + "sys_color": "J-K" + }, + { + "citation_bibcode": "2005PDSS...30.....T", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_5_DDR_UBV_MEAN_VALUES_V1_2.zip", + "color": 0.426, + "color_error": 0.026, + "jd": null, + "measurement_techniques": [ + "Visible photometry" + ], + "survey_name": "PDS UBV color compilation", + "sys_color": "U-B" + }, + { + "citation_bibcode": "2005PDSS...30.....T", + "citation_url": "http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_5_DDR_UBV_MEAN_VALUES_V1_2.zip", + "color": 0.713, + "color_error": 0.014, + "jd": null, + "measurement_techniques": [ + "Visible photometry" + ], + "survey_name": "PDS UBV color compilation", + "sys_color": "B-V" + } + ], + "identifier": "1" +} diff --git a/astroquery/astorbdb/tests/data/ceres_missing_value_desig.dat b/astroquery/astorbdb/tests/data/ceres_missing_value_desig.dat new file mode 100644 index 0000000000..c133b9dae0 --- /dev/null +++ b/astroquery/astorbdb/tests/data/ceres_missing_value_desig.dat @@ -0,0 +1,15 @@ +{ + "arguments": { + "identifier": "1" + }, + "designations": { + "alternate_designations": [ + "A899 OF", + "1943 XB", + "A801 AA" + ], + "name": null, + "number": 1, + "primary_designation": "Ceres" + } +} diff --git a/astroquery/astorbdb/tests/data/ceres_missing_value_dynfamily.dat b/astroquery/astorbdb/tests/data/ceres_missing_value_dynfamily.dat new file mode 100644 index 0000000000..1a705b72c0 --- /dev/null +++ b/astroquery/astorbdb/tests/data/ceres_missing_value_dynfamily.dat @@ -0,0 +1,4 @@ +{ + "dynamical-family": null, + "identifier": "1" +} diff --git a/astroquery/astorbdb/tests/data/ceres_missing_value_elements.dat b/astroquery/astorbdb/tests/data/ceres_missing_value_elements.dat new file mode 100644 index 0000000000..34b169b320 --- /dev/null +++ b/astroquery/astorbdb/tests/data/ceres_missing_value_elements.dat @@ -0,0 +1,37 @@ +{ + "date": "2025-02-08 05:30:02.186297+00:00", + "elements": { + "a": null, + "aphelion_dist": 2.985676242719957, + "delta_v": null, + "dyn_type_json": [ + "mba", + "middle_belt" + ], + "e": 0.07931105349232022, + "ecc_anomaly": 168.22005246432852, + "epoch": "2025-01-25T00:00:00", + "h": 3.34, + "i": 10.587901965705468, + "long_of_perihelion": 153.514863665408, + "m": 167.2923406599075, + "moid_earth": 1.582689143947702, + "moid_jupiter": 2.0906001023409324, + "moid_mars": 0.9285543056614984, + "moid_mercury": 2.173995396438814, + "moid_neptune": 26.950942790507288, + "moid_saturn": 6.327143993151247, + "moid_uranus": 15.766007191958693, + "moid_venus": 1.8351653479948107, + "node": 80.2541666922529, + "peri": 73.26069697315508, + "q": 2.546883130334219, + "r": 2.9810555096143885, + "tisserand_param": 3.310119214600075, + "true_anomaly": 169.1144339283163, + "x": 2.32479958364782, + "y": -1.4600724963699816, + "z": -1.161975538734423 + }, + "identifier": "1" +} diff --git a/astroquery/astorbdb/tests/data/ceres_missing_value_escaperoutes.dat b/astroquery/astorbdb/tests/data/ceres_missing_value_escaperoutes.dat new file mode 100644 index 0000000000..089feb2529 --- /dev/null +++ b/astroquery/astorbdb/tests/data/ceres_missing_value_escaperoutes.dat @@ -0,0 +1,4 @@ +{ + "escape-routes": null, + "identifier": "1" +} diff --git a/astroquery/astorbdb/tests/data/ceres_missing_value_lightcurves.dat b/astroquery/astorbdb/tests/data/ceres_missing_value_lightcurves.dat new file mode 100644 index 0000000000..7a8b8b3d93 --- /dev/null +++ b/astroquery/astorbdb/tests/data/ceres_missing_value_lightcurves.dat @@ -0,0 +1,25 @@ +{ + "identifier": "1", + "lightcurves": [ + { + "ambiguous_period": false, + "amp_flag": "", + "amp_max": 0.06, + "amp_min": 0.03, + "citation_bibcode": "2009Icar..202..134W", + "citation_url": "http://www.minorplanet.info/datazips/LCLIST_PUB_2018JUN.zip", + "measurement_techniques": [ + "Literature compilation" + ], + "non_principal_axis_rotator": false, + "notes": "", + "period": null, + "period_desc": "", + "period_flag": "S", + "quality_code": "3", + "sparse_data": false, + "survey_name": "Asteroid Lightcurve Database (LCDB)", + "wide_field": false + } + ] +} diff --git a/astroquery/astorbdb/tests/data/ceres_missing_value_orbit.dat b/astroquery/astorbdb/tests/data/ceres_missing_value_orbit.dat new file mode 100644 index 0000000000..47b0980f1f --- /dev/null +++ b/astroquery/astorbdb/tests/data/ceres_missing_value_orbit.dat @@ -0,0 +1,45 @@ +{ + "identifier": "1", + "orbit": { + "a1con": 0, + "a2con": 0, + "a3con": 0, + "arc": 223.748, + "autores": 2.3, + "ceu": 0.011052764038758855, + "ceuderiv": -1.69028259799703e-05, + "date10": "2032-03-01T00:00:00", + "dateceu": "2025-01-11T00:00:00", + "dateimp": "2032-03-01T00:00:00", + "datenext": "2025-10-06T00:00:00", + "ephname": null, + "firstobs": "1801-01-31T00:00:00", + "j_astmass": "[4.74e-10, 1.02e-10, 1.35e-11, 1.31e-10, 5.29e-11, 1.31e-11, 1.1e-11, 1.67e-11, 1.48e-11, 1.82e-11]", + "j_cor": "[[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [-0.016496417213046153, 0.0, 0.0, 0.0, 0.0, 0.0], [0.002246832973024447, -0.0017768888961571638, 0.0, 0.0, 0.0, 0.0], [-0.0023836023198471347, -0.0023032856241161663, -0.16055454930532814, 0.0, 0.0, 0.0], [0.011004366938354996, 0.13640458611915224, 0.10407261290255428, -0.5880390130839735, 0.0, 0.0], [0.17667421939039218, -0.15536545569558916, -0.007327275861630802, 0.003961250332958805, -0.7924178005338209, 0.0]]", + "j_cov1diag": "[1.0984410042812388e-09, 1.7332483307446544e-08, 1.853953507972996e-06, 1.046162954598296e-05, 1.750043296549117e-05, 1.4094505972552965e-05]", + "j_eleerr": "[44.357065376422014, 68.57319721425607, 81.90868166278825, 10.616365284009618, 0.07652652022014644, 2.7666943885563695]", + "j_iastuse": "[1, 2, 3, 4, 10, 15, 31, 52, 511, 704, 16, 65, 88, 107, 7, 87]", + "jdeperr": 2419754.3, + "lastobs": "2024-11-01T00:00:00", + "met1": 2.2261e-12, + "met2": 7.5347e-08, + "met3": 4.9599e-08, + "met4": 5.3335e-08, + "met5": 5.2924e-08, + "nappar": 119, + "nsing": 6, + "nuse": 6905, + "orbcomputer": "L.H. Wasserman ", + "orbdate": "2024-12-11T00:00:00", + "orbqual": 7.12, + "qsky10": 0.027, + "qskyimp": 0.027, + "qskynext": 0.02, + "qualimp": 0, + "ref": "E24V47 ", + "resmax": 2.3, + "rmso": 0.55, + "tauc": 0, + "timefac": 0.01 + } +} diff --git a/astroquery/astorbdb/tests/data/ceres_missing_value_taxonomies.dat b/astroquery/astorbdb/tests/data/ceres_missing_value_taxonomies.dat new file mode 100644 index 0000000000..e08ed0eff0 --- /dev/null +++ b/astroquery/astorbdb/tests/data/ceres_missing_value_taxonomies.dat @@ -0,0 +1,105 @@ +{ + "identifier": "1", + "taxonomies": [ + { + "citation_bibcode": "1989aste.conf.1139T", + "citation_url": "https://ui.adsabs.harvard.edu/abs/1989aste.conf.1139T", + "measurement_techniques": [ + "Visible photometry" + ], + "modifier": "", + "survey_name": "Tholen (1989)", + "taxonomy": null, + "taxonomy_system": "Tholen_ECAS" + }, + { + "citation_bibcode": "1987Icar...72..304B", + "citation_url": "https://ui.adsabs.harvard.edu/abs/1987Icar...72..304B", + "measurement_techniques": [ + "Visible photometry", + "Mid IR photometry" + ], + "modifier": "", + "survey_name": "Barucci et al. (1987)", + "taxonomy": "G0", + "taxonomy_system": "Barucci_Gmode" + }, + { + "citation_bibcode": "1989AJ.....97..580T", + "citation_url": "https://ui.adsabs.harvard.edu/abs/1989AJ.....97..580T", + "measurement_techniques": [ + "Visible photometry", + "Mid IR photometry" + ], + "modifier": ":", + "survey_name": "Tedesco et al. (1989)", + "taxonomy": "G", + "taxonomy_system": "Tedesco_3parameter" + }, + { + "citation_bibcode": "1994JGR....9910847H", + "citation_url": "https://ui.adsabs.harvard.edu/abs/1994JGR....9910847H", + "measurement_techniques": [ + "Visible photometry", + "Near IR spectroscopy" + ], + "modifier": "", + "survey_name": "Howell et al. (1994)", + "taxonomy": "Cv", + "taxonomy_system": "Howell_Neural" + }, + { + "citation_bibcode": "2002Icar..158..146B", + "citation_url": "https://ui.adsabs.harvard.edu/abs/2002Icar..158..146B", + "measurement_techniques": [ + "Visible spectroscopy" + ], + "modifier": "", + "survey_name": "SMASSII", + "taxonomy": "C", + "taxonomy_system": "Bus_SMASSII" + }, + { + "citation_bibcode": "2004Icar..172..179L", + "citation_url": "https://ui.adsabs.harvard.edu/abs/2004Icar..172..179L", + "measurement_techniques": [ + "Visible spectroscopy" + ], + "modifier": "", + "survey_name": "Solar System Objects Spectroscopic Survey (S3OS2)", + "taxonomy": "C", + "taxonomy_system": "S3OS2_Tholen" + }, + { + "citation_bibcode": "2004Icar..172..179L", + "citation_url": "https://ui.adsabs.harvard.edu/abs/2004Icar..172..179L", + "measurement_techniques": [ + "Visible spectroscopy" + ], + "modifier": "", + "survey_name": "Solar System Objects Spectroscopic Survey (S3OS2)", + "taxonomy": "C", + "taxonomy_system": "Bus_SMASSII" + }, + { + "citation_bibcode": "2009Icar..202..160D", + "citation_url": "https://ui.adsabs.harvard.edu/abs/2009Icar..202..160D", + "measurement_techniques": [ + "Near IR spectroscopy" + ], + "modifier": "", + "survey_name": "DeMeo et al. (2009)", + "taxonomy": "C", + "taxonomy_system": "Bus-DeMeo" + }, + { + "citation_bibcode": "2019Icar..324...41B", + "citation_url": "http://smass.mit.edu/minus.html", + "measurement_techniques": null, + "modifier": "", + "survey_name": "MITHNEOS", + "taxonomy": "C", + "taxonomy_system": "Bus-DeMeo" + } + ] +} diff --git a/astroquery/astorbdb/tests/data/lixiaohua_albedos.dat b/astroquery/astorbdb/tests/data/lixiaohua_albedos.dat new file mode 100644 index 0000000000..2f45b4068f --- /dev/null +++ b/astroquery/astorbdb/tests/data/lixiaohua_albedos.dat @@ -0,0 +1,81 @@ +{ + "albedos": [ + { + "albedo": 0.042, + "albedo_error_lower": -0.008, + "albedo_error_upper": 0.008, + "citation_bibcode": "2019PDSS..251.....M", + "citation_url": "http://sbnarchive.psi.edu/pds4/non_mission/neowise_diameters_albedos_V2_0.zip", + "count_bands_detection": 4, + "diameter": 20.455, + "diameter_error_lower": -0.124, + "diameter_error_upper": 0.124, + "eta": 0.902, + "eta_error_lower": -0.008, + "eta_error_upper": 0.008, + "measurement_techniques": [ + "Mid IR photometry" + ], + "observations_total": 50, + "survey_name": "NEOWISE" + }, + { + "albedo": 0.056, + "albedo_error_lower": -0.083, + "albedo_error_upper": 0.083, + "citation_bibcode": "2019PDSS..251.....M", + "citation_url": "http://sbnarchive.psi.edu/pds4/non_mission/neowise_diameters_albedos_V2_0.zip", + "count_bands_detection": 1, + "diameter": 16.894, + "diameter_error_lower": -4.983, + "diameter_error_upper": 4.983, + "eta": 0.95, + "eta_error_lower": -0.2, + "eta_error_upper": 0.2, + "measurement_techniques": [ + "Mid IR photometry" + ], + "observations_total": 11, + "survey_name": "NEOWISE" + }, + { + "albedo": 0.04, + "albedo_error_lower": -0.029, + "albedo_error_upper": 0.029, + "citation_bibcode": "2019PDSS..251.....M", + "citation_url": "http://sbnarchive.psi.edu/pds4/non_mission/neowise_diameters_albedos_V2_0.zip", + "count_bands_detection": 2, + "diameter": 17.355, + "diameter_error_lower": -5.239, + "diameter_error_upper": 5.239, + "eta": 0.95, + "eta_error_lower": -0.2, + "eta_error_upper": 0.2, + "measurement_techniques": [ + "Mid IR photometry" + ], + "observations_total": 26, + "survey_name": "NEOWISE" + }, + { + "albedo": 0.038, + "albedo_error_lower": -0.085, + "albedo_error_upper": 0.085, + "citation_bibcode": "2019PDSS..251.....M", + "citation_url": "http://sbnarchive.psi.edu/pds4/non_mission/neowise_diameters_albedos_V2_0.zip", + "count_bands_detection": 1, + "diameter": 18.672, + "diameter_error_lower": -6.019, + "diameter_error_upper": 6.019, + "eta": 0.95, + "eta_error_lower": -0.2, + "eta_error_upper": 0.2, + "measurement_techniques": [ + "Mid IR photometry" + ], + "observations_total": 6, + "survey_name": "NEOWISE" + } + ], + "identifier": "3556" +} diff --git a/astroquery/astorbdb/tests/data/lixiaohua_colors.dat b/astroquery/astorbdb/tests/data/lixiaohua_colors.dat new file mode 100644 index 0000000000..11f815d63f --- /dev/null +++ b/astroquery/astorbdb/tests/data/lixiaohua_colors.dat @@ -0,0 +1,4 @@ +{ + "colors": [], + "identifier": "3556" +} diff --git a/astroquery/astorbdb/tests/data/lixiaohua_desig.dat b/astroquery/astorbdb/tests/data/lixiaohua_desig.dat new file mode 100644 index 0000000000..81ad322338 --- /dev/null +++ b/astroquery/astorbdb/tests/data/lixiaohua_desig.dat @@ -0,0 +1,14 @@ +{ + "arguments": { + "identifier": "3556" + }, + "designations": { + "alternate_designations": [ + "1964 UO", + "1981 YT1" + ], + "name": "Lixiaohua", + "number": 3556, + "primary_designation": "Lixiaohua" + } +} diff --git a/astroquery/astorbdb/tests/data/lixiaohua_dynfamily.dat b/astroquery/astorbdb/tests/data/lixiaohua_dynfamily.dat new file mode 100644 index 0000000000..b6f0b04df7 --- /dev/null +++ b/astroquery/astorbdb/tests/data/lixiaohua_dynfamily.dat @@ -0,0 +1,14 @@ +{ + "dynamical-family": [ + { + "citation_bibcode": "2015PDSS..234.....N", + "citation_url": "http://sbn.psi.edu/pds/asteroid/EAR_A_VARGBDET_5_NESVORNYFAM_V3_0.zip", + "family": "Lixiaohua", + "measurement_techniques": [ + "Simulation" + ], + "survey_name": "Nesvorny et al. (2015)" + } + ], + "identifier": "3556" +} diff --git a/astroquery/astorbdb/tests/data/lixiaohua_elements.dat b/astroquery/astorbdb/tests/data/lixiaohua_elements.dat new file mode 100644 index 0000000000..3c8640a490 --- /dev/null +++ b/astroquery/astorbdb/tests/data/lixiaohua_elements.dat @@ -0,0 +1,37 @@ +{ + "date": "2025-02-08 05:52:50.378553+00:00", + "elements": { + "a": 3.1688640794536274, + "aphelion_dist": 3.8440435057162117, + "delta_v": null, + "dyn_type_json": [ + "mba", + "outer_belt" + ], + "e": 0.21306670445107836, + "ecc_anomaly": 265.7906698456685, + "epoch": "2025-01-25T00:00:00", + "h": 12.87, + "i": 9.279897818936504, + "long_of_perihelion": 26.495925647537, + "m": 277.96556262403556, + "moid_earth": 1.504648121634465, + "moid_jupiter": 1.6480263117224694, + "moid_mars": 1.056133631427667, + "moid_mercury": 2.164958110680459, + "moid_neptune": 26.502481802900377, + "moid_saturn": 5.828690511777845, + "moid_uranus": 14.56087404207329, + "moid_venus": 1.7781309992884538, + "node": 240.6869298031853, + "peri": 145.8089958443514, + "q": 2.493684653191043, + "r": 3.218422654957371, + "tisserand_param": 3.147158568896854, + "true_anomaly": 253.61703849670914, + "x": 0.5417957465510436, + "y": -3.0260612070096755, + "z": -0.9527094658883132 + }, + "identifier": "3556" +} diff --git a/astroquery/astorbdb/tests/data/lixiaohua_escaperoutes.dat b/astroquery/astorbdb/tests/data/lixiaohua_escaperoutes.dat new file mode 100644 index 0000000000..f94f908bcd --- /dev/null +++ b/astroquery/astorbdb/tests/data/lixiaohua_escaperoutes.dat @@ -0,0 +1,4 @@ +{ + "escape-routes": [], + "identifier": "3556" +} diff --git a/astroquery/astorbdb/tests/data/lixiaohua_lightcurves.dat b/astroquery/astorbdb/tests/data/lixiaohua_lightcurves.dat new file mode 100644 index 0000000000..aaaef943a1 --- /dev/null +++ b/astroquery/astorbdb/tests/data/lixiaohua_lightcurves.dat @@ -0,0 +1,4 @@ +{ + "identifier": "3556", + "lightcurves": [] +} diff --git a/astroquery/astorbdb/tests/data/lixiaohua_orbit.dat b/astroquery/astorbdb/tests/data/lixiaohua_orbit.dat new file mode 100644 index 0000000000..fdba604c97 --- /dev/null +++ b/astroquery/astorbdb/tests/data/lixiaohua_orbit.dat @@ -0,0 +1,45 @@ +{ + "identifier": "3556", + "orbit": { + "a1con": 0, + "a2con": 0, + "a3con": 0, + "arc": 59.856, + "autores": 2.3, + "ceu": 0.012459602034759201, + "ceuderiv": 1.4616041850494338e-05, + "date10": "2031-11-08T00:00:00", + "dateceu": "2025-01-11T00:00:00", + "dateimp": "2031-11-08T00:00:00", + "datenext": "2025-09-10T00:00:00", + "ephname": "DE440", + "firstobs": "1964-10-30T00:00:00", + "j_astmass": "[4.74e-10, 1.02e-10, 1.35e-11, 1.31e-10, 5.29e-11, 1.31e-11, 1.1e-11, 1.67e-11, 1.48e-11, 1.82e-11]", + "j_cor": "[[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.15535491341417876, 0.0, 0.0, 0.0, 0.0, 0.0], [-0.003446015642988635, -0.005307580848959444, 0.0, 0.0, 0.0, 0.0], [-0.006065890399197479, -0.0008816852533741973, -0.07919758771632532, 0.0, 0.0, 0.0], [0.10021877770433976, 0.03728772689407206, 0.06630719588871085, -0.9215268339964985, 0.0, 0.0], [0.5139607715456024, -0.07616672773356012, 0.008322268436310922, 4.861143477021583e-05, -0.2546441415322784, 0.0]]", + "j_cov1diag": "[5.638523014143955e-09, 2.102294062465564e-08, 2.2893252591508588e-06, 1.1875064144009053e-05, 1.2736494898291508e-05, 4.858842932603048e-06]", + "j_eleerr": "[141.5419357264685, 141.9158562479131, 241.57575722772717, 9.265646804340223, 0.23206507516984112, 3.1464808767421144]", + "j_iastuse": "[1, 2, 3, 4, 10, 15, 31, 52, 511, 704, 16, 65, 88, 107, 7, 87]", + "jdeperr": 2449630.4, + "lastobs": "2024-09-08T00:00:00", + "met1": 8.2847e-12, + "met2": 9.3284e-08, + "met3": 5.8167e-08, + "met4": 6.0434e-08, + "met5": 5.9271e-08, + "nappar": 27, + "nsing": 2, + "nuse": 2915, + "orbcomputer": "L.H. Wasserman ", + "orbdate": "2024-09-17T00:00:00", + "orbqual": 7.03, + "qsky10": 0.035, + "qskyimp": 0.035, + "qskynext": 0.032, + "qualimp": 0, + "ref": "O840866", + "resmax": 2.25, + "rmso": 0.38, + "tauc": 0, + "timefac": 0.01 + } +} diff --git a/astroquery/astorbdb/tests/data/lixiaohua_taxonomies.dat b/astroquery/astorbdb/tests/data/lixiaohua_taxonomies.dat new file mode 100644 index 0000000000..1c0465a877 --- /dev/null +++ b/astroquery/astorbdb/tests/data/lixiaohua_taxonomies.dat @@ -0,0 +1,4 @@ +{ + "identifier": "3556", + "taxonomies": [] +} diff --git a/astroquery/astorbdb/tests/setup_package.py b/astroquery/astorbdb/tests/setup_package.py new file mode 100644 index 0000000000..8981448a32 --- /dev/null +++ b/astroquery/astorbdb/tests/setup_package.py @@ -0,0 +1,11 @@ +# Licensed under a 3-clause BSD style license - see LICENSE.rst + + +import os + + +def get_package_data(): + paths = [os.path.join('data', '*.dat')] # etc, add other extensions + + return {'astroquery.astorbdb.tests': paths, + 'astroquery.solarsystem.astorbdb': paths} diff --git a/astroquery/astorbdb/tests/test_astorbdb.py b/astroquery/astorbdb/tests/test_astorbdb.py new file mode 100644 index 0000000000..d0e1e2fd6c --- /dev/null +++ b/astroquery/astorbdb/tests/test_astorbdb.py @@ -0,0 +1,282 @@ +# Licensed under a 3-clause BSD style license - see LICENSE.rst + +import pytest +import os + +from astroquery.utils.mocks import MockResponse +import astropy.units as u +from astropy.tests.helper import assert_quantity_allclose +from astropy.time import Time +from .. import AstInfo, AstInfoClass + +# files in data/ for different query types +DATA_FILES = {'Apophis': + {'designations': 'apophis_desig.dat', + 'elements': 'apophis_elements.dat', + 'orbit': 'apophis_orbit.dat', + 'albedos': 'apophis_albedos.dat', + 'colors': 'apophis_colors.dat', + 'taxonomies': 'apophis_taxonomies.dat', + 'lightcurves': 'apophis_lightcurves.dat', + 'dynamical-family': 'apophis_dynfamily.dat', + 'escape-routes': 'apophis_escaperoutes.dat' + }, + 'Beagle': + {'designations': 'beagle_desig.dat', + 'elements': 'beagle_elements.dat', + 'orbit': 'beagle_orbit.dat', + 'albedos': 'beagle_albedos.dat', + 'colors': 'beagle_colors.dat', + 'taxonomies': 'beagle_taxonomies.dat', + 'lightcurves': 'beagle_lightcurves.dat', + 'dynamical-family': 'beagle_dynfamily.dat', + 'escape-routes': 'beagle_escaperoutes.dat' + }, + '3556': + {'designations': 'lixiaohua_desig.dat', + 'elements': 'lixiaohua_elements.dat', + 'orbit': 'lixiaohua_orbit.dat', + 'albedos': 'lixiaohua_albedos.dat', + 'colors': 'lixiaohua_colors.dat', + 'taxonomies': 'lixiaohua_taxonomies.dat', + 'lightcurves': 'lixiaohua_lightcurves.dat', + 'dynamical-family': 'lixiaohua_dynfamily.dat', + 'escape-routes': 'lixiaohua_escaperoutes.dat' + }, + 'Ceres': + {'designations': 'ceres_missing_value_desig.dat', + 'elements': 'ceres_missing_value_elements.dat', + 'orbit': 'ceres_missing_value_orbit.dat', + 'albedos': 'ceres_missing_value_albedos.dat', + 'colors': 'ceres_missing_value_colors.dat', + 'taxonomies': 'ceres_missing_value_taxonomies.dat', + 'lightcurves': 'ceres_missing_value_lightcurves.dat', + 'dynamical-family': 'ceres_missing_value_dynfamily.dat', + 'escape-routes': 'ceres_missing_value_escaperoutes.dat' + } + } + +ALBEDOS = {'Apophis': None, + 'Beagle': 0.065, + '3556': 0.042, + } + +COLORS = {'Apophis': None, + 'Beagle': 0.431, + '3556': None, + } + +DESIGS = {'Apophis': 'Apophis', + 'Beagle': 'Beagle', + '3556': 'Lixiaohua', + } + +DYNFAMILY = {'Apophis': None, + 'Beagle': 'Themis', + '3556': 'Lixiaohua', + } + +ELEMENTS = {'Apophis': 0.7460876463977817 * u.au, + 'Beagle': 2.741852545719269 * u.au, + '3556': 2.493684653191043 * u.au, + } + +ESCAPEROUTES = {'Apophis': 0.87852, + 'Beagle': None, + '3556': None, + } + +LIGHTCURVES = {'Apophis': 30.56 * u.h, + 'Beagle': 7.035 * u.h, + '3556': None, + } + +ORBITS = {'Apophis': 18.068 * u.yr, + 'Beagle': 116.943 * u.yr, + '3556': 59.856 * u.yr, + } + +TAXONOMIES = {'Apophis': 'Sq', + 'Beagle': 'C', + '3556': None, + } + + +def data_path(filename): + data_dir = os.path.join(os.path.dirname(__file__), 'data') + return os.path.join(data_dir, filename) + + +# monkeypatch replacement request function +def nonremote_request(self, method_name, **kwargs): + + path_elements = kwargs['url'].split('/') + + query_type = path_elements[-1] + + if query_type in ['designations', 'elements', 'orbit']: + object_name = path_elements[-2] + else: + object_name = path_elements[-3] + + with open(data_path(DATA_FILES[object_name][query_type]), 'rb') as f: + if query_type in ['designations', 'elements', 'orbit']: + response = MockResponse(content=f.read(), url=self.URL + object_name + '/' + query_type) + else: + response = MockResponse(content=f.read(), url=self.URL + object_name + '/data/' + query_type) + + return response + + +# use a pytest fixture to create a dummy 'requests.get' function, +# that mocks(monkeypatches) the actual 'requests.get' function: +@pytest.fixture +def patch_request(request): + mp = request.getfixturevalue('monkeypatch') + + mp.setattr(AstInfoClass, '_request', + nonremote_request) + return mp + + +# --------------------------------- actual test functions + +def test_object_queries(patch_request): + for objectname in ALBEDOS.keys(): + + astinfo = AstInfo.albedos(objectname) + if astinfo != []: + assert_quantity_allclose(astinfo[0]['albedo'], + ALBEDOS[objectname]) + + astinfo = AstInfo.colors(objectname) + if astinfo != []: + assert_quantity_allclose(astinfo[0]['color'], + COLORS[objectname]) + + astinfo = AstInfo.designations(objectname) + if astinfo != []: + assert astinfo['primary_designation'] == DESIGS[objectname] + + astinfo = AstInfo.dynamical_family(objectname) + if astinfo != []: + assert astinfo[0]['family'] == DYNFAMILY[objectname] + + astinfo = AstInfo.elements(objectname) + if astinfo != []: + assert_quantity_allclose(astinfo['q'], + ELEMENTS[objectname]) + + astinfo = AstInfo.escape_routes(objectname) + if astinfo != []: + assert_quantity_allclose(astinfo[0]['p_nu6_complex'], + ESCAPEROUTES[objectname]) + + astinfo = AstInfo.lightcurves(objectname) + if astinfo != []: + assert_quantity_allclose(astinfo[0]['period'], + LIGHTCURVES[objectname]) + + astinfo = AstInfo.orbit(objectname) + if astinfo != []: + assert_quantity_allclose(astinfo['arc'], + ORBITS[objectname]) + + astinfo = AstInfo.taxonomies(objectname) + if astinfo != []: + assert astinfo[0]['taxonomy'] == TAXONOMIES[objectname] + + astinfo = AstInfo.all_astinfo(objectname) + if astinfo != []: + assert astinfo['designations']['primary_designation'] == DESIGS[objectname] + + +def test_missing_value(patch_request): + """test whether a missing value causes an error""" + + astinfo = AstInfo.albedos('Ceres') + assert astinfo[0]['albedo'] is None + + astinfo = AstInfo.colors('Ceres') + assert astinfo[0]['color'] is None + + astinfo = AstInfo.designations('Ceres') + assert astinfo['name'] is None + + astinfo = AstInfo.dynamical_family('Ceres') + assert astinfo is None + + astinfo = AstInfo.elements('Ceres') + assert astinfo['a'] is None + + astinfo = AstInfo.escape_routes('Ceres') + assert astinfo is None + + astinfo = AstInfo.lightcurves('Ceres') + assert astinfo[0]['period'] is None + + astinfo = AstInfo.orbit('Ceres') + assert astinfo['ephname'] is None + + astinfo = AstInfo.taxonomies('Ceres') + assert astinfo[0]['taxonomy'] is None + + +def test_quantities(patch_request): + """Make sure query returns quantities""" + + astinfo = AstInfo.albedos('Beagle') + assert isinstance(astinfo[0]['diameter'], u.Quantity) + assert astinfo[0]['diameter'].unit == u.km + + astinfo = AstInfo.colors('Beagle') + assert isinstance(astinfo[0]['jd'], Time) + + astinfo = AstInfo.elements('Beagle') + assert isinstance(astinfo['a'], u.Quantity) + assert astinfo['a'].unit == u.au + + astinfo = AstInfo.escape_routes('Apophis') + assert isinstance(astinfo[0]['epoch'], Time) + + astinfo = AstInfo.lightcurves('Beagle') + assert isinstance(astinfo[0]['period'], u.Quantity) + assert astinfo[0]['period'].unit == u.h + + astinfo = AstInfo.orbit('Beagle') + assert isinstance(astinfo['arc'], u.Quantity) + assert astinfo['arc'].unit == u.yr + + +def test_urls(patch_request): + """Make sure URL query request returns URLs""" + + astinfo = AstInfo.albedos('Beagle', get_uri=True) + assert astinfo[0]['query_uri'] == 'https://asteroid.lowell.edu/api/asteroids/Beagle/data/albedos' + + astinfo = AstInfo.colors('Beagle', get_uri=True) + assert astinfo[0]['query_uri'] == 'https://asteroid.lowell.edu/api/asteroids/Beagle/data/colors' + + astinfo = AstInfo.designations('Beagle', get_uri=True) + assert astinfo['query_uri'] == 'https://asteroid.lowell.edu/api/asteroids/Beagle/designations' + + astinfo = AstInfo.dynamical_family('Beagle', get_uri=True) + assert astinfo[0]['query_uri'] == 'https://asteroid.lowell.edu/api/asteroids/Beagle/data/dynamical-family' + + astinfo = AstInfo.elements('Beagle', get_uri=True) + assert astinfo['query_uri'] == 'https://asteroid.lowell.edu/api/asteroids/Beagle/elements' + + astinfo = AstInfo.escape_routes('Beagle', get_uri=True) + assert astinfo[0]['query_uri'] == 'https://asteroid.lowell.edu/api/asteroids/Beagle/data/escape-routes' + + astinfo = AstInfo.lightcurves('Beagle', get_uri=True) + assert astinfo[0]['query_uri'] == 'https://asteroid.lowell.edu/api/asteroids/Beagle/data/lightcurves' + + astinfo = AstInfo.orbit('Beagle', get_uri=True) + assert astinfo['query_uri'] == 'https://asteroid.lowell.edu/api/asteroids/Beagle/orbit' + + astinfo = AstInfo.taxonomies('Beagle', get_uri=True) + assert astinfo[0]['query_uri'] == 'https://asteroid.lowell.edu/api/asteroids/Beagle/data/taxonomies' + + astinfo = AstInfo.all_astinfo('Beagle', get_uri=True) + assert astinfo['query_uri']['albedos'] == 'https://asteroid.lowell.edu/api/asteroids/Beagle/data/albedos' diff --git a/astroquery/astorbdb/tests/test_astorbdb_remote.py b/astroquery/astorbdb/tests/test_astorbdb_remote.py new file mode 100644 index 0000000000..06bc74d371 --- /dev/null +++ b/astroquery/astorbdb/tests/test_astorbdb_remote.py @@ -0,0 +1,56 @@ +# Licensed under a 3-clause BSD style license - see LICENSE.rst + + +# performs similar tests as test_module.py, but performs +# the actual HTTP request rather than monkeypatching them. +# should be disabled or enabled at will - use the +# remote_data decorator from astropy: + +import pytest +import astropy.units as u + +from .. import AstInfo + + +@pytest.mark.remote_data +class TestAstInfoClass: + + def test_albedos(self): + astinfo = AstInfo.albedos('656') + assert astinfo[0]['albedo'] == 0.065 + + def test_colors(self): + astinfo = AstInfo.colors('656') + assert astinfo[0]['color'] == 0.431 + + def test_designations(self): + astinfo = AstInfo.designations('656') + assert astinfo['name'] == 'Beagle' + + def test_dynamical_family(self): + astinfo = AstInfo.dynamical_family('656') + assert astinfo[0]['family'] == 'Themis' + + def test_elements(self): + astinfo = AstInfo.elements('656') + assert astinfo['a'] == 3.156090767861024 * u.au + + def test_escape_routes(self): + astinfo = AstInfo.escape_routes('3200') + assert astinfo[0]['p_nu6_complex'] == 0.64189 + + def test_lightcurves(self): + astinfo = AstInfo.lightcurves('656') + assert astinfo[0]['period'] == 7.035 * u.h + + def test_orbit(self): + astinfo = AstInfo.orbit('656') + assert astinfo['arc'] == 117.17 * u.yr + + def test_taxonomies(self): + astinfo = AstInfo.taxonomies('656') + assert astinfo[0]['taxonomy'] == 'C' + + def test_all_astinfo(self): + astinfo = AstInfo.all_astinfo('656') + assert astinfo['designations']['name'] == 'Beagle' diff --git a/astroquery/solarsystem/astorbdb/__init__.py b/astroquery/solarsystem/astorbdb/__init__.py new file mode 100644 index 0000000000..b8a363ad6c --- /dev/null +++ b/astroquery/solarsystem/astorbdb/__init__.py @@ -0,0 +1,13 @@ +# Licensed under a 3-clause BSD style license - see LICENSE.rst + +""" +astroquery.solarsystem.astorbdb +------------------------------- + +a collection of data services provided by Lowell Observatory's astorbDB +""" + +from ...astorbdb import AstInfo, AstInfoClass + + +__all__ = ["AstInfo", "AstInfoClass"] diff --git a/docs/astorbdb/astorbdb.rst b/docs/astorbdb/astorbdb.rst new file mode 100644 index 0000000000..97fcffaa49 --- /dev/null +++ b/docs/astorbdb/astorbdb.rst @@ -0,0 +1,247 @@ +.. _astroquery.astorbdb: + +******************************************************************************* +Lowell AstorbDB Queries (`astroquery.astorbdb`/astroquery.solarsystem.astorbdb) +******************************************************************************* + +Overview +======== + + +The :class:`~astroquery.astorbdb.AstInfoClass` class provides +an interface to the `Asteroid Information +`_ (AstInfo) tool provided as part of +the Lowell Minor Planet Services +which utilize the astorbDB database maintained by +`Lowell Observatory `_. + +AstInfo provides detailed information on a specific known small body, +including lists of alternate designations, orbit information, and +available published physical and dynamical properties. + +This module enables the query of these information for an individual +object into a formatted dictionary structure +using `~astropy.units` objects where possible. This module +uses REST interfaces (currently undocumented) used to retrieve data +displayed on the Lowell `Asteroid Information `_ +page. + +Because of its relevance to Solar System science, this service can +also be accessed from the topical submodule +`astroquery.solarsystem.astorbdb`. The functionality of that service is +identical to the one presented here. + +Examples +======== + +There are several different categories of information that can be obtained +using an AstInfo query: + +Albedo data +----------- + +This query returns a list of dictionaries of albedo-related data and associated +metadata for a specified object from different published sources. + +.. doctest-remote-data:: + + >>> from astroquery.astorbdb import AstInfo + >>> albedos = AstInfo.albedos('656') + >>> print(albedos) # doctest: +IGNORE_OUTPUT + [{'albedo': 0.065, 'albedo_error_lower': -0.002, 'albedo_error_upper': 0.002, 'citation_bibcode': '2011PASJ...63.1117U', 'citation_url': 'https://darts.isas.jaxa.jp/astro/akari/catalogue/AcuA.html', 'count_bands_detection': 2, 'diameter': , 'diameter_error_lower': , 'diameter_error_upper': , 'eta': 0.82, 'eta_error_lower': None, 'eta_error_upper': None, 'measurement_techniques': ['Mid IR photometry'], 'observations_total': 11, 'survey_name': 'Usui et al. (2011)'}, {'albedo': 0.0625, 'albedo_error_lower': -0.015, 'albedo_error_upper': 0.015, 'citation_bibcode': '2004PDSS...12.....T', 'citation_url': 'http://sbn.psi.edu/pds/asteroid/IRAS_A_FPA_3_RDR_IMPS_V6_0.zip', 'count_bands_detection': 3, 'diameter': , 'diameter_error_lower': , 'diameter_error_upper': , 'eta': 0.756, 'eta_error_lower': -1, 'eta_error_upper': 1, 'measurement_techniques': ['Mid IR photometry'], 'observations_total': 18, 'survey_name': 'Infrared Astronomical Satellite (IRAS)'}, {'albedo': 0.075, 'albedo_error_lower': -0.011, 'albedo_error_upper': 0.011, 'citation_bibcode': '2019PDSS..251.....M', 'citation_url': 'http://sbnarchive.psi.edu/pds4/non_mission/neowise_diameters_albedos_V2_0.zip', 'count_bands_detection': 4, 'diameter': , 'diameter_error_lower': , 'diameter_error_upper': , 'eta': 1.033, 'eta_error_lower': -0.021, 'eta_error_upper': 0.021, 'measurement_techniques': ['Mid IR photometry'], 'observations_total': 58, 'survey_name': 'NEOWISE'}, {'albedo': 0.045, 'albedo_error_lower': -0.005, 'albedo_error_upper': 0.005, 'citation_bibcode': '2019PDSS..251.....M', 'citation_url': 'http://sbnarchive.psi.edu/pds4/non_mission/neowise_diameters_albedos_V2_0.zip', 'count_bands_detection': 4, 'diameter': , 'diameter_error_lower': , 'diameter_error_upper': , 'eta': 1.458, 'eta_error_lower': -0.025, 'eta_error_upper': 0.025, 'measurement_techniques': ['Mid IR photometry'], 'observations_total': 46, 'survey_name': 'NEOWISE'}, {'albedo': 0.092, 'albedo_error_lower': -0.041, 'albedo_error_upper': 0.041, 'citation_bibcode': '2019PDSS..251.....M', 'citation_url': 'http://sbnarchive.psi.edu/pds4/non_mission/neowise_diameters_albedos_V2_0.zip', 'count_bands_detection': 2, 'diameter': , 'diameter_error_lower': , 'diameter_error_upper': , 'eta': 0.95, 'eta_error_lower': -0.2, 'eta_error_upper': 0.2, 'measurement_techniques': ['Mid IR photometry'], 'observations_total': 16, 'survey_name': 'NEOWISE'}, {'albedo': 0.069, 'albedo_error_lower': -0.034, 'albedo_error_upper': 0.034, 'citation_bibcode': '2019PDSS..251.....M', 'citation_url': 'http://sbnarchive.psi.edu/pds4/non_mission/neowise_diameters_albedos_V2_0.zip', 'count_bands_detection': 2, 'diameter': , 'diameter_error_lower': , 'diameter_error_upper': , 'eta': 0.95, 'eta_error_lower': -0.2, 'eta_error_upper': 0.2, 'measurement_techniques': ['Mid IR photometry'], 'observations_total': 26, 'survey_name': 'NEOWISE'}, {'albedo': 0.083, 'albedo_error_lower': -0.054, 'albedo_error_upper': 0.054, 'citation_bibcode': '2019PDSS..251.....M', 'citation_url': 'http://sbnarchive.psi.edu/pds4/non_mission/neowise_diameters_albedos_V2_0.zip', 'count_bands_detection': 2, 'diameter': , 'diameter_error_lower': , 'diameter_error_upper': , 'eta': 0.95, 'eta_error_lower': -0.2, 'eta_error_upper': 0.2, 'measurement_techniques': ['Mid IR photometry'], 'observations_total': 22, 'survey_name': 'NEOWISE'}] + +Color data +---------- + +This query returns a list of dictionaries of color data and associated +metadata for a specified object from different published sources. + +.. doctest-remote-data:: + + >>> from astroquery.astorbdb import AstInfo + >>> colors = AstInfo.colors('656') + >>> print(colors) # doctest: +IGNORE_OUTPUT + [{'citation_bibcode': '2010PDSS..125.....S', 'citation_url': 'http://sbnarchive.psi.edu/pds3/non_mission/EAR_A_I0054_I0055_5_2MASS_V2_0.zip', 'color': 0.431, 'color_error': 0.035, 'jd':