From c07fa843cd1c8385e164b2de78872efddf23f80e Mon Sep 17 00:00:00 2001 From: Steve Pothier Date: Tue, 14 Apr 2020 10:50:19 -0700 Subject: [PATCH 01/13] ads search tests pass --- astroquery/noirlab/core.py | 104 ++++++++++++- astroquery/noirlab/tests/expected.py | 31 ++++ .../noirlab/tests/test_noirlab_remote.py | 143 +++++++++++++++++- 3 files changed, 267 insertions(+), 11 deletions(-) diff --git a/astroquery/noirlab/core.py b/astroquery/noirlab/core.py index b3d02709b0..75ecfc676d 100644 --- a/astroquery/noirlab/core.py +++ b/astroquery/noirlab/core.py @@ -3,12 +3,13 @@ This does DB access through web-services. """ - +import json import astropy.table from ..query import BaseQuery from ..utils import async_to_sync from ..utils.class_or_instance import class_or_instance from . import conf +import requests __all__ = ['Noirlab', 'NoirlabClass'] # specifies what to import @@ -19,8 +20,6 @@ class NoirlabClass(BaseQuery): TIMEOUT = conf.timeout NAT_URL = conf.server - ADS_URL = f'{NAT_URL}/api/adv_search/fasearch' - SIA_URL = f'{NAT_URL}/api/sia/voimg' def __init__(self, which='file'): """Return object used for searching the NOIRLab Archive. @@ -32,12 +31,18 @@ def __init__(self, which='file'): """ self._api_version = None + self.adsurl = f'{self.NAT_URL}/api/adv_search' + if which == 'hdu': - self.url = f'{self.NAT_URL}/api/sia/vohdu' - elif which == 'file': - self.url = f'{self.NAT_URL}/api/sia/voimg' + self.siaurl = f'{self.NAT_URL}/api/sia/vohdu' + self.adss_url = f'{self.adsurl}/hasearch' + self.adsc_url = f'{self.adsurl}/core_hdu_fields' + self.adsa_url = f'{self.adsurl}/aux_hdu_fields' else: - self.url = f'{self.NAT_URL}/api/sia/voimg' + self.siaurl = f'{self.NAT_URL}/api/sia/voimg' + self.adss_url = f'{self.adsurl}/fasearch' + self.adsc_url = f'{self.adsurl}/core_file_fields' + self.adsa_url = f'{self.adsurl}/aux_file_fields' super().__init__() @@ -66,6 +71,15 @@ def _validate_version(self): f'{self.api_version} from the API.') raise Exception(msg) + def service_metadata(self, cache=True): + """Denotes a Metadata Query: no images are requested; only metadata + should be returned. This feature is described in more detail in: + http://www.ivoa.net/documents/PR/DAL/PR-SIA-1.0-20090521.html#mdquery + """ + url = f'{self.siaurl}?FORMAT=METADATA&format=json' + response = self._request('GET', url, timeout=self.TIMEOUT, cache=cache) + return response.json()[0] + @class_or_instance def query_region(self, coordinate, radius=0.1, cache=True): """Query for NOIRLab observations by region of the sky. @@ -90,7 +104,7 @@ def query_region(self, coordinate, radius=0.1, cache=True): """ self._validate_version() ra, dec = coordinate.to_string('decimal').split() - url = f'{self.url}?POS={ra},{dec}&SIZE={radius}&format=json' + url = f'{self.siaurl}?POS={ra},{dec}&SIZE={radius}&format=json' response = self._request('GET', url, timeout=self.TIMEOUT, cache=cache) @@ -98,4 +112,78 @@ def query_region(self, coordinate, radius=0.1, cache=True): return astropy.table.Table(data=response.json()) + def core_fields(self, cache=True): + """List the available CORE fields. CORE fields are faster to search + than AUX fields..""" + response = self._request('GET', self.adsc_url, + timeout=self.TIMEOUT, + cache=cache) + response.raise_for_status() + return response.json() + + + def aux_fields(self, instrument, proctype, cache=True): + """List the available AUX fields. AUX fields are ANY fields in the + Archive FITS files that are not core DB fields. These are generally + common to a single Instrument, Proctype combination. AUX fields are + slower to search than CORE fields. """ + url = f'{self.adsa_url}/{instrument}/{proctype}/' + response = self._request('GET', url, timeout=self.TIMEOUT, cache=cache) + response.raise_for_status() + return response.json() + + def categoricals(self, cache=True): + """List the currently acceptable values for each 'categorical field' + associated with Archive files. A 'categorical field' is one in + which the values are restricted to a specific set. The specific + set may grow over time, but not often. The categorical fields are: + collection, instrument, obs_mode, proc_type, prod_type, site, survey, + telescope. + """ + url = f'{self.adsurl}/cat_lists/?format=json' + response = self._request('GET', url, timeout=self.TIMEOUT, cache=cache) + response.raise_for_status() + return response.json() + + #! @class_or_instance + #! def _query_ads(self, jdata, limit=1000): + #! print(f'DBG-0: ADS jdata={jdata}') + #! adsurl = f'{self.adsurl}/?limit={limit}' + #! print(f'DBG-0: adsurl = {adsurl}') + #! # Following fails + #! # #! response = self._request('POST',adsurl, data=json.dumps(jdata)) + #! response = requests.post(adsurl, json=jdata) + #! print(f'DBG-0: ADS response={response}') + #! print(f'DBG-0: ADS response.content={response.content}') + #! print(f'DBG-0: ADS response.json()={response.json()}') + #! return astropy.table.Table(data=response.json()) + + @class_or_instance + def query_metadata(self, qspec, limit=1000, cache=True): + self._validate_version() + url = f'{self.adss_url}/?limit={limit}' + + if qspec is None: + jdata = {"outfields": ["md5sum", ], "search": []} + else: + jdata = qspec + + print(f'DBG-0: query_metadata.url = {url}') + # headers = {'accept': 'application/json'} + # headers = {'Content-Type': 'application/json'} + + # Following fails: + # #!response = self._request('POST', url, json=jdata) + + response = requests.post(url, + timeout=self.TIMEOUT, + json=jdata) + response.raise_for_status() + # #!print(f'DBG-0: ADS response={response}') + # #!print(f'DBG-0: ADS response.content={response.content}') + # #!print(f'DBG-0: ADS response.json()={response.json()}') + return astropy.table.Table(rows=response.json()) + #return response.json() #@@@ Should return table + + Noirlab = NoirlabClass() diff --git a/astroquery/noirlab/tests/expected.py b/astroquery/noirlab/tests/expected.py index d9fb90e7d1..bb6bc0cc6f 100644 --- a/astroquery/noirlab/tests/expected.py +++ b/astroquery/noirlab/tests/expected.py @@ -11,3 +11,34 @@ '7977c92b09724fb331b19263819962e4', 'f990925c8d99a66f642e4463f1dde7f2', '09535b88fc700227bb47979a670a7d85'} + +service_metadata = {'archive_filename': 'string', + 'date_obs': 'string', + 'dec': 'float', + 'exposure': 'float', + 'filesize': 'int', + 'instrument': 'string', + 'md5sum': 'string', + 'original_filename': 'string', + 'pi': 'string', + 'prop_id': 'string', + 'ra': 'float', + 'release_date': 'string', + 'telescope': 'string', + 'updated': 'string'} + +aux_file_fields = {'AIRMASS': 'str', 'AOS': 'str', 'ASTIG1': 'str', 'ASTIG2': 'str', 'ATTNUM': 'str', 'AVSIG': 'str', 'AVSKY': 'str', 'AZ': 'str', 'BAND': 'str', 'BCAM': 'str', 'BCAMAX': 'str', 'BCAMAY': 'str', 'BCAMAZ': 'str', 'BCAMDX': 'str', 'BCAMDY': 'str', 'BFCFIL': 'str', 'BUNIT': 'str', 'CAMSHUT': 'str', 'CAMSYM': 'str', 'CCDBIN1': 'str', 'CCDBIN2': 'str', 'CCDSEC': 'str', 'CCDSECA': 'str', 'CCDSECB': 'str', 'CENTDEC': 'str', 'CENTRA': 'str', 'CONSTVER': 'str', 'CORN1DEC': 'str', 'CORN1RA': 'str', 'CORN2DEC': 'str', 'CORN2RA': 'str', 'CORN3DEC': 'str', 'CORN3RA': 'str', 'CORN4DEC': 'str', 'CORN4RA': 'str', 'CORNDEC1': 'str', 'CORNDEC2': 'str', 'CORNDEC3': 'str', 'CORNDEC4': 'str', 'CORNRA1': 'str', 'CORNRA2': 'str', 'CORNRA3': 'str', 'CORNRA4': 'str', 'CROSSRA0': 'str', 'DARKTIME': 'str', 'DATASEC': 'str', 'DATASECA': 'str', 'DATASECB': 'str', 'DATE': 'str', 'DATE-OBS': 'str', 'DEC': 'str', 'DES_EXT': 'str', 'DESNCRAY': 'str', 'DESNSTRK': 'str', 'DESREL': 'str', 'DETSIZE': 'str', 'DHEFIRM': 'str', 'DHEINF': 'str', 'DIMM2SEE': 'str', 'DIMMSEE': 'str', 'DODX': 'str', 'DODY': 'str', 'DODZ': 'str', 'DOMEAZ': 'str', 'DOMEFLOR': 'str', 'DOMEHIGH': 'str', 'DOMELOW': 'str', 'DONUTFN1': 'str', 'DONUTFN2': 'str', 'DONUTFN3': 'str', 'DONUTFN4': 'str', 'DONUTFS1': 'str', 'DONUTFS2': 'str', 'DONUTFS3': 'str', 'DONUTFS4': 'str', 'DOXT': 'str', 'DOYT': 'str', 'DTACCOUN': 'str', 'DTACQNAM': 'str', 'DTACQUIS': 'str', 'DTCALDAT': 'str', 'DTCOPYRI': 'str', 'DTINSTRU': 'str', 'DTNSANAM': 'str', 'DTOBSERV': 'str', 'DTPI': 'str', 'DTPIAFFL': 'str', 'DTPROPID': 'str', 'DTQUEUE': 'str', 'DT_RTNAM': 'str', 'DTSITE': 'str', 'DTSTATUS': 'str', 'DTTELESC': 'str', 'DTTITLE': 'str', 'DTUTC': 'str', 'ELLIPTIC': 'str', 'EQUINOX': 'str', 'ERRORS': 'str', 'EUPSPROD': 'str', 'EUPSVER': 'str', 'EXCLUDED': 'str', 'EXPDUR': 'str', 'EXPNUM': 'str', 'EXPREQ': 'str', 'EXPTIME': 'str', 'EXTVER': 'str', 'FADX': 'str', 'FADY': 'str', 'FADZ': 'str', 'FAXT': 'str', 'FAYT': 'str', 'FILENAME': 'str', 'FILTER': 'str', 'FILTPOS': 'str', 'FRGSCALE': 'str', 'FWHM': 'str', 'FZALGOR': 'str', 'FZDTHRSD': 'str', 'FZQMETHD': 'str', 'FZQVALUE': 'str', 'G-CCDNUM': 'str', 'G-FEEDBK': 'str', 'G-FLXVAR': 'str', 'G-LATENC': 'str', 'G-MAXX': 'str', 'G-MAXY': 'str', 'G-MEANX': 'str', 'G-MEANX2': 'str', 'G-MEANXY': 'str', 'G-MEANY': 'str', 'G-MEANY2': 'str', 'G-MODE': 'str', 'G-SEEING': 'str', 'GSKYHOT': 'str', 'GSKYPHOT': 'str', 'GSKYVAR': 'str', 'G-TRANSP': 'str', 'GUIDER': 'str', 'HA': 'str', 'HDRVER': 'str', 'HEX': 'str', 'HUMIDITY': 'str', 'INSTANCE': 'str', 'INSTRUME': 'str', 'IRAF-TLM': 'str', 'LINCFIL': 'str', 'LSKYHOT': 'str', 'LSKYPHOT': 'str', 'LSKYPOW': 'str', 'LSKYVAR': 'str', 'LST': 'str', 'LUTVER': 'str', 'LWTRTEMP': 'str', 'MAGZERO': 'str', 'MAGZP': 'str', 'MAGZPT': 'str', 'MAGZUNC': 'str', 'MAIRTEMP': 'str', 'MANIFEST': 'str', 'MASS2': 'str', 'MJD-END': 'str', 'MJD-OBS': 'str', 'MOONANGL': 'str', 'MSURTEMP': 'str', 'MULTIEXP': 'str', 'MULTIFOC': 'str', 'MULTIID': 'str', 'MULTIROW': 'str', 'MULTITOT': 'str', 'NBLEED': 'str', 'NDONUTS': 'str', 'NEXTEND': 'str', 'NITE': 'str', 'NOTE': 'str', 'NPHTMTCH': 'str', 'NSATPIX': 'str', 'NUM': 'str', 'OBJECT': 'str', 'OBS-ELEV': 'str', 'OBSERVAT': 'str', 'OBSERVER': 'str', 'OBSID': 'str', 'OBS-LAT': 'str', 'OBS-LONG': 'str', 'OBSTYPE': 'str', 'ODATEOBS': 'str', 'OPENSHUT': 'str', 'ORIGIN': 'str', 'OUTTEMP': 'str', 'PHOTFLAG': 'str', 'PHOTREF': 'str', 'PIPELINE': 'str', 'PIXSCAL1': 'str', 'PIXSCAL2': 'str', 'PLARVER': 'str', 'PLDNAME': 'str', 'PLDSID': 'str', 'PLFNAME': 'str', 'PLPROCID': 'str', 'PLQNAME': 'str', 'PLQUEUE': 'str', 'PLVER': 'str', 'PME-TEMP': 'str', 'PMN-TEMP': 'str', 'PMOSTEMP': 'str', 'PMS-TEMP': 'str', 'PMW-TEMP': 'str', 'PRESSURE': 'str', 'PROCTYPE': 'str', 'PRODTYPE': 'str', 'PROGRAM': 'str', 'PROPID': 'str', 'PROPOSER': 'str', 'PUPILAMP': 'str', 'PUPILMAX': 'str', 'PUPILSKY': 'str', 'PUPMAX': 'str', 'PV1_6': 'str', 'PV2_4': 'str', 'RA': 'str', 'RA_CENT': 'str', 'RACMAX': 'str', 'RACMIN': 'str', 'RADECSYS': 'str', 'RADESYS': 'str', 'RADIUS': 'str', 'RADSTD': 'str', 'RECNO': 'str', 'REQNUM': 'str', 'RMCOUNT': 'str', 'SB_ACCOU': 'str', 'SB_DIR1': 'str', 'SB_DIR2': 'str', 'SB_DIR3': 'str', 'SB_HOST': 'str', 'SB_ID': 'str', 'SB_LOCAL': 'str', 'SB_NAME': 'str', 'SB_RECNO': 'str', 'SB_RTNAM': 'str', 'SB_SITE': 'str', 'SCAMPCHI': 'str', 'SCAMPFLG': 'str', 'SCAMPNUM': 'str', 'SCAMPREF': 'str', 'SEQID': 'str', 'SEQNUM': 'str', 'SEQTOT': 'str', 'SEQTYPE': 'str', 'SISPIVER': 'str', 'SKYBRITE': 'str', 'SKYORDER': 'str', 'SKYPC00': 'str', 'SKYPC01': 'str', 'SKYPC02': 'str', 'SKYPC03': 'str', 'SKYSIGMA': 'str', 'SKYSTAT': 'str', 'SKYSUB': 'str', 'SKYSUB01': 'str', 'SKYSUB10': 'str', 'SKYSUBP': 'str', 'SKYUPDAT': 'str', 'SLOT01': 'str', 'SLOT03': 'str', 'SURVEYID': 'str', 'TELDEC': 'str', 'TELEQUIN': 'str', 'TELESCOP': 'str', 'TELFOCUS': 'str', 'TELRA': 'str', 'TELSTAT': 'str', 'TILING': 'str', 'TIME-OBS': 'str', 'TIMESYS': 'str', 'TRACKING': 'str', 'UNITNAME': 'str', 'UPTRTEMP': 'str', 'UTE-TEMP': 'str', 'UTN-TEMP': 'str', 'UTS-TEMP': 'str', 'UTW-TEMP': 'str', 'VALIDA': 'str', 'VALIDB': 'str', 'VSUB': 'str', 'WCSCAL': 'str', 'WINDDIR': 'str', 'WINDSPD': 'str', 'XTALKFIL': 'str', 'ZD': 'str', 'ZPDELDEC': 'str', 'ZPDELRA': 'str'} + +core_file_fields = {'archive_filename': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'caldat': ['datetime64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.'], 'date_obs_max': ['datetime64', 'val_overlap', 'Match of value as range against DB value range type.'], 'date_obs_min': ['datetime64', 'val_overlap', 'Match of value as range against DB value range type.'], 'dec_max': ['np.float64', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'dec_min': ['np.float64', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'depth': ['np.float64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.'], 'exposure': ['np.float64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.'], 'filesize': ['np.int64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.'], 'ifilter': ['category', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'instrument': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'md5sum': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'obs_mode': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'obs_type': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'original_filename': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'proc_type': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'prod_type': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'proposal': ['category', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'ra_max': ['np.float64', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'ra_min': ['np.float64', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'release_date': ['datetime64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.'], 'seeing': ['np.float64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.'], 'site': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'survey': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'telescope': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'updated': ['datetime64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.']} + +query_file_metadata = [' archive_filename instrument md5sum original_filename proc_type url ', '----------------------------------------------------------------------------- ---------- -------------------------------- ------------------------------------------------------------------------------------- --------- ----------------------------------------------------------------------------', '/net/archive/pipe/20161024/ct4m/2012B-0001/c4d_161025_034649_oki_z_v2.fits.fz decam 0000f0c5015263610a75f0affed377d0 /net/decdata1/deccp/NHPPS_DATA/DCP/Final/Submitted/c4d_161025_034649_oki_z_v2.fits.fz skysub https://astroarchive.noao.edu/api/retrieve/0000f0c5015263610a75f0affed377d0/', '/net/archive/pipe/20160928/ct4m/2012B-0001/c4d_160929_090838_ooi_z_v2.fits.fz decam 0001e5a5bcf039ebf0c53a6da32e8888 /net/decdata1/deccp/NHPPS_DATA/DCP/Final/Submitted/c4d_160929_090838_ooi_z_v2.fits.fz instcal https://astroarchive.noao.edu/api/retrieve/0001e5a5bcf039ebf0c53a6da32e8888/', '/net/archive/pipe/20160909/ct4m/2012B-0001/c4d_160910_062930_opd_z_v2.fits.fz decam 0003a1c853de73fc1796d2d7d77ca9cd /net/decdata1/deccp/NHPPS_DATA/DCP/Final/Submitted/c4d_160910_062930_opd_z_v2.fits.fz resampled https://astroarchive.noao.edu/api/retrieve/0003a1c853de73fc1796d2d7d77ca9cd/'] + +aux_hdu_fields = {'AMPBAL': 'str', 'AMPSECA': 'str', 'AMPSECB': 'str', 'ARAWGAIN': 'str', 'AVSIG': 'str', 'AVSKY': 'str', 'BIASFIL': 'str', 'BLDINTRP': 'str', 'BPM': 'str', 'BPMFIL': 'str', 'CATALOG': 'str', 'CCDNUM': 'str', 'CCDSECA': 'str', 'CCDSECB': 'str', 'CD1_1': 'str', 'CD1_2': 'str', 'CD2_1': 'str', 'CD2_2': 'str', 'CENDEC1': 'str', 'CENRA1': 'str', 'COR1DEC1': 'str', 'COR1RA1': 'str', 'COR2DEC1': 'str', 'COR2RA1': 'str', 'COR3DEC1': 'str', 'COR3RA1': 'str', 'COR4DEC1': 'str', 'COR4RA1': 'str', 'CROSSRA0': 'str', 'CRPIX1': 'str', 'CRPIX2': 'str', 'CRVAL1': 'str', 'CRVAL2': 'str', 'CTYPE1': 'str', 'CTYPE2': 'str', 'CUNIT1': 'str', 'CUNIT2': 'str', 'D0034494': 'str', 'D0034496': 'str', 'D0034497': 'str', 'DATASEC': 'str', 'DATASECA': 'str', 'DATASECB': 'str', 'DATE': 'str', 'DEC': 'str', 'DEC1': 'str', 'DEC13A_2': 'str', 'DEC13B_2': 'str', 'DEC14A_2': 'str', 'DEC15A_2': 'str', 'DEC15B_2': 'str', 'DEC16A_2': 'str', 'DEC16B_2': 'str', 'DEC17A_2': 'str', 'DEC17B_2': 'str', 'DEC18A_2': 'str', 'DEC18B_2': 'str', 'DEC18B_R': 'str', 'DEC18B_S': 'str', 'DEC19A_2': 'str', 'DEC19A_A': 'str', 'DEC19A_D': 'str', 'DEC19A_J': 'str', 'DEC19A_K': 'str', 'DEC19A_L': 'str', 'DEC19A_M': 'str', 'DEC19A_P': 'str', 'DEC19A_S': 'str', 'DEC19A_T': 'str', 'DEC19A_W': 'str', 'DEC19B_2': 'str', 'DEC19B_A': 'str', 'DEC19B_C': 'str', 'DEC19B_D': 'str', 'DEC19B_F': 'str', 'DEC19B_H': 'str', 'DEC19B_I': 'str', 'DEC19B_J': 'str', 'DEC19B_K': 'str', 'DEC19B_L': 'str', 'DEC19B_M': 'str', 'DEC19B_P': 'str', 'DEC19B_R': 'str', 'DEC19B_S': 'str', 'DEC19B_T': 'str', 'DEC19B_W': 'str', 'DEC20A_A': 'str', 'DEC20A_C': 'str', 'DEC20A_F': 'str', 'DEC20A_J': 'str', 'DEC20A_K': 'str', 'DEC20A_L': 'str', 'DEC20A_M': 'str', 'DEC20A_S': 'str', 'DEC20A_T': 'str', 'DEC20B_T': 'str', 'DECALS_2': 'str', 'DECALS_D': 'str', 'DECC1': 'str', 'DECC2': 'str', 'DECC3': 'str', 'DECC4': 'str', 'DEC_CENT': 'str', 'DECCMAX': 'str', 'DECCMIN': 'str', 'DES14B_2': 'str', 'DES15B_2': 'str', 'DES16B_2': 'str', 'DES17A_2': 'str', 'DES17B_2': 'str', 'DES18A_2': 'str', 'DES18B_2': 'str', 'DESBFC': 'str', 'DESBIAS': 'str', 'DESBLEED': 'str', 'DESBPM': 'str', 'DESCRMSK': 'str', 'DESDCXTK': 'str', 'DESDMCR': 'str', 'DES_EXT': 'str', 'DESFIXC': 'str', 'DESFLAT': 'str', 'DESFNAME': 'str', 'DESFRING': 'str', 'DESGAINC': 'str', 'DESILLUM': 'str', 'DESIMMSK': 'str', 'DESLINC': 'str', 'DESNCRAY': 'str', 'DESNSTRK': 'str', 'DESOSCN': 'str', 'DESPHOTF': 'str', 'DESPUPC': 'str', 'DESSAT': 'str', 'DESSKYSB': 'str', 'DESSTAR': 'str', 'DETECTOR': 'str', 'DETPOS': 'str', 'DETSEC': 'str', 'DETSECA': 'str', 'DETSECB': 'str', 'ELLIPTIC': 'str', 'ENG17B_2': 'str', 'ENG18A_2': 'str', 'ENG18B_2': 'str', 'EXPTIME': 'str', 'EXTNAME': 'str', 'EXTVER': 'str', 'FILTER': 'str', 'FIXCFIL': 'str', 'FIXPIX': 'str', 'FIXPIX02': 'str', 'FLATFIL': 'str', 'FLATMEDA': 'str', 'FLATMEDB': 'str', 'FPA': 'str', 'FRGSCALE': 'str', 'FRINGE': 'str', 'FRINGFIL': 'str', 'FWHM': 'str', 'FWHMP1': 'str', 'FZALGOR': 'str', 'FZDTHRSD': 'str', 'FZQMETHD': 'str', 'FZQVALUE': 'str', 'GAINA': 'str', 'GAINB': 'str', 'GCOUNT': 'str', 'ILLCOR': 'str', 'ILLMASK': 'str', 'ILLUMCOR': 'str', 'ILLUMFIL': 'str', 'INHERIT': 'str', 'IRAF-TLM': 'str', 'LAGER_20': 'str', 'LTM1_1': 'str', 'LTM1_2': 'str', 'LTM2_1': 'str', 'LTM2_2': 'str', 'LTV1': 'str', 'LTV2': 'str', 'MAGZERO1': 'str', 'MAGZUNC1': 'str', 'NAXIS1': 'str', 'NAXIS2': 'str', 'NBLEED': 'str', 'NSATPIX': 'str', 'OBJECT': 'str', 'OBJMASK': 'str', 'ORIGIN': 'str', 'PCOUNT': 'str', 'PHOTFLAG': 'str', 'PUPFIL': 'str', 'PUPILAMP': 'str', 'PUPILSKY': 'str', 'PUPMAX': 'str', 'PV1_0': 'str', 'PV1_1': 'str', 'PV1_10': 'str', 'PV1_2': 'str', 'PV1_3': 'str', 'PV1_4': 'str', 'PV1_5': 'str', 'PV1_6': 'str', 'PV1_7': 'str', 'PV1_8': 'str', 'PV1_9': 'str', 'PV2_0': 'str', 'PV2_1': 'str', 'PV2_10': 'str', 'PV2_2': 'str', 'PV2_3': 'str', 'PV2_4': 'str', 'PV2_5': 'str', 'PV2_6': 'str', 'PV2_7': 'str', 'PV2_8': 'str', 'PV2_9': 'str', 'RA': 'str', 'RA1': 'str', 'RAC1': 'str', 'RAC2': 'str', 'RAC3': 'str', 'RAC4': 'str', 'RA_CENT': 'str', 'RACMAX': 'str', 'RACMIN': 'str', 'RDNOISEA': 'str', 'RDNOISEB': 'str', 'REQ13B_2': 'str', 'REQ13B_H': 'str', 'REQ14B_2': 'str', 'REQ14B_K': 'str', 'REQ15B_S': 'str', 'REQ16A_S': 'str', 'REQ18B_B': 'str', 'REQ19A_2': 'str', 'REQ19A_P': 'str', 'SATURATA': 'str', 'SATURATB': 'str', 'SATURATE': 'str', 'SKYBRITE': 'str', 'SKYIM': 'str', 'SKYSBFIL': 'str', 'SKYSIGMA': 'str', 'SKYSUB': 'str', 'SKYSUB00': 'str', 'SKYVARA': 'str', 'SKYVARB': 'str', 'SLOT00': 'str', 'SLOT01': 'str', 'SLOT02': 'str', 'SLOT03': 'str', 'SLOT04': 'str', 'SLOT05': 'str', 'STARFIL': 'str', 'STARMASK': 'str', 'TOO15A_2': 'str', 'TOO15B_2': 'str', 'TOO16A_2': 'str', 'TOO16B_2': 'str', 'TOO17B_2': 'str', 'TOO18A_2': 'str', 'TOO18A_S': 'str', 'TOO18B_2': 'str', 'TOO19A_2': 'str', 'TOO19A_G': 'str', 'TOO19A_K': 'str', 'TOO19A_M': 'str', 'TOO19B_M': 'str', 'TOO20A_M': 'str', 'WAT0_001': 'str', 'WAT1_001': 'str', 'WAT2_001': 'str', 'WCSAXES': 'str', 'WCSDIM': 'str', 'WTMAP': 'str', 'XTENSION': 'str', 'ZDITHER0': 'str'} + +core_hdu_fields = {'boundary': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'dec': ['np.float64', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'dec_range': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__archive_filename': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__caldat': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__date_obs_max': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__date_obs_min': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__dec_max': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__dec_min': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__depth': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__exposure': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__filesize': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__ifilter': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__instrument': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__md5sum': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__obs_mode': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__obs_type': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__original_filename': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__proc_type': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__prod_type': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__proposal': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__ra_max': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__ra_min': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__release_date': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__seeing': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__site': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__survey': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__telescope': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__updated': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'hdu_idx': ['np.int64', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'id': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'ra': ['np.float64', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'ra_range': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'updated': ['datetime64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.']} + + +query_hdu_metadata = ['AIRMASS fitsfile__archive_filename fitsfile__caldat fitsfile__instrument fitsfile__proc_type', '------- ----------------------------------------------------------------------- ---------------- -------------------- -------------------', ' None /net/archive/mtn/20170814/ct4m/2012B-0001/c4d_170815_051354_ori.fits.fz 2017-08-14 decam raw', ' None /net/archive/mtn/20170814/ct4m/2012B-0001/c4d_170815_051354_ori.fits.fz 2017-08-14 decam raw', ' None /net/archive/mtn/20170814/ct4m/2012B-0001/c4d_170815_051354_ori.fits.fz 2017-08-14 decam raw'] + +categoricals = {'collections': [], 'instruments': ['(p)odi', '90prime', 'andicam', 'arcoiris', 'arcon', 'bench', 'ccd_imager', 'chiron', 'cosmos', 'decam', 'echelle', 'falmingos', 'flamingos', 'goodman', 'goodman spectrograph', 'gtcam', 'hdi', 'ice', 'ispi', 'kosmos', 'minimo/ice', 'mop/ice', 'mosaic', 'mosaic3', 'mosaic_1', 'mosaic_1_1', 'mosaic_2', 'newfirm', 'osiris', 'sami', 'soi', 'spartan', 'spartan ir camera', 'triplespec', 'wfc', 'whirc', 'wildfire', 'y4kcam'], 'obsmodes': [], 'proctypes': ['instcal', 'mastercal', 'nota', 'projected', 'raw', 'resampled', 'skysub', 'stacked'], 'prodtypes': ['dqmask', 'expmap', 'graphics (size)', 'image', 'image 2nd version 1', 'image1', 'nota', 'resampled', 'weight', 'wtmap'], 'sites': ['cp', 'ct', 'kp', 'lp'], 'surveys': [], 'telescopes': ['bok23m', 'ct09m', 'ct13m', 'ct15m', 'ct1m', 'ct4m', 'ctlab', 'kp09m', 'kp21m', 'kp35m', 'kp4m', 'kpcf', 'lp25m', 'soar', 'wiyn']} + diff --git a/astroquery/noirlab/tests/test_noirlab_remote.py b/astroquery/noirlab/tests/test_noirlab_remote.py index 630b6d51d1..b912f3982d 100644 --- a/astroquery/noirlab/tests/test_noirlab_remote.py +++ b/astroquery/noirlab/tests/test_noirlab_remote.py @@ -7,7 +7,7 @@ from astropy.tests.helper import remote_data # Local packages from .. import Noirlab -from . import expected as expsia +from . import expected as exp # #!import pytest # performs similar tests as test_module.py, but performs @@ -19,6 +19,28 @@ @remote_data class TestNoirlabClass(object): + ############################################################### + ### (2) SIA; /api/sia/ + ### + # voimg, vohdu + + def test_service_metadata(self): + """Test compliance with 6.1 of SIA spec v1.0""" + r = Noirlab().service_metadata() + actual = r + print(f'DBG: test_service_metadata={actual}') + expected = exp.service_metadata + assert actual == expected + + def test_query_region_0(self): + """Search FILES using default type (which) selector""" + + c = SkyCoord(ra=10.625*u.degree, dec=41.2*u.degree, frame='icrs') + r = Noirlab().query_region(c, radius='0.1') + actual = set(list(r['md5sum'])) + expected = exp.query_region_1 + assert expected.issubset(actual) + def test_query_region_1(self): """Search FILES. Ensure query gets at least the set of files we expect. @@ -27,7 +49,7 @@ def test_query_region_1(self): c = SkyCoord(ra=10.625*u.degree, dec=41.2*u.degree, frame='icrs') r = Noirlab(which='file').query_region(c, radius='0.1') actual = set(list(r['md5sum'])) - expected = expsia.query_region_1 + expected = exp.query_region_1 assert expected.issubset(actual) def test_query_region_2(self): @@ -38,5 +60,120 @@ def test_query_region_2(self): c = SkyCoord(ra=10.625*u.degree, dec=41.2*u.degree, frame='icrs') r = Noirlab(which='hdu').query_region(c, radius='0.07') actual = set(list(r['md5sum'])) - expected = expsia.query_region_2 + expected = exp.query_region_2 assert expected.issubset(actual) + + ############################################################### + ### (7) Advanced Search; /api/adv_search/ + ### + # + # (2) aux_{file,hdu}_fields// + # (2) core_{file,hdu}_fields/ + # [(2) {f,h}adoc JUST LINK to these] + # (2) {f,h}asearch + # cat_list + + ## + ## File (default type) + ## + + def test_aux_file_fields(self): + """List the available AUX FILE fields.""" + r = Noirlab().aux_fields('decam', 'instcal') + actual = r + print(f'DBG: test_aux_file_fields={actual}') + expected = exp.aux_file_fields + assert actual == expected + + def test_core_file_fields(self): + """List the available CORE FILE fields.""" + r = Noirlab().core_fields() + actual = r # set(list(r['md5sum'])) + print(f'DBG: test_core_file_fields={actual}') + expected = exp.core_file_fields + assert actual == expected + + def test_query_file_metadata(self): + """Search FILE metadata.""" + qspec = { + "outfields" : [ + "md5sum", + "archive_filename", + "original_filename", + "instrument", + "proc_type" + ], + "search" : [ + ['original_filename', 'c4d_', 'contains'] + ] + } + + r = Noirlab().query_metadata(qspec, limit=3) + actual = r # set(list(r['md5sum'])) + print(f'DBG: test_query_file_metadata={actual.pformat_all()}') + expected = exp.query_file_metadata + assert actual.pformat_all() == expected + + + ## + ## HDU + ## + + def test_aux_hdu_fields(self): + """List the available AUX HDU fields.""" + r = Noirlab(which='hdu').aux_fields('decam', 'instcal') + actual = r + print(f'DBG: test_aux_hdu_fields={actual}') + expected = exp.aux_hdu_fields + assert actual == expected + + def test_core_hdu_fields(self): + """List the available CORE HDU fields.""" + r = Noirlab(which='hdu').core_fields() + actual = r # set(list(r['md5sum'])) + print(f'DBG: test_core_hdu_fields={actual}') + expected = exp.core_hdu_fields + assert actual == expected + + def test_query_hdu_metadata(self): + """Search HDU metadata.""" + qspec = { + "outfields" : [ + "fitsfile__archive_filename", + "fitsfile__caldat", + "fitsfile__instrument", + "fitsfile__proc_type", + "AIRMASS" # AUX field. Slows search + ], + "search" : [ + ["fitsfile__caldat", "2017-08-14", "2017-08-16"], + ["fitsfile__instrument", "decam"], + ["fitsfile__proc_type", "raw"] + ] + } + + r = Noirlab(which='hdu').query_metadata(qspec, limit=3) + actual = r # set(list(r['md5sum'])) + print(f'DBG: test_query_hdu_metadata={actual.pformat_all()}') + expected = exp.query_hdu_metadata + assert actual.pformat_all() == expected + + ## + ## Agnostic + ## + + def test_categoricals(self): + """List categories.""" + r = Noirlab().categoricals() + actual = r # set(list(r['md5sum'])) + print(f'DBG: test_categoricals={actual}') + expected = exp.categoricals + assert actual == expected + + + + ############################################################### + ### (3) Other + # get_token + # retrieve/ + # version From 6d1c056cf2491da530d617ecf350f4edc1ba4357 Mon Sep 17 00:00:00 2001 From: Steve Pothier Date: Tue, 14 Apr 2020 15:09:47 -0700 Subject: [PATCH 02/13] added remaining required tests --- astroquery/noirlab/core.py | 19 +++++++++++++++ astroquery/noirlab/tests/expected.py | 1 + .../noirlab/tests/test_noirlab_remote.py | 23 +++++++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/astroquery/noirlab/core.py b/astroquery/noirlab/core.py index 75ecfc676d..f1883cd280 100644 --- a/astroquery/noirlab/core.py +++ b/astroquery/noirlab/core.py @@ -4,6 +4,7 @@ This does DB access through web-services. """ import json +import astropy.io.fits as pyfits import astropy.table from ..query import BaseQuery from ..utils import async_to_sync @@ -185,5 +186,23 @@ def query_metadata(self, qspec, limit=1000, cache=True): return astropy.table.Table(rows=response.json()) #return response.json() #@@@ Should return table + def retrieve(self, fileid, cache=True): + url = f'{self.NAT_URL}/api/retrieve/{fileid}/' + hdul = pyfits.open(url) + return hdul + def version(self, cache=False): + url = f'{self.NAT_URL}/api/version/' + response = self._request('GET', url, timeout=self.TIMEOUT, cache=cache) + response.raise_for_status() + return response.json() + + def get_token(self, email, password, cache=True): + url = f'{self.NAT_URL}/api/get_token/' + response = requests.post(url, + json={"email": email, "password": password}, + timeout=self.TIMEOUT) + response.raise_for_status() + return response.json() + Noirlab = NoirlabClass() diff --git a/astroquery/noirlab/tests/expected.py b/astroquery/noirlab/tests/expected.py index bb6bc0cc6f..60ef253c7c 100644 --- a/astroquery/noirlab/tests/expected.py +++ b/astroquery/noirlab/tests/expected.py @@ -42,3 +42,4 @@ categoricals = {'collections': [], 'instruments': ['(p)odi', '90prime', 'andicam', 'arcoiris', 'arcon', 'bench', 'ccd_imager', 'chiron', 'cosmos', 'decam', 'echelle', 'falmingos', 'flamingos', 'goodman', 'goodman spectrograph', 'gtcam', 'hdi', 'ice', 'ispi', 'kosmos', 'minimo/ice', 'mop/ice', 'mosaic', 'mosaic3', 'mosaic_1', 'mosaic_1_1', 'mosaic_2', 'newfirm', 'osiris', 'sami', 'soi', 'spartan', 'spartan ir camera', 'triplespec', 'wfc', 'whirc', 'wildfire', 'y4kcam'], 'obsmodes': [], 'proctypes': ['instcal', 'mastercal', 'nota', 'projected', 'raw', 'resampled', 'skysub', 'stacked'], 'prodtypes': ['dqmask', 'expmap', 'graphics (size)', 'image', 'image 2nd version 1', 'image1', 'nota', 'resampled', 'weight', 'wtmap'], 'sites': ['cp', 'ct', 'kp', 'lp'], 'surveys': [], 'telescopes': ['bok23m', 'ct09m', 'ct13m', 'ct15m', 'ct1m', 'ct4m', 'ctlab', 'kp09m', 'kp21m', 'kp35m', 'kp4m', 'kpcf', 'lp25m', 'soar', 'wiyn']} +retrieve = ['SIMPLE', 'BITPIX', 'NAXIS', 'EXTEND', 'ORIGIN', 'DATE', 'IRAF-TLM', 'OBJECT', 'RAWFILE', 'FILENAME', 'OBJRA', 'OBJDEC', 'OBJEPOCH', '', 'TIMESYS', '', 'OBSERVAT', 'OBS-ELEV', 'OBS-LAT', 'OBS-LONG', 'TELESCOP', 'TELRADEC', 'TELEQUIN', 'TELRA', 'TELDEC', 'HA', 'ZD', 'TELFOCUS', '', 'MOSSIZE', 'NDETS', '', 'OBSERVER', 'PROPOSER', 'PROPID', 'SEQID', 'SEQNUM', '', 'NOHS', 'NOCUTC', 'NOCRSD', 'NOCGID', 'NOCNAME', '', 'DTSITE', 'DTTELESC', 'DTINSTRU', 'DTCALDAT', 'DTUTC', 'DTOBSERV', 'DTPROPID', 'DTPI', 'DTPIAFFL', 'DTTITLE', 'DTCOPYRI', 'DTACQUIS', 'DTACCOUN', 'DTACQNAM', 'DTNSANAM', 'DTSTATUS', 'SB_HOST', 'SB_ACCOU', 'SB_SITE', 'SB_LOCAL', 'SB_DIR1', 'SB_DIR2', 'SB_DIR3', 'SB_RECNO', 'SB_ID', 'SB_NAME', 'RMCOUNT', 'RECNO', 'INSTRUME', 'RSPTGRP', 'RSPGRP', '', 'OBSTYPE', 'PROCTYPE', 'PRODTYPE', 'MIMETYPE', 'EXPTIME', 'FILTER', '', 'RA', 'DEC', 'CENTRA', 'CORN1RA', 'CORN2RA', 'CORN3RA', 'CORN4RA', 'CENTDEC', 'CORN1DEC', 'CORN2DEC', 'CORN3DEC', 'CORN4DEC', 'DATE-OBS', 'TIME-OBS', 'MJD-OBS', 'ST', '', 'CTYPE1', 'CTYPE2', 'CRVAL1', 'CRVAL2', 'CD1_1', 'CD2_2', 'WAT0_001', 'WAT1_001', 'WAT2_001', '', 'DIGAVGS', 'NCOADD', 'FSAMPLE', 'EXPCOADD', 'TITLE', 'DARKFIL', 'DARKINFO', 'LINIMAGE', 'LINCOEFF', 'BUNIT', 'GAIN', 'OEXPTIME', 'MAGZREF', 'PHOTINDX', 'WCSCAL', 'WCSXRMS', 'WCSYRMS', 'MAGZERO', '', 'MAGZSIG', 'MAGZERR', 'MAGZNAV', 'SEEINGP', 'SKYBG', 'SEEING', 'SKYMAG', 'STKBPM', 'OBJBPM', 'CDELT1', 'CDELT2', 'CRPIX1', 'CRPIX2', 'BPM', 'IMCMB001', 'IMCMB002', 'IMCMB003', 'IMCMB004', 'IMCMB005', 'IMCMB006', 'IMCMB007', 'IMCMB008', 'IMCMB009', 'IMCMB010', 'IMCMB011', 'IMCMB012', 'IMCMB013', 'IMCMB014', 'IMCMB015', 'IMCMB016', 'IMCMB017', 'IMCMB018', 'IMCMB019', 'IMCMB020', 'IMCMB021', 'IMCMB022', 'IMCMB023', 'IMCMB024', 'IMCMB025', 'IMCMB026', 'IMCMB027', 'IMCMB028', 'IMCMB029', 'IMCMB030', 'IMCMB031', 'IMCMB032', 'IMCMB033', 'IMCMB034', 'IMCMB035', 'IMCMB036', 'IMCMB037', 'IMCMB038', 'IMCMB039', 'IMCMB040', 'IMCMB041', 'IMCMB042', 'IMCMB043', 'IMCMB044', 'IMCMB045', 'IMCMB046', 'IMCMB047', 'IMCMB048', 'IMCMB049', 'IMCMB050', 'IMCMB051', 'IMCMB052', 'IMCMB053', 'IMCMB054', 'IMCMB055', 'IMCMB056', 'IMCMB057', 'IMCMB058', 'IMCMB059', 'IMCMB060', 'IMCMB061', 'IMCMB062', 'IMCMB063', 'IMCMB064', 'IMCMB065', 'IMCMB066', 'IMCMB067', 'IMCMB068', 'IMCMB069', 'IMCMB070', 'IMCMB071', 'IMCMB072', 'IMCMB073', 'IMCMB074', 'IMCMB075', 'IMCMB076', 'IMCMB077', 'IMCMB078', 'IMCMB079', 'IMCMB080', 'IMCMB081', 'IMCMB082', 'IMCMB083', 'IMCMB084', 'IMCMB085', 'IMCMB086', 'IMCMB087', 'IMCMB088', 'IMCMB089', 'IMCMB090', 'IMCMB091', 'IMCMB092', 'IMCMB093', 'IMCMB094', 'IMCMB095', 'IMCMB096', 'IMCMB097', 'IMCMB098', 'IMCMB099', 'IMCMB100', 'IMCMB101', 'IMCMB102', 'IMCMB103', 'IMCMB104', 'IMCMB105', 'IMCMB106', 'IMCMB107', 'IMCMB108', 'WMETHOD', 'DQAREA', 'DQEXPMAX', 'DQNOIS', 'DQPDPS', 'DQPDAP', 'DQPDPX', 'DQFWHM', 'DQMZ', 'DQSKY', 'DQSKYXGD', 'DQSKYYGD', 'DQMXTIME', 'DQHFTIME', 'DQMXAREA', 'DQHFAREA', 'DQMXFRAC', 'DQHFFRAC', 'DQMXNOIS', 'DQHFNOIS', 'DQMXPDPS', 'DQHFPDPS', 'DQMXPDAP', 'DQHFPDAP', 'DQMXPDPX', 'DQHFPDPX', 'DQSEEMID', 'DQSEESIG', 'DQSEEMIN', 'DQSEEMAX', 'DQSKYMID', 'DQSKYSIG', 'DQSKYMIN', 'DQSKYMAX', 'DQMASK', 'FILTID', 'PHOTBW', 'PHOTFWHM', 'PHOTCLAM', '', 'PIPELINE', 'PLVER', 'EXPMAP', 'ASTRMCAT', 'EFFTIME', 'WCSAXES', 'PLDNAME', '', 'PLQUEUE', 'PLQNAME', 'PLPROCID', 'PLFNAME', 'PLOFNAME', 'DQMFOR', 'PLPROPID', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'CHECKSUM', 'DATASUM'] diff --git a/astroquery/noirlab/tests/test_noirlab_remote.py b/astroquery/noirlab/tests/test_noirlab_remote.py index b912f3982d..1227514ff1 100644 --- a/astroquery/noirlab/tests/test_noirlab_remote.py +++ b/astroquery/noirlab/tests/test_noirlab_remote.py @@ -5,6 +5,7 @@ from astropy import units as u from astropy.coordinates import SkyCoord from astropy.tests.helper import remote_data +import astropy.io.fits as pyfits # Local packages from .. import Noirlab from . import expected as exp @@ -177,3 +178,25 @@ def test_categoricals(self): # get_token # retrieve/ # version + + def test_retrieve(self): + hdul = Noirlab().retrieve('f92541fdc566dfebac9e7d75e12b5601') + actual = list(hdul[0].header.keys()) + print(f'DBG: test_retrieve={actual}') + expected = exp.retrieve + assert actual == expected + + + def test_version(self): + r = Noirlab().version() + assert r < 3.0 + + def test_get_token(self): + actual = Noirlab().get_token('nobody@university.edu', '123456789') + expected = {'detail': + 'No active account found with the given credentials'} + print(f'DBG: test_get_token={actual}') + assert actual == expected + + + From 9ec854bd31f41cd7031c21d664fb89c925931c5a Mon Sep 17 00:00:00 2001 From: Steve Pothier Date: Wed, 15 Apr 2020 17:01:45 -0700 Subject: [PATCH 03/13] Adding PR number to changelog --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 220b00cdd0..ae7f1e6d99 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -12,7 +12,7 @@ esa/xmm-newton noirlab ^^^^^^^ -- Module added to access the NOIRLab (formally NOAO) archive. [#1638] +- Module added to access the NOIRLab (formally NOAO) archive. [#1638, #1701] Service fixes and enhancements From b89344b926c9740918c0a92d9def9444343bf48b Mon Sep 17 00:00:00 2001 From: Steve Pothier Date: Thu, 16 Apr 2020 07:28:23 -0700 Subject: [PATCH 04/13] noqa for expected results --- astroquery/noirlab/tests/expected.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/astroquery/noirlab/tests/expected.py b/astroquery/noirlab/tests/expected.py index 60ef253c7c..c8ae9a5615 100644 --- a/astroquery/noirlab/tests/expected.py +++ b/astroquery/noirlab/tests/expected.py @@ -43,3 +43,5 @@ categoricals = {'collections': [], 'instruments': ['(p)odi', '90prime', 'andicam', 'arcoiris', 'arcon', 'bench', 'ccd_imager', 'chiron', 'cosmos', 'decam', 'echelle', 'falmingos', 'flamingos', 'goodman', 'goodman spectrograph', 'gtcam', 'hdi', 'ice', 'ispi', 'kosmos', 'minimo/ice', 'mop/ice', 'mosaic', 'mosaic3', 'mosaic_1', 'mosaic_1_1', 'mosaic_2', 'newfirm', 'osiris', 'sami', 'soi', 'spartan', 'spartan ir camera', 'triplespec', 'wfc', 'whirc', 'wildfire', 'y4kcam'], 'obsmodes': [], 'proctypes': ['instcal', 'mastercal', 'nota', 'projected', 'raw', 'resampled', 'skysub', 'stacked'], 'prodtypes': ['dqmask', 'expmap', 'graphics (size)', 'image', 'image 2nd version 1', 'image1', 'nota', 'resampled', 'weight', 'wtmap'], 'sites': ['cp', 'ct', 'kp', 'lp'], 'surveys': [], 'telescopes': ['bok23m', 'ct09m', 'ct13m', 'ct15m', 'ct1m', 'ct4m', 'ctlab', 'kp09m', 'kp21m', 'kp35m', 'kp4m', 'kpcf', 'lp25m', 'soar', 'wiyn']} retrieve = ['SIMPLE', 'BITPIX', 'NAXIS', 'EXTEND', 'ORIGIN', 'DATE', 'IRAF-TLM', 'OBJECT', 'RAWFILE', 'FILENAME', 'OBJRA', 'OBJDEC', 'OBJEPOCH', '', 'TIMESYS', '', 'OBSERVAT', 'OBS-ELEV', 'OBS-LAT', 'OBS-LONG', 'TELESCOP', 'TELRADEC', 'TELEQUIN', 'TELRA', 'TELDEC', 'HA', 'ZD', 'TELFOCUS', '', 'MOSSIZE', 'NDETS', '', 'OBSERVER', 'PROPOSER', 'PROPID', 'SEQID', 'SEQNUM', '', 'NOHS', 'NOCUTC', 'NOCRSD', 'NOCGID', 'NOCNAME', '', 'DTSITE', 'DTTELESC', 'DTINSTRU', 'DTCALDAT', 'DTUTC', 'DTOBSERV', 'DTPROPID', 'DTPI', 'DTPIAFFL', 'DTTITLE', 'DTCOPYRI', 'DTACQUIS', 'DTACCOUN', 'DTACQNAM', 'DTNSANAM', 'DTSTATUS', 'SB_HOST', 'SB_ACCOU', 'SB_SITE', 'SB_LOCAL', 'SB_DIR1', 'SB_DIR2', 'SB_DIR3', 'SB_RECNO', 'SB_ID', 'SB_NAME', 'RMCOUNT', 'RECNO', 'INSTRUME', 'RSPTGRP', 'RSPGRP', '', 'OBSTYPE', 'PROCTYPE', 'PRODTYPE', 'MIMETYPE', 'EXPTIME', 'FILTER', '', 'RA', 'DEC', 'CENTRA', 'CORN1RA', 'CORN2RA', 'CORN3RA', 'CORN4RA', 'CENTDEC', 'CORN1DEC', 'CORN2DEC', 'CORN3DEC', 'CORN4DEC', 'DATE-OBS', 'TIME-OBS', 'MJD-OBS', 'ST', '', 'CTYPE1', 'CTYPE2', 'CRVAL1', 'CRVAL2', 'CD1_1', 'CD2_2', 'WAT0_001', 'WAT1_001', 'WAT2_001', '', 'DIGAVGS', 'NCOADD', 'FSAMPLE', 'EXPCOADD', 'TITLE', 'DARKFIL', 'DARKINFO', 'LINIMAGE', 'LINCOEFF', 'BUNIT', 'GAIN', 'OEXPTIME', 'MAGZREF', 'PHOTINDX', 'WCSCAL', 'WCSXRMS', 'WCSYRMS', 'MAGZERO', '', 'MAGZSIG', 'MAGZERR', 'MAGZNAV', 'SEEINGP', 'SKYBG', 'SEEING', 'SKYMAG', 'STKBPM', 'OBJBPM', 'CDELT1', 'CDELT2', 'CRPIX1', 'CRPIX2', 'BPM', 'IMCMB001', 'IMCMB002', 'IMCMB003', 'IMCMB004', 'IMCMB005', 'IMCMB006', 'IMCMB007', 'IMCMB008', 'IMCMB009', 'IMCMB010', 'IMCMB011', 'IMCMB012', 'IMCMB013', 'IMCMB014', 'IMCMB015', 'IMCMB016', 'IMCMB017', 'IMCMB018', 'IMCMB019', 'IMCMB020', 'IMCMB021', 'IMCMB022', 'IMCMB023', 'IMCMB024', 'IMCMB025', 'IMCMB026', 'IMCMB027', 'IMCMB028', 'IMCMB029', 'IMCMB030', 'IMCMB031', 'IMCMB032', 'IMCMB033', 'IMCMB034', 'IMCMB035', 'IMCMB036', 'IMCMB037', 'IMCMB038', 'IMCMB039', 'IMCMB040', 'IMCMB041', 'IMCMB042', 'IMCMB043', 'IMCMB044', 'IMCMB045', 'IMCMB046', 'IMCMB047', 'IMCMB048', 'IMCMB049', 'IMCMB050', 'IMCMB051', 'IMCMB052', 'IMCMB053', 'IMCMB054', 'IMCMB055', 'IMCMB056', 'IMCMB057', 'IMCMB058', 'IMCMB059', 'IMCMB060', 'IMCMB061', 'IMCMB062', 'IMCMB063', 'IMCMB064', 'IMCMB065', 'IMCMB066', 'IMCMB067', 'IMCMB068', 'IMCMB069', 'IMCMB070', 'IMCMB071', 'IMCMB072', 'IMCMB073', 'IMCMB074', 'IMCMB075', 'IMCMB076', 'IMCMB077', 'IMCMB078', 'IMCMB079', 'IMCMB080', 'IMCMB081', 'IMCMB082', 'IMCMB083', 'IMCMB084', 'IMCMB085', 'IMCMB086', 'IMCMB087', 'IMCMB088', 'IMCMB089', 'IMCMB090', 'IMCMB091', 'IMCMB092', 'IMCMB093', 'IMCMB094', 'IMCMB095', 'IMCMB096', 'IMCMB097', 'IMCMB098', 'IMCMB099', 'IMCMB100', 'IMCMB101', 'IMCMB102', 'IMCMB103', 'IMCMB104', 'IMCMB105', 'IMCMB106', 'IMCMB107', 'IMCMB108', 'WMETHOD', 'DQAREA', 'DQEXPMAX', 'DQNOIS', 'DQPDPS', 'DQPDAP', 'DQPDPX', 'DQFWHM', 'DQMZ', 'DQSKY', 'DQSKYXGD', 'DQSKYYGD', 'DQMXTIME', 'DQHFTIME', 'DQMXAREA', 'DQHFAREA', 'DQMXFRAC', 'DQHFFRAC', 'DQMXNOIS', 'DQHFNOIS', 'DQMXPDPS', 'DQHFPDPS', 'DQMXPDAP', 'DQHFPDAP', 'DQMXPDPX', 'DQHFPDPX', 'DQSEEMID', 'DQSEESIG', 'DQSEEMIN', 'DQSEEMAX', 'DQSKYMID', 'DQSKYSIG', 'DQSKYMIN', 'DQSKYMAX', 'DQMASK', 'FILTID', 'PHOTBW', 'PHOTFWHM', 'PHOTCLAM', '', 'PIPELINE', 'PLVER', 'EXPMAP', 'ASTRMCAT', 'EFFTIME', 'WCSAXES', 'PLDNAME', '', 'PLQUEUE', 'PLQNAME', 'PLPROCID', 'PLFNAME', 'PLOFNAME', 'DQMFOR', 'PLPROPID', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'CHECKSUM', 'DATASUM'] + +# noqa From 754ad9c888922908891e8939c879d33bd57c5658 Mon Sep 17 00:00:00 2001 From: Steve Pothier Date: Thu, 16 Apr 2020 10:00:00 -0700 Subject: [PATCH 05/13] fix docs, private instance vars --- astroquery/noirlab/core.py | 23 +++++++++++------------ docs/noirlab/noirlab.rst | 5 ++--- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/astroquery/noirlab/core.py b/astroquery/noirlab/core.py index f1883cd280..67322b1d3f 100644 --- a/astroquery/noirlab/core.py +++ b/astroquery/noirlab/core.py @@ -31,19 +31,18 @@ def __init__(self, which='file'): is only the case with some pipeline processed files. """ self._api_version = None - - self.adsurl = f'{self.NAT_URL}/api/adv_search' + self._adsurl = f'{self.NAT_URL}/api/adv_search' if which == 'hdu': self.siaurl = f'{self.NAT_URL}/api/sia/vohdu' - self.adss_url = f'{self.adsurl}/hasearch' - self.adsc_url = f'{self.adsurl}/core_hdu_fields' - self.adsa_url = f'{self.adsurl}/aux_hdu_fields' + self._adss_url = f'{self._adsurl}/hasearch' + self._adsc_url = f'{self._adsurl}/core_hdu_fields' + self._adsa_url = f'{self._adsurl}/aux_hdu_fields' else: self.siaurl = f'{self.NAT_URL}/api/sia/voimg' - self.adss_url = f'{self.adsurl}/fasearch' - self.adsc_url = f'{self.adsurl}/core_file_fields' - self.adsa_url = f'{self.adsurl}/aux_file_fields' + self._adss_url = f'{self._adsurl}/fasearch' + self._adsc_url = f'{self._adsurl}/core_file_fields' + self._adsa_url = f'{self._adsurl}/aux_file_fields' super().__init__() @@ -116,7 +115,7 @@ def query_region(self, coordinate, radius=0.1, cache=True): def core_fields(self, cache=True): """List the available CORE fields. CORE fields are faster to search than AUX fields..""" - response = self._request('GET', self.adsc_url, + response = self._request('GET', self._adsc_url, timeout=self.TIMEOUT, cache=cache) response.raise_for_status() @@ -128,7 +127,7 @@ def aux_fields(self, instrument, proctype, cache=True): Archive FITS files that are not core DB fields. These are generally common to a single Instrument, Proctype combination. AUX fields are slower to search than CORE fields. """ - url = f'{self.adsa_url}/{instrument}/{proctype}/' + url = f'{self._adsa_url}/{instrument}/{proctype}/' response = self._request('GET', url, timeout=self.TIMEOUT, cache=cache) response.raise_for_status() return response.json() @@ -141,7 +140,7 @@ def categoricals(self, cache=True): collection, instrument, obs_mode, proc_type, prod_type, site, survey, telescope. """ - url = f'{self.adsurl}/cat_lists/?format=json' + url = f'{self._adsurl}/cat_lists/?format=json' response = self._request('GET', url, timeout=self.TIMEOUT, cache=cache) response.raise_for_status() return response.json() @@ -162,7 +161,7 @@ def categoricals(self, cache=True): @class_or_instance def query_metadata(self, qspec, limit=1000, cache=True): self._validate_version() - url = f'{self.adss_url}/?limit={limit}' + url = f'{self._adss_url}/?limit={limit}' if qspec is None: jdata = {"outfields": ["md5sum", ], "search": []} diff --git a/docs/noirlab/noirlab.rst b/docs/noirlab/noirlab.rst index 134fd40f00..ba91bb19c5 100644 --- a/docs/noirlab/noirlab.rst +++ b/docs/noirlab/noirlab.rst @@ -1,7 +1,4 @@ .. doctest-skip-all -.. # To render rst files to HTML: python setup.py build_docs -.. # When above stops working (astroquery removes helpers) do next: -.. # cd docs; make html .. _astroquery.noirlab: @@ -9,6 +6,7 @@ NOIRLab Queries (`astroquery.noirlab`) ************************************** + Getting started =============== @@ -47,6 +45,7 @@ to query. Specify the coordinates using the appropriate coordinate system from /net/archive/mtn/20151120/kp4m/2015B-2001/k4m_151121_031258_ori.fits.fz 2015-11-21 ... 2020-02-09T01:24:37.873559+00:00 /net/archive/mtn/20151120/kp4m/2015B-2001/k4m_151121_041031_ori.fits.fz 2015-11-21 ... 2020-02-09T01:24:38.951230+00:00 + >>> noirlab_hdu = Noirlab(which='hdu') >>> results_hdu = noirlab_hdu.query_region(coord, radius='0.1') >>> print(results_hdu) From 9cbd7bf2118185dcb98f1fb45cc1b1da88c7869f Mon Sep 17 00:00:00 2001 From: Steve Pothier Date: Thu, 16 Apr 2020 10:12:38 -0700 Subject: [PATCH 06/13] minor doc change --- astroquery/noirlab/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/astroquery/noirlab/__init__.py b/astroquery/noirlab/__init__.py index d47750a8b0..fb878d8255 100644 --- a/astroquery/noirlab/__init__.py +++ b/astroquery/noirlab/__init__.py @@ -1,7 +1,7 @@ from astropy import config as _config # Licensed under a 3-clause BSD style license - see LICENSE.rst -"""NSF's OIR Lab Astro Data Archive(Beta) ------------------------------------------ +"""NSF's OIR Lab Astro Data Archive (Beta) +------------------------------------------ The NSF's OIR Lab Astro Data Archive (formerly NOAO Science Archive) provides access to data taken with more than 40 telescope and @@ -54,9 +54,6 @@ Universities for Research in Astronomy (AURA), Inc. under a cooperative agreement with the National Science Foundation. - -See also: gemini, nrao - """ From df0ecc5bba4ed7e52407c219de7f11453ed538e0 Mon Sep 17 00:00:00 2001 From: Steve Pothier Date: Thu, 16 Apr 2020 10:56:21 -0700 Subject: [PATCH 07/13] use standard _request with new json keyword --- astroquery/noirlab/core.py | 41 ++---------- .../noirlab/tests/test_noirlab_remote.py | 63 ++++++++----------- 2 files changed, 33 insertions(+), 71 deletions(-) diff --git a/astroquery/noirlab/core.py b/astroquery/noirlab/core.py index 67322b1d3f..9e0bab8920 100644 --- a/astroquery/noirlab/core.py +++ b/astroquery/noirlab/core.py @@ -3,14 +3,12 @@ This does DB access through web-services. """ -import json import astropy.io.fits as pyfits import astropy.table from ..query import BaseQuery from ..utils import async_to_sync from ..utils.class_or_instance import class_or_instance from . import conf -import requests __all__ = ['Noirlab', 'NoirlabClass'] # specifies what to import @@ -32,7 +30,7 @@ def __init__(self, which='file'): """ self._api_version = None self._adsurl = f'{self.NAT_URL}/api/adv_search' - + if which == 'hdu': self.siaurl = f'{self.NAT_URL}/api/sia/vohdu' self._adss_url = f'{self._adsurl}/hasearch' @@ -79,7 +77,7 @@ def service_metadata(self, cache=True): url = f'{self.siaurl}?FORMAT=METADATA&format=json' response = self._request('GET', url, timeout=self.TIMEOUT, cache=cache) return response.json()[0] - + @class_or_instance def query_region(self, coordinate, radius=0.1, cache=True): """Query for NOIRLab observations by region of the sky. @@ -111,7 +109,6 @@ def query_region(self, coordinate, radius=0.1, cache=True): response.raise_for_status() return astropy.table.Table(data=response.json()) - def core_fields(self, cache=True): """List the available CORE fields. CORE fields are faster to search than AUX fields..""" @@ -121,7 +118,6 @@ def core_fields(self, cache=True): response.raise_for_status() return response.json() - def aux_fields(self, instrument, proctype, cache=True): """List the available AUX fields. AUX fields are ANY fields in the Archive FITS files that are not core DB fields. These are generally @@ -145,19 +141,6 @@ def categoricals(self, cache=True): response.raise_for_status() return response.json() - #! @class_or_instance - #! def _query_ads(self, jdata, limit=1000): - #! print(f'DBG-0: ADS jdata={jdata}') - #! adsurl = f'{self.adsurl}/?limit={limit}' - #! print(f'DBG-0: adsurl = {adsurl}') - #! # Following fails - #! # #! response = self._request('POST',adsurl, data=json.dumps(jdata)) - #! response = requests.post(adsurl, json=jdata) - #! print(f'DBG-0: ADS response={response}') - #! print(f'DBG-0: ADS response.content={response.content}') - #! print(f'DBG-0: ADS response.json()={response.json()}') - #! return astropy.table.Table(data=response.json()) - @class_or_instance def query_metadata(self, qspec, limit=1000, cache=True): self._validate_version() @@ -168,22 +151,9 @@ def query_metadata(self, qspec, limit=1000, cache=True): else: jdata = qspec - print(f'DBG-0: query_metadata.url = {url}') - # headers = {'accept': 'application/json'} - # headers = {'Content-Type': 'application/json'} - - # Following fails: - # #!response = self._request('POST', url, json=jdata) - - response = requests.post(url, - timeout=self.TIMEOUT, - json=jdata) + response = self._request('POST', url, json=jdata, timeout=self.TIMEOUT) response.raise_for_status() - # #!print(f'DBG-0: ADS response={response}') - # #!print(f'DBG-0: ADS response.content={response.content}') - # #!print(f'DBG-0: ADS response.json()={response.json()}') return astropy.table.Table(rows=response.json()) - #return response.json() #@@@ Should return table def retrieve(self, fileid, cache=True): url = f'{self.NAT_URL}/api/retrieve/{fileid}/' @@ -198,10 +168,11 @@ def version(self, cache=False): def get_token(self, email, password, cache=True): url = f'{self.NAT_URL}/api/get_token/' - response = requests.post(url, + response = self._request('POST', url, json={"email": email, "password": password}, timeout=self.TIMEOUT) response.raise_for_status() return response.json() - + + Noirlab = NoirlabClass() diff --git a/astroquery/noirlab/tests/test_noirlab_remote.py b/astroquery/noirlab/tests/test_noirlab_remote.py index 1227514ff1..c6092c210c 100644 --- a/astroquery/noirlab/tests/test_noirlab_remote.py +++ b/astroquery/noirlab/tests/test_noirlab_remote.py @@ -5,11 +5,9 @@ from astropy import units as u from astropy.coordinates import SkyCoord from astropy.tests.helper import remote_data -import astropy.io.fits as pyfits # Local packages from .. import Noirlab from . import expected as exp -# #!import pytest # performs similar tests as test_module.py, but performs # the actual HTTP request rather than monkeypatching them. @@ -20,9 +18,9 @@ @remote_data class TestNoirlabClass(object): - ############################################################### - ### (2) SIA; /api/sia/ - ### + # ############################################################### + # ### (2) SIA; /api/sia/ + # ### # voimg, vohdu def test_service_metadata(self): @@ -32,7 +30,7 @@ def test_service_metadata(self): print(f'DBG: test_service_metadata={actual}') expected = exp.service_metadata assert actual == expected - + def test_query_region_0(self): """Search FILES using default type (which) selector""" @@ -64,9 +62,9 @@ def test_query_region_2(self): expected = exp.query_region_2 assert expected.issubset(actual) - ############################################################### - ### (7) Advanced Search; /api/adv_search/ - ### + # ############################################################### + # ### (7) Advanced Search; /api/adv_search/ + # ### # # (2) aux_{file,hdu}_fields// # (2) core_{file,hdu}_fields/ @@ -74,9 +72,9 @@ def test_query_region_2(self): # (2) {f,h}asearch # cat_list - ## - ## File (default type) - ## + # ## + # ## File (default type) + # ## def test_aux_file_fields(self): """List the available AUX FILE fields.""" @@ -89,7 +87,7 @@ def test_aux_file_fields(self): def test_core_file_fields(self): """List the available CORE FILE fields.""" r = Noirlab().core_fields() - actual = r # set(list(r['md5sum'])) + actual = r print(f'DBG: test_core_file_fields={actual}') expected = exp.core_file_fields assert actual == expected @@ -97,28 +95,27 @@ def test_core_file_fields(self): def test_query_file_metadata(self): """Search FILE metadata.""" qspec = { - "outfields" : [ + "outfields": [ "md5sum", "archive_filename", "original_filename", "instrument", "proc_type" ], - "search" : [ + "search": [ ['original_filename', 'c4d_', 'contains'] ] } r = Noirlab().query_metadata(qspec, limit=3) - actual = r # set(list(r['md5sum'])) + actual = r print(f'DBG: test_query_file_metadata={actual.pformat_all()}') expected = exp.query_file_metadata assert actual.pformat_all() == expected - - ## - ## HDU - ## + # ## + # ## HDU + # ## def test_aux_hdu_fields(self): """List the available AUX HDU fields.""" @@ -131,7 +128,7 @@ def test_aux_hdu_fields(self): def test_core_hdu_fields(self): """List the available CORE HDU fields.""" r = Noirlab(which='hdu').core_fields() - actual = r # set(list(r['md5sum'])) + actual = r print(f'DBG: test_core_hdu_fields={actual}') expected = exp.core_hdu_fields assert actual == expected @@ -139,14 +136,14 @@ def test_core_hdu_fields(self): def test_query_hdu_metadata(self): """Search HDU metadata.""" qspec = { - "outfields" : [ + "outfields": [ "fitsfile__archive_filename", "fitsfile__caldat", "fitsfile__instrument", "fitsfile__proc_type", "AIRMASS" # AUX field. Slows search ], - "search" : [ + "search": [ ["fitsfile__caldat", "2017-08-14", "2017-08-16"], ["fitsfile__instrument", "decam"], ["fitsfile__proc_type", "raw"] @@ -154,27 +151,25 @@ def test_query_hdu_metadata(self): } r = Noirlab(which='hdu').query_metadata(qspec, limit=3) - actual = r # set(list(r['md5sum'])) + actual = r print(f'DBG: test_query_hdu_metadata={actual.pformat_all()}') expected = exp.query_hdu_metadata assert actual.pformat_all() == expected - ## - ## Agnostic - ## + # ## + # ## Agnostic + # ## def test_categoricals(self): """List categories.""" r = Noirlab().categoricals() - actual = r # set(list(r['md5sum'])) + actual = r print(f'DBG: test_categoricals={actual}') expected = exp.categoricals assert actual == expected - - - ############################################################### - ### (3) Other + # ############################################################## + # ### (3) Other # get_token # retrieve/ # version @@ -186,7 +181,6 @@ def test_retrieve(self): expected = exp.retrieve assert actual == expected - def test_version(self): r = Noirlab().version() assert r < 3.0 @@ -197,6 +191,3 @@ def test_get_token(self): 'No active account found with the given credentials'} print(f'DBG: test_get_token={actual}') assert actual == expected - - - From 5b6925182bb73be07195d0663741077c89121694 Mon Sep 17 00:00:00 2001 From: Steve Pothier Date: Thu, 23 Apr 2020 07:39:16 -0700 Subject: [PATCH 08/13] advs docs plus --- docs/noirlab/noirlab.rst | 68 +++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 7 deletions(-) diff --git a/docs/noirlab/noirlab.rst b/docs/noirlab/noirlab.rst index ba91bb19c5..0061f461c2 100644 --- a/docs/noirlab/noirlab.rst +++ b/docs/noirlab/noirlab.rst @@ -6,16 +6,31 @@ NOIRLab Queries (`astroquery.noirlab`) ************************************** +The methods in this module are wrappers around a set of web-services +which can be accessed at +`Rest API documentation `_ +(which is the most +up-to-date info on the web-services). +This data archive is hosted at +`NOIR-CSDC `_. -Getting started -=============== + +Getting started (SIA) +===================== This module supports fetching the table of observation summaries from -the `NOIRLab data archive `_. The `Rest API -documentation `_ is the most -up-to-date info on the web-services used by this module. -The archive is hosted at -`NOIR-CSDC `_. +the `NOIRLab data archive `_ given +your *Region Of Interest* query values. + +In general, you can query the +`NOIRLab data archive `_ +against full FITS files or against HDUs of those FITS files. Most +users will likely prefer results against full FITS files (the +default). The search will likely be faster when searching files +compared to searching HDUs. If you are trying to retrieve HDU specific +image data from large files that contain many HDUs (such as DECam), +you can reduce your download time considerably by getting only +matching HDUs. The results are returned in a `~astropy.table.Table`. The service can be queried using the :meth:`~astroquery.noirlab.NoirlabClass.query_region`. The @@ -45,7 +60,11 @@ to query. Specify the coordinates using the appropriate coordinate system from /net/archive/mtn/20151120/kp4m/2015B-2001/k4m_151121_031258_ori.fits.fz 2015-11-21 ... 2020-02-09T01:24:37.873559+00:00 /net/archive/mtn/20151120/kp4m/2015B-2001/k4m_151121_041031_ori.fits.fz 2015-11-21 ... 2020-02-09T01:24:38.951230+00:00 +This is an example of searching by HDU. +**NOTE: Only some instruments have pipeline processing that populates the RA, DEC fields used for this search.** +.. code-block:: python + >>> noirlab_hdu = Noirlab(which='hdu') >>> results_hdu = noirlab_hdu.query_region(coord, radius='0.1') >>> print(results_hdu) @@ -62,6 +81,41 @@ to query. Specify the coordinates using the appropriate coordinate system from /net/archive/pipe/20151120/kp4m/k4m_151121_031124_ooi_zd_v1.fits.fz 2015-11-20 2015-11-21 ... 10.58549 kp4m +Advanced Search +=============== + +This set of methods supports **arbitrary searches of any fields** +stored in the FITS headers of the Archive. Common fields ("core" +fields) are optimized for search speed. Less common fields ("aux" +fields) will be slower to search. You can search by File or HDU. The +primary method for doing the search in ``query_metadata``. That query +requires a ``JSON`` structure to define the query. Many of the other +methods with this module are here to provide you with the information +you need to construct the ``JSON`` structure. + +There are three methods who's sole purpose if providing you with +information to help you with the content of your ``JSON`` structure. +They are: + +#. aux_fields() +#. core_fields() +#. categoricals() + +See the Reference/API below for details. The categoricals() method +returns a list of all the "category strings" such as names of +Instruments and Telescopes. The aux/core_fields methods +tell you what fields are available to search. The core fields are +available for all instruments are the search for them is fast. The aux +fields require you to specify instrument and proctype. The set of +fields available is highly dependent on those two fields. The +Instrument determines aux fields in raw files. Proctype determines +what kind of pipeline processing was done. Pipeline processing often +adds important (aux) fields. + + + + + Reference/API ============= From ba5e4b781f11b59a3ced4ac78f00861912000bd6 Mon Sep 17 00:00:00 2001 From: Steve Pothier Date: Thu, 23 Apr 2020 11:36:00 -0700 Subject: [PATCH 09/13] add to docs. Fix tests to match new Archive release --- astroquery/noirlab/core.py | 4 +-- astroquery/noirlab/tests/expected.py | 6 ++--- .../noirlab/tests/test_noirlab_remote.py | 7 +++--- docs/noirlab/noirlab.rst | 25 +++++++++++++++++++ 4 files changed, 34 insertions(+), 8 deletions(-) diff --git a/astroquery/noirlab/core.py b/astroquery/noirlab/core.py index 9e0bab8920..256562c61f 100644 --- a/astroquery/noirlab/core.py +++ b/astroquery/noirlab/core.py @@ -3,7 +3,7 @@ This does DB access through web-services. """ -import astropy.io.fits as pyfits +import astropy.io.fits as fits import astropy.table from ..query import BaseQuery from ..utils import async_to_sync @@ -157,7 +157,7 @@ def query_metadata(self, qspec, limit=1000, cache=True): def retrieve(self, fileid, cache=True): url = f'{self.NAT_URL}/api/retrieve/{fileid}/' - hdul = pyfits.open(url) + hdul = fits.open(url) return hdul def version(self, cache=False): diff --git a/astroquery/noirlab/tests/expected.py b/astroquery/noirlab/tests/expected.py index c8ae9a5615..14a18cf9d3 100644 --- a/astroquery/noirlab/tests/expected.py +++ b/astroquery/noirlab/tests/expected.py @@ -29,18 +29,18 @@ aux_file_fields = {'AIRMASS': 'str', 'AOS': 'str', 'ASTIG1': 'str', 'ASTIG2': 'str', 'ATTNUM': 'str', 'AVSIG': 'str', 'AVSKY': 'str', 'AZ': 'str', 'BAND': 'str', 'BCAM': 'str', 'BCAMAX': 'str', 'BCAMAY': 'str', 'BCAMAZ': 'str', 'BCAMDX': 'str', 'BCAMDY': 'str', 'BFCFIL': 'str', 'BUNIT': 'str', 'CAMSHUT': 'str', 'CAMSYM': 'str', 'CCDBIN1': 'str', 'CCDBIN2': 'str', 'CCDSEC': 'str', 'CCDSECA': 'str', 'CCDSECB': 'str', 'CENTDEC': 'str', 'CENTRA': 'str', 'CONSTVER': 'str', 'CORN1DEC': 'str', 'CORN1RA': 'str', 'CORN2DEC': 'str', 'CORN2RA': 'str', 'CORN3DEC': 'str', 'CORN3RA': 'str', 'CORN4DEC': 'str', 'CORN4RA': 'str', 'CORNDEC1': 'str', 'CORNDEC2': 'str', 'CORNDEC3': 'str', 'CORNDEC4': 'str', 'CORNRA1': 'str', 'CORNRA2': 'str', 'CORNRA3': 'str', 'CORNRA4': 'str', 'CROSSRA0': 'str', 'DARKTIME': 'str', 'DATASEC': 'str', 'DATASECA': 'str', 'DATASECB': 'str', 'DATE': 'str', 'DATE-OBS': 'str', 'DEC': 'str', 'DES_EXT': 'str', 'DESNCRAY': 'str', 'DESNSTRK': 'str', 'DESREL': 'str', 'DETSIZE': 'str', 'DHEFIRM': 'str', 'DHEINF': 'str', 'DIMM2SEE': 'str', 'DIMMSEE': 'str', 'DODX': 'str', 'DODY': 'str', 'DODZ': 'str', 'DOMEAZ': 'str', 'DOMEFLOR': 'str', 'DOMEHIGH': 'str', 'DOMELOW': 'str', 'DONUTFN1': 'str', 'DONUTFN2': 'str', 'DONUTFN3': 'str', 'DONUTFN4': 'str', 'DONUTFS1': 'str', 'DONUTFS2': 'str', 'DONUTFS3': 'str', 'DONUTFS4': 'str', 'DOXT': 'str', 'DOYT': 'str', 'DTACCOUN': 'str', 'DTACQNAM': 'str', 'DTACQUIS': 'str', 'DTCALDAT': 'str', 'DTCOPYRI': 'str', 'DTINSTRU': 'str', 'DTNSANAM': 'str', 'DTOBSERV': 'str', 'DTPI': 'str', 'DTPIAFFL': 'str', 'DTPROPID': 'str', 'DTQUEUE': 'str', 'DT_RTNAM': 'str', 'DTSITE': 'str', 'DTSTATUS': 'str', 'DTTELESC': 'str', 'DTTITLE': 'str', 'DTUTC': 'str', 'ELLIPTIC': 'str', 'EQUINOX': 'str', 'ERRORS': 'str', 'EUPSPROD': 'str', 'EUPSVER': 'str', 'EXCLUDED': 'str', 'EXPDUR': 'str', 'EXPNUM': 'str', 'EXPREQ': 'str', 'EXPTIME': 'str', 'EXTVER': 'str', 'FADX': 'str', 'FADY': 'str', 'FADZ': 'str', 'FAXT': 'str', 'FAYT': 'str', 'FILENAME': 'str', 'FILTER': 'str', 'FILTPOS': 'str', 'FRGSCALE': 'str', 'FWHM': 'str', 'FZALGOR': 'str', 'FZDTHRSD': 'str', 'FZQMETHD': 'str', 'FZQVALUE': 'str', 'G-CCDNUM': 'str', 'G-FEEDBK': 'str', 'G-FLXVAR': 'str', 'G-LATENC': 'str', 'G-MAXX': 'str', 'G-MAXY': 'str', 'G-MEANX': 'str', 'G-MEANX2': 'str', 'G-MEANXY': 'str', 'G-MEANY': 'str', 'G-MEANY2': 'str', 'G-MODE': 'str', 'G-SEEING': 'str', 'GSKYHOT': 'str', 'GSKYPHOT': 'str', 'GSKYVAR': 'str', 'G-TRANSP': 'str', 'GUIDER': 'str', 'HA': 'str', 'HDRVER': 'str', 'HEX': 'str', 'HUMIDITY': 'str', 'INSTANCE': 'str', 'INSTRUME': 'str', 'IRAF-TLM': 'str', 'LINCFIL': 'str', 'LSKYHOT': 'str', 'LSKYPHOT': 'str', 'LSKYPOW': 'str', 'LSKYVAR': 'str', 'LST': 'str', 'LUTVER': 'str', 'LWTRTEMP': 'str', 'MAGZERO': 'str', 'MAGZP': 'str', 'MAGZPT': 'str', 'MAGZUNC': 'str', 'MAIRTEMP': 'str', 'MANIFEST': 'str', 'MASS2': 'str', 'MJD-END': 'str', 'MJD-OBS': 'str', 'MOONANGL': 'str', 'MSURTEMP': 'str', 'MULTIEXP': 'str', 'MULTIFOC': 'str', 'MULTIID': 'str', 'MULTIROW': 'str', 'MULTITOT': 'str', 'NBLEED': 'str', 'NDONUTS': 'str', 'NEXTEND': 'str', 'NITE': 'str', 'NOTE': 'str', 'NPHTMTCH': 'str', 'NSATPIX': 'str', 'NUM': 'str', 'OBJECT': 'str', 'OBS-ELEV': 'str', 'OBSERVAT': 'str', 'OBSERVER': 'str', 'OBSID': 'str', 'OBS-LAT': 'str', 'OBS-LONG': 'str', 'OBSTYPE': 'str', 'ODATEOBS': 'str', 'OPENSHUT': 'str', 'ORIGIN': 'str', 'OUTTEMP': 'str', 'PHOTFLAG': 'str', 'PHOTREF': 'str', 'PIPELINE': 'str', 'PIXSCAL1': 'str', 'PIXSCAL2': 'str', 'PLARVER': 'str', 'PLDNAME': 'str', 'PLDSID': 'str', 'PLFNAME': 'str', 'PLPROCID': 'str', 'PLQNAME': 'str', 'PLQUEUE': 'str', 'PLVER': 'str', 'PME-TEMP': 'str', 'PMN-TEMP': 'str', 'PMOSTEMP': 'str', 'PMS-TEMP': 'str', 'PMW-TEMP': 'str', 'PRESSURE': 'str', 'PROCTYPE': 'str', 'PRODTYPE': 'str', 'PROGRAM': 'str', 'PROPID': 'str', 'PROPOSER': 'str', 'PUPILAMP': 'str', 'PUPILMAX': 'str', 'PUPILSKY': 'str', 'PUPMAX': 'str', 'PV1_6': 'str', 'PV2_4': 'str', 'RA': 'str', 'RA_CENT': 'str', 'RACMAX': 'str', 'RACMIN': 'str', 'RADECSYS': 'str', 'RADESYS': 'str', 'RADIUS': 'str', 'RADSTD': 'str', 'RECNO': 'str', 'REQNUM': 'str', 'RMCOUNT': 'str', 'SB_ACCOU': 'str', 'SB_DIR1': 'str', 'SB_DIR2': 'str', 'SB_DIR3': 'str', 'SB_HOST': 'str', 'SB_ID': 'str', 'SB_LOCAL': 'str', 'SB_NAME': 'str', 'SB_RECNO': 'str', 'SB_RTNAM': 'str', 'SB_SITE': 'str', 'SCAMPCHI': 'str', 'SCAMPFLG': 'str', 'SCAMPNUM': 'str', 'SCAMPREF': 'str', 'SEQID': 'str', 'SEQNUM': 'str', 'SEQTOT': 'str', 'SEQTYPE': 'str', 'SISPIVER': 'str', 'SKYBRITE': 'str', 'SKYORDER': 'str', 'SKYPC00': 'str', 'SKYPC01': 'str', 'SKYPC02': 'str', 'SKYPC03': 'str', 'SKYSIGMA': 'str', 'SKYSTAT': 'str', 'SKYSUB': 'str', 'SKYSUB01': 'str', 'SKYSUB10': 'str', 'SKYSUBP': 'str', 'SKYUPDAT': 'str', 'SLOT01': 'str', 'SLOT03': 'str', 'SURVEYID': 'str', 'TELDEC': 'str', 'TELEQUIN': 'str', 'TELESCOP': 'str', 'TELFOCUS': 'str', 'TELRA': 'str', 'TELSTAT': 'str', 'TILING': 'str', 'TIME-OBS': 'str', 'TIMESYS': 'str', 'TRACKING': 'str', 'UNITNAME': 'str', 'UPTRTEMP': 'str', 'UTE-TEMP': 'str', 'UTN-TEMP': 'str', 'UTS-TEMP': 'str', 'UTW-TEMP': 'str', 'VALIDA': 'str', 'VALIDB': 'str', 'VSUB': 'str', 'WCSCAL': 'str', 'WINDDIR': 'str', 'WINDSPD': 'str', 'XTALKFIL': 'str', 'ZD': 'str', 'ZPDELDEC': 'str', 'ZPDELRA': 'str'} -core_file_fields = {'archive_filename': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'caldat': ['datetime64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.'], 'date_obs_max': ['datetime64', 'val_overlap', 'Match of value as range against DB value range type.'], 'date_obs_min': ['datetime64', 'val_overlap', 'Match of value as range against DB value range type.'], 'dec_max': ['np.float64', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'dec_min': ['np.float64', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'depth': ['np.float64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.'], 'exposure': ['np.float64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.'], 'filesize': ['np.int64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.'], 'ifilter': ['category', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'instrument': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'md5sum': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'obs_mode': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'obs_type': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'original_filename': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'proc_type': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'prod_type': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'proposal': ['category', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'ra_max': ['np.float64', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'ra_min': ['np.float64', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'release_date': ['datetime64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.'], 'seeing': ['np.float64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.'], 'site': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'survey': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'telescope': ['category', 'val_one_of', 'Match of value against list of acceptables.'], 'updated': ['datetime64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.']} +core_file_fields = [{'Field': 'archive_filename', 'Type': 'str'}, {'Field': 'caldat', 'Type': 'datetime64'}, {'Field': 'date_obs_max', 'Type': 'datetime64'}, {'Field': 'date_obs_min', 'Type': 'datetime64'}, {'Field': 'dec_max', 'Type': 'np.float64'}, {'Field': 'dec_min', 'Type': 'np.float64'}, {'Field': 'depth', 'Type': 'np.float64'}, {'Field': 'exposure', 'Type': 'np.float64'}, {'Field': 'filesize', 'Type': 'np.int64'}, {'Field': 'ifilter', 'Type': 'category'}, {'Field': 'instrument', 'Type': 'category'}, {'Field': 'md5sum', 'Type': 'str'}, {'Field': 'obs_mode', 'Type': 'category'}, {'Field': 'obs_type', 'Type': 'category'}, {'Field': 'original_filename', 'Type': 'str'}, {'Field': 'proc_type', 'Type': 'category'}, {'Field': 'prod_type', 'Type': 'category'}, {'Field': 'proposal', 'Type': 'category'}, {'Field': 'ra_max', 'Type': 'np.float64'}, {'Field': 'ra_min', 'Type': 'np.float64'}, {'Field': 'release_date', 'Type': 'datetime64'}, {'Field': 'seeing', 'Type': 'np.float64'}, {'Field': 'site', 'Type': 'category'}, {'Field': 'survey', 'Type': 'category'}, {'Field': 'telescope', 'Type': 'category'}, {'Field': 'updated', 'Type': 'datetime64'}] query_file_metadata = [' archive_filename instrument md5sum original_filename proc_type url ', '----------------------------------------------------------------------------- ---------- -------------------------------- ------------------------------------------------------------------------------------- --------- ----------------------------------------------------------------------------', '/net/archive/pipe/20161024/ct4m/2012B-0001/c4d_161025_034649_oki_z_v2.fits.fz decam 0000f0c5015263610a75f0affed377d0 /net/decdata1/deccp/NHPPS_DATA/DCP/Final/Submitted/c4d_161025_034649_oki_z_v2.fits.fz skysub https://astroarchive.noao.edu/api/retrieve/0000f0c5015263610a75f0affed377d0/', '/net/archive/pipe/20160928/ct4m/2012B-0001/c4d_160929_090838_ooi_z_v2.fits.fz decam 0001e5a5bcf039ebf0c53a6da32e8888 /net/decdata1/deccp/NHPPS_DATA/DCP/Final/Submitted/c4d_160929_090838_ooi_z_v2.fits.fz instcal https://astroarchive.noao.edu/api/retrieve/0001e5a5bcf039ebf0c53a6da32e8888/', '/net/archive/pipe/20160909/ct4m/2012B-0001/c4d_160910_062930_opd_z_v2.fits.fz decam 0003a1c853de73fc1796d2d7d77ca9cd /net/decdata1/deccp/NHPPS_DATA/DCP/Final/Submitted/c4d_160910_062930_opd_z_v2.fits.fz resampled https://astroarchive.noao.edu/api/retrieve/0003a1c853de73fc1796d2d7d77ca9cd/'] aux_hdu_fields = {'AMPBAL': 'str', 'AMPSECA': 'str', 'AMPSECB': 'str', 'ARAWGAIN': 'str', 'AVSIG': 'str', 'AVSKY': 'str', 'BIASFIL': 'str', 'BLDINTRP': 'str', 'BPM': 'str', 'BPMFIL': 'str', 'CATALOG': 'str', 'CCDNUM': 'str', 'CCDSECA': 'str', 'CCDSECB': 'str', 'CD1_1': 'str', 'CD1_2': 'str', 'CD2_1': 'str', 'CD2_2': 'str', 'CENDEC1': 'str', 'CENRA1': 'str', 'COR1DEC1': 'str', 'COR1RA1': 'str', 'COR2DEC1': 'str', 'COR2RA1': 'str', 'COR3DEC1': 'str', 'COR3RA1': 'str', 'COR4DEC1': 'str', 'COR4RA1': 'str', 'CROSSRA0': 'str', 'CRPIX1': 'str', 'CRPIX2': 'str', 'CRVAL1': 'str', 'CRVAL2': 'str', 'CTYPE1': 'str', 'CTYPE2': 'str', 'CUNIT1': 'str', 'CUNIT2': 'str', 'D0034494': 'str', 'D0034496': 'str', 'D0034497': 'str', 'DATASEC': 'str', 'DATASECA': 'str', 'DATASECB': 'str', 'DATE': 'str', 'DEC': 'str', 'DEC1': 'str', 'DEC13A_2': 'str', 'DEC13B_2': 'str', 'DEC14A_2': 'str', 'DEC15A_2': 'str', 'DEC15B_2': 'str', 'DEC16A_2': 'str', 'DEC16B_2': 'str', 'DEC17A_2': 'str', 'DEC17B_2': 'str', 'DEC18A_2': 'str', 'DEC18B_2': 'str', 'DEC18B_R': 'str', 'DEC18B_S': 'str', 'DEC19A_2': 'str', 'DEC19A_A': 'str', 'DEC19A_D': 'str', 'DEC19A_J': 'str', 'DEC19A_K': 'str', 'DEC19A_L': 'str', 'DEC19A_M': 'str', 'DEC19A_P': 'str', 'DEC19A_S': 'str', 'DEC19A_T': 'str', 'DEC19A_W': 'str', 'DEC19B_2': 'str', 'DEC19B_A': 'str', 'DEC19B_C': 'str', 'DEC19B_D': 'str', 'DEC19B_F': 'str', 'DEC19B_H': 'str', 'DEC19B_I': 'str', 'DEC19B_J': 'str', 'DEC19B_K': 'str', 'DEC19B_L': 'str', 'DEC19B_M': 'str', 'DEC19B_P': 'str', 'DEC19B_R': 'str', 'DEC19B_S': 'str', 'DEC19B_T': 'str', 'DEC19B_W': 'str', 'DEC20A_A': 'str', 'DEC20A_C': 'str', 'DEC20A_F': 'str', 'DEC20A_J': 'str', 'DEC20A_K': 'str', 'DEC20A_L': 'str', 'DEC20A_M': 'str', 'DEC20A_S': 'str', 'DEC20A_T': 'str', 'DEC20B_T': 'str', 'DECALS_2': 'str', 'DECALS_D': 'str', 'DECC1': 'str', 'DECC2': 'str', 'DECC3': 'str', 'DECC4': 'str', 'DEC_CENT': 'str', 'DECCMAX': 'str', 'DECCMIN': 'str', 'DES14B_2': 'str', 'DES15B_2': 'str', 'DES16B_2': 'str', 'DES17A_2': 'str', 'DES17B_2': 'str', 'DES18A_2': 'str', 'DES18B_2': 'str', 'DESBFC': 'str', 'DESBIAS': 'str', 'DESBLEED': 'str', 'DESBPM': 'str', 'DESCRMSK': 'str', 'DESDCXTK': 'str', 'DESDMCR': 'str', 'DES_EXT': 'str', 'DESFIXC': 'str', 'DESFLAT': 'str', 'DESFNAME': 'str', 'DESFRING': 'str', 'DESGAINC': 'str', 'DESILLUM': 'str', 'DESIMMSK': 'str', 'DESLINC': 'str', 'DESNCRAY': 'str', 'DESNSTRK': 'str', 'DESOSCN': 'str', 'DESPHOTF': 'str', 'DESPUPC': 'str', 'DESSAT': 'str', 'DESSKYSB': 'str', 'DESSTAR': 'str', 'DETECTOR': 'str', 'DETPOS': 'str', 'DETSEC': 'str', 'DETSECA': 'str', 'DETSECB': 'str', 'ELLIPTIC': 'str', 'ENG17B_2': 'str', 'ENG18A_2': 'str', 'ENG18B_2': 'str', 'EXPTIME': 'str', 'EXTNAME': 'str', 'EXTVER': 'str', 'FILTER': 'str', 'FIXCFIL': 'str', 'FIXPIX': 'str', 'FIXPIX02': 'str', 'FLATFIL': 'str', 'FLATMEDA': 'str', 'FLATMEDB': 'str', 'FPA': 'str', 'FRGSCALE': 'str', 'FRINGE': 'str', 'FRINGFIL': 'str', 'FWHM': 'str', 'FWHMP1': 'str', 'FZALGOR': 'str', 'FZDTHRSD': 'str', 'FZQMETHD': 'str', 'FZQVALUE': 'str', 'GAINA': 'str', 'GAINB': 'str', 'GCOUNT': 'str', 'ILLCOR': 'str', 'ILLMASK': 'str', 'ILLUMCOR': 'str', 'ILLUMFIL': 'str', 'INHERIT': 'str', 'IRAF-TLM': 'str', 'LAGER_20': 'str', 'LTM1_1': 'str', 'LTM1_2': 'str', 'LTM2_1': 'str', 'LTM2_2': 'str', 'LTV1': 'str', 'LTV2': 'str', 'MAGZERO1': 'str', 'MAGZUNC1': 'str', 'NAXIS1': 'str', 'NAXIS2': 'str', 'NBLEED': 'str', 'NSATPIX': 'str', 'OBJECT': 'str', 'OBJMASK': 'str', 'ORIGIN': 'str', 'PCOUNT': 'str', 'PHOTFLAG': 'str', 'PUPFIL': 'str', 'PUPILAMP': 'str', 'PUPILSKY': 'str', 'PUPMAX': 'str', 'PV1_0': 'str', 'PV1_1': 'str', 'PV1_10': 'str', 'PV1_2': 'str', 'PV1_3': 'str', 'PV1_4': 'str', 'PV1_5': 'str', 'PV1_6': 'str', 'PV1_7': 'str', 'PV1_8': 'str', 'PV1_9': 'str', 'PV2_0': 'str', 'PV2_1': 'str', 'PV2_10': 'str', 'PV2_2': 'str', 'PV2_3': 'str', 'PV2_4': 'str', 'PV2_5': 'str', 'PV2_6': 'str', 'PV2_7': 'str', 'PV2_8': 'str', 'PV2_9': 'str', 'RA': 'str', 'RA1': 'str', 'RAC1': 'str', 'RAC2': 'str', 'RAC3': 'str', 'RAC4': 'str', 'RA_CENT': 'str', 'RACMAX': 'str', 'RACMIN': 'str', 'RDNOISEA': 'str', 'RDNOISEB': 'str', 'REQ13B_2': 'str', 'REQ13B_H': 'str', 'REQ14B_2': 'str', 'REQ14B_K': 'str', 'REQ15B_S': 'str', 'REQ16A_S': 'str', 'REQ18B_B': 'str', 'REQ19A_2': 'str', 'REQ19A_P': 'str', 'SATURATA': 'str', 'SATURATB': 'str', 'SATURATE': 'str', 'SKYBRITE': 'str', 'SKYIM': 'str', 'SKYSBFIL': 'str', 'SKYSIGMA': 'str', 'SKYSUB': 'str', 'SKYSUB00': 'str', 'SKYVARA': 'str', 'SKYVARB': 'str', 'SLOT00': 'str', 'SLOT01': 'str', 'SLOT02': 'str', 'SLOT03': 'str', 'SLOT04': 'str', 'SLOT05': 'str', 'STARFIL': 'str', 'STARMASK': 'str', 'TOO15A_2': 'str', 'TOO15B_2': 'str', 'TOO16A_2': 'str', 'TOO16B_2': 'str', 'TOO17B_2': 'str', 'TOO18A_2': 'str', 'TOO18A_S': 'str', 'TOO18B_2': 'str', 'TOO19A_2': 'str', 'TOO19A_G': 'str', 'TOO19A_K': 'str', 'TOO19A_M': 'str', 'TOO19B_M': 'str', 'TOO20A_M': 'str', 'WAT0_001': 'str', 'WAT1_001': 'str', 'WAT2_001': 'str', 'WCSAXES': 'str', 'WCSDIM': 'str', 'WTMAP': 'str', 'XTENSION': 'str', 'ZDITHER0': 'str'} -core_hdu_fields = {'boundary': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'dec': ['np.float64', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'dec_range': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__archive_filename': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__caldat': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__date_obs_max': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__date_obs_min': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__dec_max': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__dec_min': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__depth': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__exposure': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__filesize': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__ifilter': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__instrument': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__md5sum': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__obs_mode': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__obs_type': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__original_filename': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__proc_type': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__prod_type': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__proposal': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__ra_max': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__ra_min': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__release_date': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__seeing': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__site': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__survey': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__telescope': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'fitsfile__updated': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'hdu_idx': ['np.int64', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'id': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'ra': ['np.float64', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'ra_range': ['str', 'val_string', 'Search a string field. Search spec is of form: VALUE, MODIFIER\nwhere MODIFIER is one of:\n exact,iexact :: exact match \n startswith,istartswith :: Starts with VALUE as substring.\n endswith,iendswith :: Ends with substring.\n contains,icontains :: VALUE is substring in field.\n regex,iregex :: VALUE is regular expression that matches field\nDefault MODIFIER = exact\ni means case-Insensitive match'], 'updated': ['datetime64', 'val_in_range', 'Generalized match against value (dates,numbers,characters) in an interval.']} +core_hdu_fields = [{'Field': 'boundary', 'Type': 'str'}, {'Field': 'dec', 'Type': 'np.float64'}, {'Field': 'dec_range', 'Type': 'str'}, {'Field': 'fitsfile', 'Type': 'str'}, {'Field': 'fitsfile__archive_filename', 'Type': 'str'}, {'Field': 'fitsfile__caldat', 'Type': 'str'}, {'Field': 'fitsfile__date_obs_max', 'Type': 'str'}, {'Field': 'fitsfile__date_obs_min', 'Type': 'str'}, {'Field': 'fitsfile__dec_max', 'Type': 'str'}, {'Field': 'fitsfile__dec_min', 'Type': 'str'}, {'Field': 'fitsfile__depth', 'Type': 'str'}, {'Field': 'fitsfile__exposure', 'Type': 'str'}, {'Field': 'fitsfile__filesize', 'Type': 'str'}, {'Field': 'fitsfile__ifilter', 'Type': 'str'}, {'Field': 'fitsfile__instrument', 'Type': 'str'}, {'Field': 'fitsfile__md5sum', 'Type': 'str'}, {'Field': 'fitsfile__obs_mode', 'Type': 'str'}, {'Field': 'fitsfile__obs_type', 'Type': 'str'}, {'Field': 'fitsfile__original_filename', 'Type': 'str'}, {'Field': 'fitsfile__proc_type', 'Type': 'str'}, {'Field': 'fitsfile__prod_type', 'Type': 'str'}, {'Field': 'fitsfile__proposal', 'Type': 'str'}, {'Field': 'fitsfile__ra_max', 'Type': 'str'}, {'Field': 'fitsfile__ra_min', 'Type': 'str'}, {'Field': 'fitsfile__release_date', 'Type': 'str'}, {'Field': 'fitsfile__seeing', 'Type': 'str'}, {'Field': 'fitsfile__site', 'Type': 'str'}, {'Field': 'fitsfile__survey', 'Type': 'str'}, {'Field': 'fitsfile__telescope', 'Type': 'str'}, {'Field': 'fitsfile__updated', 'Type': 'str'}, {'Field': 'hdu_idx', 'Type': 'np.int64'}, {'Field': 'id', 'Type': 'str'}, {'Field': 'ra', 'Type': 'np.float64'}, {'Field': 'ra_range', 'Type': 'str'}, {'Field': 'updated', 'Type': 'datetime64'}] query_hdu_metadata = ['AIRMASS fitsfile__archive_filename fitsfile__caldat fitsfile__instrument fitsfile__proc_type', '------- ----------------------------------------------------------------------- ---------------- -------------------- -------------------', ' None /net/archive/mtn/20170814/ct4m/2012B-0001/c4d_170815_051354_ori.fits.fz 2017-08-14 decam raw', ' None /net/archive/mtn/20170814/ct4m/2012B-0001/c4d_170815_051354_ori.fits.fz 2017-08-14 decam raw', ' None /net/archive/mtn/20170814/ct4m/2012B-0001/c4d_170815_051354_ori.fits.fz 2017-08-14 decam raw'] -categoricals = {'collections': [], 'instruments': ['(p)odi', '90prime', 'andicam', 'arcoiris', 'arcon', 'bench', 'ccd_imager', 'chiron', 'cosmos', 'decam', 'echelle', 'falmingos', 'flamingos', 'goodman', 'goodman spectrograph', 'gtcam', 'hdi', 'ice', 'ispi', 'kosmos', 'minimo/ice', 'mop/ice', 'mosaic', 'mosaic3', 'mosaic_1', 'mosaic_1_1', 'mosaic_2', 'newfirm', 'osiris', 'sami', 'soi', 'spartan', 'spartan ir camera', 'triplespec', 'wfc', 'whirc', 'wildfire', 'y4kcam'], 'obsmodes': [], 'proctypes': ['instcal', 'mastercal', 'nota', 'projected', 'raw', 'resampled', 'skysub', 'stacked'], 'prodtypes': ['dqmask', 'expmap', 'graphics (size)', 'image', 'image 2nd version 1', 'image1', 'nota', 'resampled', 'weight', 'wtmap'], 'sites': ['cp', 'ct', 'kp', 'lp'], 'surveys': [], 'telescopes': ['bok23m', 'ct09m', 'ct13m', 'ct15m', 'ct1m', 'ct4m', 'ctlab', 'kp09m', 'kp21m', 'kp35m', 'kp4m', 'kpcf', 'lp25m', 'soar', 'wiyn']} +categoricals = {'instruments': ['(p)odi', '90prime', 'andicam', 'arcoiris', 'arcon', 'bench', 'ccd_imager', 'chiron', 'cosmos', 'decam', 'echelle', 'falmingos', 'flamingos', 'goodman', 'goodman spectrograph', 'gtcam', 'hdi', 'ice', 'ispi', 'kosmos', 'minimo/ice', 'mop/ice', 'mosaic', 'mosaic3', 'mosaic_1', 'mosaic_1_1', 'mosaic_2', 'newfirm', 'osiris', 'sami', 'soi', 'spartan', 'spartan ir camera', 'triplespec', 'wfc', 'whirc', 'wildfire', 'y4kcam'], 'obsmodes': [], 'proctypes': ['instcal', 'mastercal', 'nota', 'projected', 'raw', 'resampled', 'skysub', 'stacked'], 'prodtypes': ['dqmask', 'expmap', 'graphics (size)', 'image', 'image 2nd version 1', 'image1', 'nota', 'resampled', 'weight', 'wtmap'], 'sites': ['cp', 'ct', 'kp', 'lp'], 'surveys': [], 'telescopes': ['bok23m', 'ct09m', 'ct13m', 'ct15m', 'ct1m', 'ct4m', 'ctlab', 'kp09m', 'kp21m', 'kp35m', 'kp4m', 'kpcf', 'lp25m', 'soar', 'wiyn']} retrieve = ['SIMPLE', 'BITPIX', 'NAXIS', 'EXTEND', 'ORIGIN', 'DATE', 'IRAF-TLM', 'OBJECT', 'RAWFILE', 'FILENAME', 'OBJRA', 'OBJDEC', 'OBJEPOCH', '', 'TIMESYS', '', 'OBSERVAT', 'OBS-ELEV', 'OBS-LAT', 'OBS-LONG', 'TELESCOP', 'TELRADEC', 'TELEQUIN', 'TELRA', 'TELDEC', 'HA', 'ZD', 'TELFOCUS', '', 'MOSSIZE', 'NDETS', '', 'OBSERVER', 'PROPOSER', 'PROPID', 'SEQID', 'SEQNUM', '', 'NOHS', 'NOCUTC', 'NOCRSD', 'NOCGID', 'NOCNAME', '', 'DTSITE', 'DTTELESC', 'DTINSTRU', 'DTCALDAT', 'DTUTC', 'DTOBSERV', 'DTPROPID', 'DTPI', 'DTPIAFFL', 'DTTITLE', 'DTCOPYRI', 'DTACQUIS', 'DTACCOUN', 'DTACQNAM', 'DTNSANAM', 'DTSTATUS', 'SB_HOST', 'SB_ACCOU', 'SB_SITE', 'SB_LOCAL', 'SB_DIR1', 'SB_DIR2', 'SB_DIR3', 'SB_RECNO', 'SB_ID', 'SB_NAME', 'RMCOUNT', 'RECNO', 'INSTRUME', 'RSPTGRP', 'RSPGRP', '', 'OBSTYPE', 'PROCTYPE', 'PRODTYPE', 'MIMETYPE', 'EXPTIME', 'FILTER', '', 'RA', 'DEC', 'CENTRA', 'CORN1RA', 'CORN2RA', 'CORN3RA', 'CORN4RA', 'CENTDEC', 'CORN1DEC', 'CORN2DEC', 'CORN3DEC', 'CORN4DEC', 'DATE-OBS', 'TIME-OBS', 'MJD-OBS', 'ST', '', 'CTYPE1', 'CTYPE2', 'CRVAL1', 'CRVAL2', 'CD1_1', 'CD2_2', 'WAT0_001', 'WAT1_001', 'WAT2_001', '', 'DIGAVGS', 'NCOADD', 'FSAMPLE', 'EXPCOADD', 'TITLE', 'DARKFIL', 'DARKINFO', 'LINIMAGE', 'LINCOEFF', 'BUNIT', 'GAIN', 'OEXPTIME', 'MAGZREF', 'PHOTINDX', 'WCSCAL', 'WCSXRMS', 'WCSYRMS', 'MAGZERO', '', 'MAGZSIG', 'MAGZERR', 'MAGZNAV', 'SEEINGP', 'SKYBG', 'SEEING', 'SKYMAG', 'STKBPM', 'OBJBPM', 'CDELT1', 'CDELT2', 'CRPIX1', 'CRPIX2', 'BPM', 'IMCMB001', 'IMCMB002', 'IMCMB003', 'IMCMB004', 'IMCMB005', 'IMCMB006', 'IMCMB007', 'IMCMB008', 'IMCMB009', 'IMCMB010', 'IMCMB011', 'IMCMB012', 'IMCMB013', 'IMCMB014', 'IMCMB015', 'IMCMB016', 'IMCMB017', 'IMCMB018', 'IMCMB019', 'IMCMB020', 'IMCMB021', 'IMCMB022', 'IMCMB023', 'IMCMB024', 'IMCMB025', 'IMCMB026', 'IMCMB027', 'IMCMB028', 'IMCMB029', 'IMCMB030', 'IMCMB031', 'IMCMB032', 'IMCMB033', 'IMCMB034', 'IMCMB035', 'IMCMB036', 'IMCMB037', 'IMCMB038', 'IMCMB039', 'IMCMB040', 'IMCMB041', 'IMCMB042', 'IMCMB043', 'IMCMB044', 'IMCMB045', 'IMCMB046', 'IMCMB047', 'IMCMB048', 'IMCMB049', 'IMCMB050', 'IMCMB051', 'IMCMB052', 'IMCMB053', 'IMCMB054', 'IMCMB055', 'IMCMB056', 'IMCMB057', 'IMCMB058', 'IMCMB059', 'IMCMB060', 'IMCMB061', 'IMCMB062', 'IMCMB063', 'IMCMB064', 'IMCMB065', 'IMCMB066', 'IMCMB067', 'IMCMB068', 'IMCMB069', 'IMCMB070', 'IMCMB071', 'IMCMB072', 'IMCMB073', 'IMCMB074', 'IMCMB075', 'IMCMB076', 'IMCMB077', 'IMCMB078', 'IMCMB079', 'IMCMB080', 'IMCMB081', 'IMCMB082', 'IMCMB083', 'IMCMB084', 'IMCMB085', 'IMCMB086', 'IMCMB087', 'IMCMB088', 'IMCMB089', 'IMCMB090', 'IMCMB091', 'IMCMB092', 'IMCMB093', 'IMCMB094', 'IMCMB095', 'IMCMB096', 'IMCMB097', 'IMCMB098', 'IMCMB099', 'IMCMB100', 'IMCMB101', 'IMCMB102', 'IMCMB103', 'IMCMB104', 'IMCMB105', 'IMCMB106', 'IMCMB107', 'IMCMB108', 'WMETHOD', 'DQAREA', 'DQEXPMAX', 'DQNOIS', 'DQPDPS', 'DQPDAP', 'DQPDPX', 'DQFWHM', 'DQMZ', 'DQSKY', 'DQSKYXGD', 'DQSKYYGD', 'DQMXTIME', 'DQHFTIME', 'DQMXAREA', 'DQHFAREA', 'DQMXFRAC', 'DQHFFRAC', 'DQMXNOIS', 'DQHFNOIS', 'DQMXPDPS', 'DQHFPDPS', 'DQMXPDAP', 'DQHFPDAP', 'DQMXPDPX', 'DQHFPDPX', 'DQSEEMID', 'DQSEESIG', 'DQSEEMIN', 'DQSEEMAX', 'DQSKYMID', 'DQSKYSIG', 'DQSKYMIN', 'DQSKYMAX', 'DQMASK', 'FILTID', 'PHOTBW', 'PHOTFWHM', 'PHOTCLAM', '', 'PIPELINE', 'PLVER', 'EXPMAP', 'ASTRMCAT', 'EFFTIME', 'WCSAXES', 'PLDNAME', '', 'PLQUEUE', 'PLQNAME', 'PLPROCID', 'PLFNAME', 'PLOFNAME', 'DQMFOR', 'PLPROPID', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'CHECKSUM', 'DATASUM'] diff --git a/astroquery/noirlab/tests/test_noirlab_remote.py b/astroquery/noirlab/tests/test_noirlab_remote.py index c6092c210c..9de42a708e 100644 --- a/astroquery/noirlab/tests/test_noirlab_remote.py +++ b/astroquery/noirlab/tests/test_noirlab_remote.py @@ -80,6 +80,7 @@ def test_aux_file_fields(self): """List the available AUX FILE fields.""" r = Noirlab().aux_fields('decam', 'instcal') actual = r + # Returned results may increase over time. print(f'DBG: test_aux_file_fields={actual}') expected = exp.aux_file_fields assert actual == expected @@ -121,6 +122,7 @@ def test_aux_hdu_fields(self): """List the available AUX HDU fields.""" r = Noirlab(which='hdu').aux_fields('decam', 'instcal') actual = r + # Returned results may increase over time. print(f'DBG: test_aux_hdu_fields={actual}') expected = exp.aux_hdu_fields assert actual == expected @@ -129,7 +131,7 @@ def test_core_hdu_fields(self): """List the available CORE HDU fields.""" r = Noirlab(which='hdu').core_fields() actual = r - print(f'DBG: test_core_hdu_fields={actual}') + print(f'DBG: test_core_file_fields={actual}') expected = exp.core_hdu_fields assert actual == expected @@ -164,6 +166,7 @@ def test_categoricals(self): """List categories.""" r = Noirlab().categoricals() actual = r + # Returned results may increase over time. print(f'DBG: test_categoricals={actual}') expected = exp.categoricals assert actual == expected @@ -177,7 +180,6 @@ def test_categoricals(self): def test_retrieve(self): hdul = Noirlab().retrieve('f92541fdc566dfebac9e7d75e12b5601') actual = list(hdul[0].header.keys()) - print(f'DBG: test_retrieve={actual}') expected = exp.retrieve assert actual == expected @@ -189,5 +191,4 @@ def test_get_token(self): actual = Noirlab().get_token('nobody@university.edu', '123456789') expected = {'detail': 'No active account found with the given credentials'} - print(f'DBG: test_get_token={actual}') assert actual == expected diff --git a/docs/noirlab/noirlab.rst b/docs/noirlab/noirlab.rst index 0061f461c2..cea985efba 100644 --- a/docs/noirlab/noirlab.rst +++ b/docs/noirlab/noirlab.rst @@ -2,6 +2,31 @@ .. _astroquery.noirlab: +************************************ +About the NOIRLab Astro Data Archive +************************************ + +The NOIRLab Astro Data Archive (formerly NOAO Science Archive) +provides access to data taken with more than 40 telescope and +instrument combinations, including those operated in partnership with +the WIYN, SOAR and SMARTS consortia, from semester 2004B to the +present. In addition to raw data, pipeline-reduced data products from +the DECam, Mosaic and NEWFIRM imagers are also available, as well as +advanced data products delivered by teams carrying out surveys and +other large observing programs with NSF OIR Lab facilities. + +For more info about our holdings see the +`NOIRLab Astro Data Archive `_ + +Acknowledgment +============== + +This research uses services or data provided by the Astro Data Archive +at NSF's National Optical-Infrared Astronomy Research +Laboratory. NSF's OIR Lab is operated by the Association of +Universities for Research in Astronomy (AURA), Inc. under a +cooperative agreement with the National Science Foundation. + ************************************** NOIRLab Queries (`astroquery.noirlab`) ************************************** From 613afaa504c64a3c84d33951a5d559218738476d Mon Sep 17 00:00:00 2001 From: Steve Pothier Date: Tue, 28 Apr 2020 12:45:59 -0700 Subject: [PATCH 10/13] add links to search spec web pages --- docs/noirlab/noirlab.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/noirlab/noirlab.rst b/docs/noirlab/noirlab.rst index cea985efba..1a96cd8cd4 100644 --- a/docs/noirlab/noirlab.rst +++ b/docs/noirlab/noirlab.rst @@ -114,9 +114,15 @@ stored in the FITS headers of the Archive. Common fields ("core" fields) are optimized for search speed. Less common fields ("aux" fields) will be slower to search. You can search by File or HDU. The primary method for doing the search in ``query_metadata``. That query -requires a ``JSON`` structure to define the query. Many of the other +requires a ``JSON`` structure to define the query. We often call this +the *JSON search spec*. Many of the other methods with this module are here to provide you with the information you need to construct the ``JSON`` structure. +Summaries of the mechanisms available in the JSON search spec for +`File search `_ +and for `HDU search +`_ +are on the NOIRLab Data Archive website. There are three methods who's sole purpose if providing you with information to help you with the content of your ``JSON`` structure. From ea05e5553f58f5e8658091d86b6d7ea309feb86c Mon Sep 17 00:00:00 2001 From: "S. Pothier" Date: Fri, 1 May 2020 13:13:43 -0700 Subject: [PATCH 11/13] Update docs/noirlab/noirlab.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Brigitta Sipőcz --- docs/noirlab/noirlab.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/noirlab/noirlab.rst b/docs/noirlab/noirlab.rst index 1a96cd8cd4..3b8534e92a 100644 --- a/docs/noirlab/noirlab.rst +++ b/docs/noirlab/noirlab.rst @@ -86,7 +86,9 @@ to query. Specify the coordinates using the appropriate coordinate system from /net/archive/mtn/20151120/kp4m/2015B-2001/k4m_151121_041031_ori.fits.fz 2015-11-21 ... 2020-02-09T01:24:38.951230+00:00 This is an example of searching by HDU. -**NOTE: Only some instruments have pipeline processing that populates the RA, DEC fields used for this search.** +.. note:: + + Only some instruments have pipeline processing that populates the RA, DEC fields used for this search. .. code-block:: python From 5bea6d773acf246a1a3f8e212a050bfeea922e15 Mon Sep 17 00:00:00 2001 From: Steve Pothier Date: Wed, 13 May 2020 10:02:49 -0700 Subject: [PATCH 12/13] use async --- astroquery/noirlab/core.py | 61 ++++++++++++++++++++++++++++ astroquery/noirlab/tests/expected.py | 4 +- 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/astroquery/noirlab/core.py b/astroquery/noirlab/core.py index 256562c61f..7e9ed3cf29 100644 --- a/astroquery/noirlab/core.py +++ b/astroquery/noirlab/core.py @@ -109,6 +109,67 @@ def query_region(self, coordinate, radius=0.1, cache=True): response.raise_for_status() return astropy.table.Table(data=response.json()) + # #!def query_region(self, coordinate, radius=0.1, cache=True): + # #! """Query for NOIRLab observations by region of the sky. + # #! + # #! Given a sky coordinate and radius, returns a `~astropy.table.Table` + # #! of NOIRLab observations. + # #! + # #! Parameters + # #! ---------- + # #! coordinates : str or `~astropy.coordinates` object + # #! The target region which to search. It may be specified as a + # #! string or as the appropriate `~astropy.coordinates` object. + # #! radius : str or `~astropy.units.Quantity` object, optional + # #! Default 0.1 degrees. + # #! The string must be parsable by `~astropy.coordinates.Angle`.The + # #! appropriate `~astropy.units.Quantity` object from + # #! `~astropy.units` may also be used. + # #! + # #! Returns + # #! ------- + # #! response : `~astropy.table.Table` + # #! """ + # #! self._validate_version() + # #! ra, dec = coordinate.to_string('decimal').split() + # #! url = f'{self.siaurl}?POS={ra},{dec}&SIZE={radius}&format=json' + # #! response = self._request('GET', url, + # #! timeout=self.TIMEOUT, + # #! cache=cache) + # #! response.raise_for_status() + # #! return astropy.table.Table(data=response.json()) + + def query_region_async(self, coordinate, radius=0.1, cache=True): + """Query for NOIRLab observations by region of the sky. + + Given a sky coordinate and radius, returns a `~astropy.table.Table` + of NOIRLab observations. + + Parameters + ---------- + coordinates : str or `~astropy.coordinates` object + The target region which to search. It may be specified as a + string or as the appropriate `~astropy.coordinates` object. + radius : str or `~astropy.units.Quantity` object, optional + Default 0.1 degrees. + The string must be parsable by `~astropy.coordinates.Angle`. The + appropriate `~astropy.units.Quantity` object from + `~astropy.units` may also be used. + + Returns + ------- + response : `requests.Response` + """ + self._validate_version() + + ra, dec = coordinate.to_string('decimal').split() + url = f'{self.siaurl}?POS={ra},{dec}&SIZE={radius}&format=json' + response = self._request('GET', url, + timeout=self.TIMEOUT, + cache=cache) + response.raise_for_status() + return response + def core_fields(self, cache=True): """List the available CORE fields. CORE fields are faster to search than AUX fields..""" diff --git a/astroquery/noirlab/tests/expected.py b/astroquery/noirlab/tests/expected.py index 14a18cf9d3..f30f9453be 100644 --- a/astroquery/noirlab/tests/expected.py +++ b/astroquery/noirlab/tests/expected.py @@ -1,3 +1,5 @@ +# flake8: noqa + query_region_1 = {'4066c45407961eab48eb16bcb9c5b4b7', '554b2bcb3b2a4353c515d20d9fc29e4e', '711ce162a7488a72b1629d994264eae7', @@ -44,4 +46,4 @@ retrieve = ['SIMPLE', 'BITPIX', 'NAXIS', 'EXTEND', 'ORIGIN', 'DATE', 'IRAF-TLM', 'OBJECT', 'RAWFILE', 'FILENAME', 'OBJRA', 'OBJDEC', 'OBJEPOCH', '', 'TIMESYS', '', 'OBSERVAT', 'OBS-ELEV', 'OBS-LAT', 'OBS-LONG', 'TELESCOP', 'TELRADEC', 'TELEQUIN', 'TELRA', 'TELDEC', 'HA', 'ZD', 'TELFOCUS', '', 'MOSSIZE', 'NDETS', '', 'OBSERVER', 'PROPOSER', 'PROPID', 'SEQID', 'SEQNUM', '', 'NOHS', 'NOCUTC', 'NOCRSD', 'NOCGID', 'NOCNAME', '', 'DTSITE', 'DTTELESC', 'DTINSTRU', 'DTCALDAT', 'DTUTC', 'DTOBSERV', 'DTPROPID', 'DTPI', 'DTPIAFFL', 'DTTITLE', 'DTCOPYRI', 'DTACQUIS', 'DTACCOUN', 'DTACQNAM', 'DTNSANAM', 'DTSTATUS', 'SB_HOST', 'SB_ACCOU', 'SB_SITE', 'SB_LOCAL', 'SB_DIR1', 'SB_DIR2', 'SB_DIR3', 'SB_RECNO', 'SB_ID', 'SB_NAME', 'RMCOUNT', 'RECNO', 'INSTRUME', 'RSPTGRP', 'RSPGRP', '', 'OBSTYPE', 'PROCTYPE', 'PRODTYPE', 'MIMETYPE', 'EXPTIME', 'FILTER', '', 'RA', 'DEC', 'CENTRA', 'CORN1RA', 'CORN2RA', 'CORN3RA', 'CORN4RA', 'CENTDEC', 'CORN1DEC', 'CORN2DEC', 'CORN3DEC', 'CORN4DEC', 'DATE-OBS', 'TIME-OBS', 'MJD-OBS', 'ST', '', 'CTYPE1', 'CTYPE2', 'CRVAL1', 'CRVAL2', 'CD1_1', 'CD2_2', 'WAT0_001', 'WAT1_001', 'WAT2_001', '', 'DIGAVGS', 'NCOADD', 'FSAMPLE', 'EXPCOADD', 'TITLE', 'DARKFIL', 'DARKINFO', 'LINIMAGE', 'LINCOEFF', 'BUNIT', 'GAIN', 'OEXPTIME', 'MAGZREF', 'PHOTINDX', 'WCSCAL', 'WCSXRMS', 'WCSYRMS', 'MAGZERO', '', 'MAGZSIG', 'MAGZERR', 'MAGZNAV', 'SEEINGP', 'SKYBG', 'SEEING', 'SKYMAG', 'STKBPM', 'OBJBPM', 'CDELT1', 'CDELT2', 'CRPIX1', 'CRPIX2', 'BPM', 'IMCMB001', 'IMCMB002', 'IMCMB003', 'IMCMB004', 'IMCMB005', 'IMCMB006', 'IMCMB007', 'IMCMB008', 'IMCMB009', 'IMCMB010', 'IMCMB011', 'IMCMB012', 'IMCMB013', 'IMCMB014', 'IMCMB015', 'IMCMB016', 'IMCMB017', 'IMCMB018', 'IMCMB019', 'IMCMB020', 'IMCMB021', 'IMCMB022', 'IMCMB023', 'IMCMB024', 'IMCMB025', 'IMCMB026', 'IMCMB027', 'IMCMB028', 'IMCMB029', 'IMCMB030', 'IMCMB031', 'IMCMB032', 'IMCMB033', 'IMCMB034', 'IMCMB035', 'IMCMB036', 'IMCMB037', 'IMCMB038', 'IMCMB039', 'IMCMB040', 'IMCMB041', 'IMCMB042', 'IMCMB043', 'IMCMB044', 'IMCMB045', 'IMCMB046', 'IMCMB047', 'IMCMB048', 'IMCMB049', 'IMCMB050', 'IMCMB051', 'IMCMB052', 'IMCMB053', 'IMCMB054', 'IMCMB055', 'IMCMB056', 'IMCMB057', 'IMCMB058', 'IMCMB059', 'IMCMB060', 'IMCMB061', 'IMCMB062', 'IMCMB063', 'IMCMB064', 'IMCMB065', 'IMCMB066', 'IMCMB067', 'IMCMB068', 'IMCMB069', 'IMCMB070', 'IMCMB071', 'IMCMB072', 'IMCMB073', 'IMCMB074', 'IMCMB075', 'IMCMB076', 'IMCMB077', 'IMCMB078', 'IMCMB079', 'IMCMB080', 'IMCMB081', 'IMCMB082', 'IMCMB083', 'IMCMB084', 'IMCMB085', 'IMCMB086', 'IMCMB087', 'IMCMB088', 'IMCMB089', 'IMCMB090', 'IMCMB091', 'IMCMB092', 'IMCMB093', 'IMCMB094', 'IMCMB095', 'IMCMB096', 'IMCMB097', 'IMCMB098', 'IMCMB099', 'IMCMB100', 'IMCMB101', 'IMCMB102', 'IMCMB103', 'IMCMB104', 'IMCMB105', 'IMCMB106', 'IMCMB107', 'IMCMB108', 'WMETHOD', 'DQAREA', 'DQEXPMAX', 'DQNOIS', 'DQPDPS', 'DQPDAP', 'DQPDPX', 'DQFWHM', 'DQMZ', 'DQSKY', 'DQSKYXGD', 'DQSKYYGD', 'DQMXTIME', 'DQHFTIME', 'DQMXAREA', 'DQHFAREA', 'DQMXFRAC', 'DQHFFRAC', 'DQMXNOIS', 'DQHFNOIS', 'DQMXPDPS', 'DQHFPDPS', 'DQMXPDAP', 'DQHFPDAP', 'DQMXPDPX', 'DQHFPDPX', 'DQSEEMID', 'DQSEESIG', 'DQSEEMIN', 'DQSEEMAX', 'DQSKYMID', 'DQSKYSIG', 'DQSKYMIN', 'DQSKYMAX', 'DQMASK', 'FILTID', 'PHOTBW', 'PHOTFWHM', 'PHOTCLAM', '', 'PIPELINE', 'PLVER', 'EXPMAP', 'ASTRMCAT', 'EFFTIME', 'WCSAXES', 'PLDNAME', '', 'PLQUEUE', 'PLQNAME', 'PLPROCID', 'PLFNAME', 'PLOFNAME', 'DQMFOR', 'PLPROPID', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'CHECKSUM', 'DATASUM'] -# noqa + From 3090a69aa488070a6099afac1112bc30f642f792 Mon Sep 17 00:00:00 2001 From: Steve Pothier Date: Mon, 25 May 2020 09:08:17 -0700 Subject: [PATCH 13/13] wip --- astroquery/noirlab/core.py | 34 +++------------------------- astroquery/noirlab/tests/expected.py | 2 -- 2 files changed, 3 insertions(+), 33 deletions(-) diff --git a/astroquery/noirlab/core.py b/astroquery/noirlab/core.py index 7e9ed3cf29..dfe08edf02 100644 --- a/astroquery/noirlab/core.py +++ b/astroquery/noirlab/core.py @@ -109,36 +109,6 @@ def query_region(self, coordinate, radius=0.1, cache=True): response.raise_for_status() return astropy.table.Table(data=response.json()) - # #!def query_region(self, coordinate, radius=0.1, cache=True): - # #! """Query for NOIRLab observations by region of the sky. - # #! - # #! Given a sky coordinate and radius, returns a `~astropy.table.Table` - # #! of NOIRLab observations. - # #! - # #! Parameters - # #! ---------- - # #! coordinates : str or `~astropy.coordinates` object - # #! The target region which to search. It may be specified as a - # #! string or as the appropriate `~astropy.coordinates` object. - # #! radius : str or `~astropy.units.Quantity` object, optional - # #! Default 0.1 degrees. - # #! The string must be parsable by `~astropy.coordinates.Angle`.The - # #! appropriate `~astropy.units.Quantity` object from - # #! `~astropy.units` may also be used. - # #! - # #! Returns - # #! ------- - # #! response : `~astropy.table.Table` - # #! """ - # #! self._validate_version() - # #! ra, dec = coordinate.to_string('decimal').split() - # #! url = f'{self.siaurl}?POS={ra},{dec}&SIZE={radius}&format=json' - # #! response = self._request('GET', url, - # #! timeout=self.TIMEOUT, - # #! cache=cache) - # #! response.raise_for_status() - # #! return astropy.table.Table(data=response.json()) - def query_region_async(self, coordinate, radius=0.1, cache=True): """Query for NOIRLab observations by region of the sky. @@ -183,7 +153,9 @@ def aux_fields(self, instrument, proctype, cache=True): """List the available AUX fields. AUX fields are ANY fields in the Archive FITS files that are not core DB fields. These are generally common to a single Instrument, Proctype combination. AUX fields are - slower to search than CORE fields. """ + slower to search than CORE fields. Acceptable values for INSTRUMENT and PROCTYPE + are listed in the results of the CATEGORICALS method. + """ url = f'{self._adsa_url}/{instrument}/{proctype}/' response = self._request('GET', url, timeout=self.TIMEOUT, cache=cache) response.raise_for_status() diff --git a/astroquery/noirlab/tests/expected.py b/astroquery/noirlab/tests/expected.py index f30f9453be..01a0a6c235 100644 --- a/astroquery/noirlab/tests/expected.py +++ b/astroquery/noirlab/tests/expected.py @@ -45,5 +45,3 @@ categoricals = {'instruments': ['(p)odi', '90prime', 'andicam', 'arcoiris', 'arcon', 'bench', 'ccd_imager', 'chiron', 'cosmos', 'decam', 'echelle', 'falmingos', 'flamingos', 'goodman', 'goodman spectrograph', 'gtcam', 'hdi', 'ice', 'ispi', 'kosmos', 'minimo/ice', 'mop/ice', 'mosaic', 'mosaic3', 'mosaic_1', 'mosaic_1_1', 'mosaic_2', 'newfirm', 'osiris', 'sami', 'soi', 'spartan', 'spartan ir camera', 'triplespec', 'wfc', 'whirc', 'wildfire', 'y4kcam'], 'obsmodes': [], 'proctypes': ['instcal', 'mastercal', 'nota', 'projected', 'raw', 'resampled', 'skysub', 'stacked'], 'prodtypes': ['dqmask', 'expmap', 'graphics (size)', 'image', 'image 2nd version 1', 'image1', 'nota', 'resampled', 'weight', 'wtmap'], 'sites': ['cp', 'ct', 'kp', 'lp'], 'surveys': [], 'telescopes': ['bok23m', 'ct09m', 'ct13m', 'ct15m', 'ct1m', 'ct4m', 'ctlab', 'kp09m', 'kp21m', 'kp35m', 'kp4m', 'kpcf', 'lp25m', 'soar', 'wiyn']} retrieve = ['SIMPLE', 'BITPIX', 'NAXIS', 'EXTEND', 'ORIGIN', 'DATE', 'IRAF-TLM', 'OBJECT', 'RAWFILE', 'FILENAME', 'OBJRA', 'OBJDEC', 'OBJEPOCH', '', 'TIMESYS', '', 'OBSERVAT', 'OBS-ELEV', 'OBS-LAT', 'OBS-LONG', 'TELESCOP', 'TELRADEC', 'TELEQUIN', 'TELRA', 'TELDEC', 'HA', 'ZD', 'TELFOCUS', '', 'MOSSIZE', 'NDETS', '', 'OBSERVER', 'PROPOSER', 'PROPID', 'SEQID', 'SEQNUM', '', 'NOHS', 'NOCUTC', 'NOCRSD', 'NOCGID', 'NOCNAME', '', 'DTSITE', 'DTTELESC', 'DTINSTRU', 'DTCALDAT', 'DTUTC', 'DTOBSERV', 'DTPROPID', 'DTPI', 'DTPIAFFL', 'DTTITLE', 'DTCOPYRI', 'DTACQUIS', 'DTACCOUN', 'DTACQNAM', 'DTNSANAM', 'DTSTATUS', 'SB_HOST', 'SB_ACCOU', 'SB_SITE', 'SB_LOCAL', 'SB_DIR1', 'SB_DIR2', 'SB_DIR3', 'SB_RECNO', 'SB_ID', 'SB_NAME', 'RMCOUNT', 'RECNO', 'INSTRUME', 'RSPTGRP', 'RSPGRP', '', 'OBSTYPE', 'PROCTYPE', 'PRODTYPE', 'MIMETYPE', 'EXPTIME', 'FILTER', '', 'RA', 'DEC', 'CENTRA', 'CORN1RA', 'CORN2RA', 'CORN3RA', 'CORN4RA', 'CENTDEC', 'CORN1DEC', 'CORN2DEC', 'CORN3DEC', 'CORN4DEC', 'DATE-OBS', 'TIME-OBS', 'MJD-OBS', 'ST', '', 'CTYPE1', 'CTYPE2', 'CRVAL1', 'CRVAL2', 'CD1_1', 'CD2_2', 'WAT0_001', 'WAT1_001', 'WAT2_001', '', 'DIGAVGS', 'NCOADD', 'FSAMPLE', 'EXPCOADD', 'TITLE', 'DARKFIL', 'DARKINFO', 'LINIMAGE', 'LINCOEFF', 'BUNIT', 'GAIN', 'OEXPTIME', 'MAGZREF', 'PHOTINDX', 'WCSCAL', 'WCSXRMS', 'WCSYRMS', 'MAGZERO', '', 'MAGZSIG', 'MAGZERR', 'MAGZNAV', 'SEEINGP', 'SKYBG', 'SEEING', 'SKYMAG', 'STKBPM', 'OBJBPM', 'CDELT1', 'CDELT2', 'CRPIX1', 'CRPIX2', 'BPM', 'IMCMB001', 'IMCMB002', 'IMCMB003', 'IMCMB004', 'IMCMB005', 'IMCMB006', 'IMCMB007', 'IMCMB008', 'IMCMB009', 'IMCMB010', 'IMCMB011', 'IMCMB012', 'IMCMB013', 'IMCMB014', 'IMCMB015', 'IMCMB016', 'IMCMB017', 'IMCMB018', 'IMCMB019', 'IMCMB020', 'IMCMB021', 'IMCMB022', 'IMCMB023', 'IMCMB024', 'IMCMB025', 'IMCMB026', 'IMCMB027', 'IMCMB028', 'IMCMB029', 'IMCMB030', 'IMCMB031', 'IMCMB032', 'IMCMB033', 'IMCMB034', 'IMCMB035', 'IMCMB036', 'IMCMB037', 'IMCMB038', 'IMCMB039', 'IMCMB040', 'IMCMB041', 'IMCMB042', 'IMCMB043', 'IMCMB044', 'IMCMB045', 'IMCMB046', 'IMCMB047', 'IMCMB048', 'IMCMB049', 'IMCMB050', 'IMCMB051', 'IMCMB052', 'IMCMB053', 'IMCMB054', 'IMCMB055', 'IMCMB056', 'IMCMB057', 'IMCMB058', 'IMCMB059', 'IMCMB060', 'IMCMB061', 'IMCMB062', 'IMCMB063', 'IMCMB064', 'IMCMB065', 'IMCMB066', 'IMCMB067', 'IMCMB068', 'IMCMB069', 'IMCMB070', 'IMCMB071', 'IMCMB072', 'IMCMB073', 'IMCMB074', 'IMCMB075', 'IMCMB076', 'IMCMB077', 'IMCMB078', 'IMCMB079', 'IMCMB080', 'IMCMB081', 'IMCMB082', 'IMCMB083', 'IMCMB084', 'IMCMB085', 'IMCMB086', 'IMCMB087', 'IMCMB088', 'IMCMB089', 'IMCMB090', 'IMCMB091', 'IMCMB092', 'IMCMB093', 'IMCMB094', 'IMCMB095', 'IMCMB096', 'IMCMB097', 'IMCMB098', 'IMCMB099', 'IMCMB100', 'IMCMB101', 'IMCMB102', 'IMCMB103', 'IMCMB104', 'IMCMB105', 'IMCMB106', 'IMCMB107', 'IMCMB108', 'WMETHOD', 'DQAREA', 'DQEXPMAX', 'DQNOIS', 'DQPDPS', 'DQPDAP', 'DQPDPX', 'DQFWHM', 'DQMZ', 'DQSKY', 'DQSKYXGD', 'DQSKYYGD', 'DQMXTIME', 'DQHFTIME', 'DQMXAREA', 'DQHFAREA', 'DQMXFRAC', 'DQHFFRAC', 'DQMXNOIS', 'DQHFNOIS', 'DQMXPDPS', 'DQHFPDPS', 'DQMXPDAP', 'DQHFPDAP', 'DQMXPDPX', 'DQHFPDPX', 'DQSEEMID', 'DQSEESIG', 'DQSEEMIN', 'DQSEEMAX', 'DQSKYMID', 'DQSKYSIG', 'DQSKYMIN', 'DQSKYMAX', 'DQMASK', 'FILTID', 'PHOTBW', 'PHOTFWHM', 'PHOTCLAM', '', 'PIPELINE', 'PLVER', 'EXPMAP', 'ASTRMCAT', 'EFFTIME', 'WCSAXES', 'PLDNAME', '', 'PLQUEUE', 'PLQNAME', 'PLPROCID', 'PLFNAME', 'PLOFNAME', 'DQMFOR', 'PLPROPID', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'CHECKSUM', 'DATASUM'] - -