[2021-04-07T19:53:54.962346Z] + . /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups/bin/setups.sh [2021-04-07T19:53:54.962970Z] ++ export EUPS_SHELL=sh [2021-04-07T19:53:54.962982Z] ++ EUPS_SHELL=sh [2021-04-07T19:53:54.962987Z] ++ export EUPS_DIR=/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups [2021-04-07T19:53:54.962992Z] ++ EUPS_DIR=/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups [2021-04-07T19:53:54.966384Z] +++ echo /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups [2021-04-07T19:53:54.967685Z] +++ sed -e 's/ /-+-/g' [2021-04-07T19:53:54.972750Z] ++ eupslocalpath=/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups [2021-04-07T19:53:54.974818Z] +++ /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/bin/python -E -c ' [2021-04-07T19:53:54.974840Z] from __future__ import print_function [2021-04-07T19:53:54.974846Z] import sys [2021-04-07T19:53:54.974850Z] pp = [] [2021-04-07T19:53:54.974854Z] for d in sys.argv[1].split(":"): [2021-04-07T19:53:54.974858Z] if d and d not in pp: [2021-04-07T19:53:54.974862Z] pp += [d] [2021-04-07T19:53:54.974866Z] if not sys.argv[2] in pp: [2021-04-07T19:53:54.974870Z] pp = [sys.argv[2]] + pp [2021-04-07T19:53:54.974880Z] print(":".join(pp))' /Users/am32496/Downloads/lsstsw/stack/0.4.3 /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/share/eups [2021-04-07T19:53:55.034758Z] ++ export EUPS_PATH=/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/share/eups:/Users/am32496/Downloads/lsstsw/stack/0.4.3 [2021-04-07T19:53:55.034799Z] ++ EUPS_PATH=/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/share/eups:/Users/am32496/Downloads/lsstsw/stack/0.4.3 [2021-04-07T19:53:55.034816Z] ++ _eups_path=/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/share/eups:/Users/am32496/Downloads/lsstsw/stack/0.4.3 [2021-04-07T19:53:55.037030Z] +++ /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups/bin/eups_setup DYLD_LIBRARY_PATH= eups -r /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups [2021-04-07T19:53:55.245594Z] ++ eval export 'PATH=/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups/bin:/Users/am32496/Downloads/lsstsw/lsst_build/bin:/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/bin:/Users/am32496/Downloads/lsstsw/bin:/Users/am32496/Downloads/lsstsw/miniconda/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin;' export 'EUPS_PATH=/Users/am32496/Downloads/lsstsw/stack/0.4.3:/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/share/eups;' export 'PYTHONPATH=/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups/python:/Users/am32496/Downloads/lsstsw/lsst_build/python;' export 'SETUP_EUPS='\''eups' LOCAL:/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups -f DarwinX86 -Z '(none)'\'';' 'setup()' '{' eval '`"/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups/bin/eups_setup"' 'DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}"' '"$@"`' ';' '};' 'unsetup()' '{' eval '`"/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups/bin/eups_setup"' 'DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}"' --unsetup '"$@"`' ';' '}' [2021-04-07T19:53:55.245742Z] +++ export PATH=/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups/bin:/Users/am32496/Downloads/lsstsw/lsst_build/bin:/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/bin:/Users/am32496/Downloads/lsstsw/bin:/Users/am32496/Downloads/lsstsw/miniconda/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin [2021-04-07T19:53:55.245757Z] +++ PATH=/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups/bin:/Users/am32496/Downloads/lsstsw/lsst_build/bin:/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/bin:/Users/am32496/Downloads/lsstsw/bin:/Users/am32496/Downloads/lsstsw/miniconda/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin [2021-04-07T19:53:55.245771Z] +++ export EUPS_PATH=/Users/am32496/Downloads/lsstsw/stack/0.4.3:/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/share/eups [2021-04-07T19:53:55.245776Z] +++ EUPS_PATH=/Users/am32496/Downloads/lsstsw/stack/0.4.3:/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/share/eups [2021-04-07T19:53:55.245806Z] +++ export PYTHONPATH=/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups/python:/Users/am32496/Downloads/lsstsw/lsst_build/python [2021-04-07T19:53:55.245820Z] +++ PYTHONPATH=/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups/python:/Users/am32496/Downloads/lsstsw/lsst_build/python [2021-04-07T19:53:55.245827Z] +++ export 'SETUP_EUPS=eups LOCAL:/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups -f DarwinX86 -Z (none)' [2021-04-07T19:53:55.245830Z] +++ SETUP_EUPS='eups LOCAL:/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups -f DarwinX86 -Z (none)' [2021-04-07T19:53:55.245876Z] ++ export 'SETUP_EUPS=eups LOCAL:/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups -f (none) -Z (none)' [2021-04-07T19:53:55.245885Z] ++ SETUP_EUPS='eups LOCAL:/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups -f (none) -Z (none)' [2021-04-07T19:53:55.245896Z] ++ export EUPS_PATH=/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/share/eups:/Users/am32496/Downloads/lsstsw/stack/0.4.3 [2021-04-07T19:53:55.245899Z] ++ EUPS_PATH=/Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/share/eups:/Users/am32496/Downloads/lsstsw/stack/0.4.3 [2021-04-07T19:53:55.245910Z] ++ unset eupslocalpath _eups_path [2021-04-07T19:53:55.245968Z] ++ '[' X '!=' X -a -f /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/eups/etc/bash_completion.d/eups ']' [2021-04-07T19:53:55.246071Z] + export EUPS_PATH=/Users/am32496/Downloads/lsstsw/stack/0.4.3 [2021-04-07T19:53:55.246085Z] + EUPS_PATH=/Users/am32496/Downloads/lsstsw/stack/0.4.3 [2021-04-07T19:53:55.246099Z] + cd /Users/am32496/Downloads/lsstsw/build/astro_metadata_translator [2021-04-07T19:53:55.246188Z] + git reset --hard [2021-04-07T19:53:55.261288Z] HEAD is now at ffa9b84 Merge pull request #52 from lsst/tickets/DM-29266 [2021-04-07T19:53:55.261820Z] + git clean -d -f -q -x -e '_build.*' [2021-04-07T19:53:55.270342Z] + eupspkg PRODUCT=astro_metadata_translator VERSION=0.1.0-25-gffa9b84+f5e6047307 FLAVOR=generic prep [2021-04-07T19:53:55.611035Z] + cat [2021-04-07T19:53:55.614320Z] + set +x [2021-04-07T19:53:55.614353Z] Setting up environment with EUPS [2021-04-07T19:53:55.784792Z] + eupspkg PRODUCT=astro_metadata_translator VERSION=0.1.0-25-gffa9b84+f5e6047307 FLAVOR=generic config [2021-04-07T19:53:56.150103Z] + eupspkg PRODUCT=astro_metadata_translator VERSION=0.1.0-25-gffa9b84+f5e6047307 FLAVOR=generic build [2021-04-07T19:53:56.639434Z] scons: Reading SConscript files ... [2021-04-07T19:53:57.112123Z] Setting OS X binary compatibility level: 10.9 [2021-04-07T19:53:57.112340Z] EUPS integration: enabled [2021-04-07T19:53:57.116707Z] Setting up environment to build package 'astro_metadata_translator'. [2021-04-07T19:53:57.127396Z] Running pytest with 8 processes [2021-04-07T19:53:57.127576Z] pytest: automated test discovery mode enabled. [2021-04-07T19:53:57.131864Z] scons: done reading SConscript files. [2021-04-07T19:53:57.133160Z] scons: Building targets ... [2021-04-07T19:53:57.133436Z] scons: Nothing to be done for `python'. [2021-04-07T19:53:57.136787Z] rewrite_shebang(["bin/astrometadata"], ["bin.src/astrometadata"]) [2021-04-07T19:53:57.140803Z] rewrite_shebang(["bin/translate_header.py"], ["bin.src/translate_header.py"]) [2021-04-07T19:53:57.141635Z] scons: Nothing to be done for `doc'. [2021-04-07T19:53:57.212930Z] running global pytest... [2021-04-07T19:54:06.055400Z] ============================= test session starts ============================== [2021-04-07T19:54:06.055495Z] platform darwin -- Python 3.8.8, pytest-6.2.3, py-1.10.0, pluggy-0.13.1 [2021-04-07T19:54:06.055504Z] rootdir: /Users/am32496/Downloads/lsstsw/build/astro_metadata_translator, configfile: setup.cfg [2021-04-07T19:54:06.055650Z] plugins: flake8-1.0.7, cov-2.11.1, xdist-2.2.1, session2file-0.1.11, openfiles-0.5.0, forked-1.3.0, subtests-0.3.2, doctestplus-0.9.0 [2021-04-07T19:54:06.055658Z] gw0 I / gw1 I / gw2 I / gw3 I / gw4 I / gw5 I / gw6 I / gw7 I [2021-04-07T19:54:06.055663Z] gw0 [85] / gw1 [85] / gw2 [85] / gw3 [85] / gw4 [85] / gw5 [85] / gw6 [85] / gw7 [85] [2021-04-07T19:54:06.055667Z] [2021-04-07T19:54:12.754687Z] .............................................................F.......... [ 83%] [2021-04-07T19:54:18.847156Z] ........FF..FF [100%] [2021-04-07T19:54:18.847213Z] =================================== FAILURES =================================== [2021-04-07T19:54:18.847220Z] _ SdssTestCase.test_sdss_translator [Testing fitsheader-sdss-fpC-006377-g4-0399.yaml] _ [2021-04-07T19:54:18.847225Z] [gw0] darwin -- Python 3.8.8 /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/bin/python3.8 [2021-04-07T19:54:18.847229Z] [2021-04-07T19:54:18.847233Z] cls = , site_name = 'apo' [2021-04-07T19:54:18.847237Z] [2021-04-07T19:54:18.847241Z] @classmethod [2021-04-07T19:54:18.847245Z] def of_site(cls, site_name): [2021-04-07T19:54:18.847249Z] """ [2021-04-07T19:54:18.847253Z] Return an object of this class for a known observatory/site by name. [2021-04-07T19:54:18.847257Z] [2021-04-07T19:54:18.847261Z] This is intended as a quick convenience function to get basic site [2021-04-07T19:54:18.847264Z] information, not a fully-featured exhaustive registry of observatories [2021-04-07T19:54:18.847269Z] and all their properties. [2021-04-07T19:54:18.847272Z] [2021-04-07T19:54:18.847276Z] Additional information about the site is stored in the ``.info.meta`` [2021-04-07T19:54:18.847280Z] dictionary of sites obtained using this method (see the examples below). [2021-04-07T19:54:18.847284Z] [2021-04-07T19:54:18.847288Z] .. note:: [2021-04-07T19:54:18.847291Z] When this function is called, it will attempt to download site [2021-04-07T19:54:18.847295Z] information from the astropy data server. If you would like a site [2021-04-07T19:54:18.847299Z] to be added, issue a pull request to the [2021-04-07T19:54:18.847303Z] `astropy-data repository `_ . [2021-04-07T19:54:18.847307Z] If a site cannot be found in the registry (i.e., an internet [2021-04-07T19:54:18.847311Z] connection is not available), it will fall back on a built-in list, [2021-04-07T19:54:18.847315Z] In the future, this bundled list might include a version-controlled [2021-04-07T19:54:18.847319Z] list of canonical observatories extracted from the online version, [2021-04-07T19:54:18.847322Z] but it currently only contains the Greenwich Royal Observatory as an [2021-04-07T19:54:18.847325Z] example case. [2021-04-07T19:54:18.847329Z] [2021-04-07T19:54:18.847333Z] [2021-04-07T19:54:18.847336Z] Parameters [2021-04-07T19:54:18.847341Z] ---------- [2021-04-07T19:54:18.847344Z] site_name : str [2021-04-07T19:54:18.847348Z] Name of the observatory (case-insensitive). [2021-04-07T19:54:18.847352Z] [2021-04-07T19:54:18.847355Z] Returns [2021-04-07T19:54:18.847359Z] ------- [2021-04-07T19:54:18.847363Z] site : This class (a `~astropy.coordinates.EarthLocation` or subclass) [2021-04-07T19:54:18.847366Z] The location of the observatory. [2021-04-07T19:54:18.847370Z] [2021-04-07T19:54:18.847374Z] Examples [2021-04-07T19:54:18.847377Z] -------- [2021-04-07T19:54:18.847381Z] [2021-04-07T19:54:18.847385Z] >>> from astropy.coordinates import EarthLocation [2021-04-07T19:54:18.847389Z] >>> keck = EarthLocation.of_site('Keck Observatory') # doctest: +REMOTE_DATA [2021-04-07T19:54:18.847392Z] >>> keck.geodetic # doctest: +REMOTE_DATA +FLOAT_CMP [2021-04-07T19:54:18.847396Z] GeodeticLocation(lon=, lat=, height=) [2021-04-07T19:54:18.847400Z] >>> keck.info # doctest: +REMOTE_DATA [2021-04-07T19:54:18.847404Z] name = W. M. Keck Observatory [2021-04-07T19:54:18.847407Z] dtype = void192 [2021-04-07T19:54:18.847411Z] unit = m [2021-04-07T19:54:18.847414Z] class = EarthLocation [2021-04-07T19:54:18.847418Z] n_bad = 0 [2021-04-07T19:54:18.847422Z] >>> keck.info.meta # doctest: +REMOTE_DATA [2021-04-07T19:54:18.847425Z] {'source': 'IRAF Observatory Database', 'timezone': 'US/Aleutian'} [2021-04-07T19:54:18.847430Z] [2021-04-07T19:54:18.847434Z] See Also [2021-04-07T19:54:18.847438Z] -------- [2021-04-07T19:54:18.847442Z] get_site_names : the list of sites that this function can access [2021-04-07T19:54:18.847445Z] """ # noqa [2021-04-07T19:54:18.847449Z] registry = cls._get_site_registry() [2021-04-07T19:54:18.847453Z] try: [2021-04-07T19:54:18.847457Z] > el = registry[site_name] [2021-04-07T19:54:18.847461Z] [2021-04-07T19:54:18.847465Z] ../../miniconda/envs/lsst-scipipe-0.4.3/lib/python3.8/site-packages/astropy/coordinates/earth.py:361: [2021-04-07T19:54:18.847469Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-04-07T19:54:18.847473Z] [2021-04-07T19:54:18.847477Z] self = [2021-04-07T19:54:18.847481Z] site_name = 'apo' [2021-04-07T19:54:18.847486Z] [2021-04-07T19:54:18.847490Z] def __getitem__(self, site_name): [2021-04-07T19:54:18.847498Z] """ [2021-04-07T19:54:18.847502Z] Returns an EarthLocation for a known site in this registry. [2021-04-07T19:54:18.847506Z] [2021-04-07T19:54:18.847512Z] Parameters [2021-04-07T19:54:18.847516Z] ---------- [2021-04-07T19:54:18.847520Z] site_name : str [2021-04-07T19:54:18.847527Z] Name of the observatory (case-insensitive). [2021-04-07T19:54:18.847531Z] [2021-04-07T19:54:18.847535Z] Returns [2021-04-07T19:54:18.847539Z] ------- [2021-04-07T19:54:18.847545Z] site : `~astropy.coordinates.EarthLocation` [2021-04-07T19:54:18.847549Z] The location of the observatory. [2021-04-07T19:54:18.847553Z] """ [2021-04-07T19:54:18.847557Z] if site_name.lower() not in self._lowercase_names_to_locations: [2021-04-07T19:54:18.847562Z] # If site name not found, find close matches and suggest them in error [2021-04-07T19:54:18.847566Z] close_names = get_close_matches(site_name, self._lowercase_names_to_locations) [2021-04-07T19:54:18.847570Z] close_names = sorted(close_names, key=len) [2021-04-07T19:54:18.847574Z] [2021-04-07T19:54:18.847578Z] > raise UnknownSiteException(site_name, "the 'names' attribute", close_names=close_names) [2021-04-07T19:54:18.847582Z] E astropy.coordinates.errors.UnknownSiteException: "Site 'apo' not in database. Use the 'names' attribute to see available sites." [2021-04-07T19:54:18.847586Z] [2021-04-07T19:54:18.847590Z] ../../miniconda/envs/lsst-scipipe-0.4.3/lib/python3.8/site-packages/astropy/coordinates/sites.py:58: UnknownSiteException [2021-04-07T19:54:18.847594Z] [2021-04-07T19:54:18.847598Z] During handling of the above exception, another exception occurred: [2021-04-07T19:54:18.847601Z] [2021-04-07T19:54:18.847605Z] self = [2021-04-07T19:54:18.847609Z] header = [2021-04-07T19:54:18.847613Z] filename = 'fitsheader-sdss-fpC-006377-g4-0399.yaml' [2021-04-07T19:54:18.847617Z] translator_class = [2021-04-07T19:54:18.847621Z] pedantic = True, search_path = None, required = set(), subset = None [2021-04-07T19:54:18.847705Z] [2021-04-07T19:54:18.847711Z] def __init__(self, header, filename=None, translator_class=None, pedantic=False, [2021-04-07T19:54:18.847716Z] search_path=None, required=None, subset=None): [2021-04-07T19:54:18.847720Z] [2021-04-07T19:54:18.847724Z] # Initialize the empty object [2021-04-07T19:54:18.847728Z] self._header = {} [2021-04-07T19:54:18.847732Z] self.filename = filename [2021-04-07T19:54:18.847736Z] self._translator = None [2021-04-07T19:54:18.847740Z] self.translator_class_name = "" [2021-04-07T19:54:18.847743Z] [2021-04-07T19:54:18.847747Z] # To allow makeObservationInfo to work, we special case a None [2021-04-07T19:54:18.847751Z] # header [2021-04-07T19:54:18.847755Z] if header is None: [2021-04-07T19:54:18.847759Z] return [2021-04-07T19:54:18.847763Z] [2021-04-07T19:54:18.847767Z] # Fix up the header (if required) [2021-04-07T19:54:18.847771Z] fix_header(header, translator_class=translator_class, filename=filename, [2021-04-07T19:54:18.847775Z] search_path=search_path) [2021-04-07T19:54:18.847779Z] [2021-04-07T19:54:18.847783Z] # Store the supplied header for later stripping [2021-04-07T19:54:18.847787Z] self._header = header [2021-04-07T19:54:18.847791Z] [2021-04-07T19:54:18.847794Z] if translator_class is None: [2021-04-07T19:54:18.847798Z] translator_class = MetadataTranslator.determine_translator(header, filename=filename) [2021-04-07T19:54:18.847802Z] elif not issubclass(translator_class, MetadataTranslator): [2021-04-07T19:54:18.847806Z] raise TypeError(f"Translator class must be a MetadataTranslator, not {translator_class}") [2021-04-07T19:54:18.847810Z] [2021-04-07T19:54:18.847814Z] # Create an instance for this header [2021-04-07T19:54:18.847818Z] translator = translator_class(header, filename=filename) [2021-04-07T19:54:18.847822Z] [2021-04-07T19:54:18.847826Z] # Store the translator [2021-04-07T19:54:18.847830Z] self._translator = translator [2021-04-07T19:54:18.847833Z] self.translator_class_name = translator_class.__name__ [2021-04-07T19:54:18.847837Z] [2021-04-07T19:54:18.847841Z] # Form file information string in case we need an error message [2021-04-07T19:54:18.847845Z] if filename: [2021-04-07T19:54:18.847849Z] file_info = f" and file {filename}" [2021-04-07T19:54:18.847853Z] else: [2021-04-07T19:54:18.847857Z] file_info = "" [2021-04-07T19:54:18.847861Z] [2021-04-07T19:54:18.847865Z] # Determine the properties of interest [2021-04-07T19:54:18.847869Z] all_properties = set(self._PROPERTIES) [2021-04-07T19:54:18.847872Z] if subset is not None: [2021-04-07T19:54:18.847876Z] if not subset: [2021-04-07T19:54:18.847880Z] raise ValueError("Cannot request no properties be calculated.") [2021-04-07T19:54:18.847884Z] if not subset.issubset(all_properties): [2021-04-07T19:54:18.847887Z] raise ValueError("Requested subset is not a subset of known properties. " [2021-04-07T19:54:18.847891Z] f"Got extra: {subset - all_properties}") [2021-04-07T19:54:18.847895Z] properties = subset [2021-04-07T19:54:18.847899Z] else: [2021-04-07T19:54:18.847903Z] properties = all_properties [2021-04-07T19:54:18.847906Z] [2021-04-07T19:54:18.847910Z] if required is None: [2021-04-07T19:54:18.847913Z] required = set() [2021-04-07T19:54:18.847917Z] else: [2021-04-07T19:54:18.847921Z] if not required.issubset(all_properties): [2021-04-07T19:54:18.847924Z] raise ValueError("Requested required properties include unknowns: " [2021-04-07T19:54:18.847927Z] f"{required - all_properties}") [2021-04-07T19:54:18.847930Z] [2021-04-07T19:54:18.847934Z] # Loop over each property and request the translated form [2021-04-07T19:54:18.847937Z] for t in properties: [2021-04-07T19:54:18.847940Z] # prototype code [2021-04-07T19:54:18.847944Z] method = f"to_{t}" [2021-04-07T19:54:18.847947Z] property = f"_{t}" [2021-04-07T19:54:18.847950Z] [2021-04-07T19:54:18.847953Z] try: [2021-04-07T19:54:18.847956Z] > value = getattr(translator, method)() [2021-04-07T19:54:18.847960Z] [2021-04-07T19:54:18.847963Z] python/astro_metadata_translator/observationInfo.py:157: [2021-04-07T19:54:18.847966Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-04-07T19:54:18.847969Z] [2021-04-07T19:54:18.847972Z] self = [2021-04-07T19:54:18.847975Z] [2021-04-07T19:54:18.847979Z] def func_wrapper(self): [2021-04-07T19:54:18.847982Z] if name not in self._translation_cache: [2021-04-07T19:54:18.847985Z] > self._translation_cache[name] = func(self) [2021-04-07T19:54:18.847988Z] [2021-04-07T19:54:18.847992Z] python/astro_metadata_translator/translator.py:62: [2021-04-07T19:54:18.847995Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-04-07T19:54:18.847998Z] [2021-04-07T19:54:18.848001Z] self = [2021-04-07T19:54:18.848005Z] [2021-04-07T19:54:18.848008Z] @cache_translation [2021-04-07T19:54:18.848011Z] def to_tracking_radec(self): [2021-04-07T19:54:18.848014Z] # Docstring will be inherited. Property defined in properties.py [2021-04-07T19:54:18.848017Z] radecsys = ("RADECSYS",) [2021-04-07T19:54:18.848020Z] radecpairs = (("RA", "DEC"),) [2021-04-07T19:54:18.848024Z] > return tracking_from_degree_headers(self, radecsys, radecpairs, unit=u.deg) [2021-04-07T19:54:18.848027Z] [2021-04-07T19:54:18.848030Z] python/astro_metadata_translator/translators/sdss.py:170: [2021-04-07T19:54:18.848033Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-04-07T19:54:18.848036Z] [2021-04-07T19:54:18.849085Z] self = [2021-04-07T19:54:18.849097Z] radecsys = ('RADECSYS',), radecpairs = (('RA', 'DEC'),), unit = Unit("deg") [2021-04-07T19:54:18.849100Z] [2021-04-07T19:54:18.849103Z] def tracking_from_degree_headers(self, radecsys, radecpairs, unit=u.deg): [2021-04-07T19:54:18.849105Z] """Calculate the tracking coordinates from lists of headers. [2021-04-07T19:54:18.849107Z] [2021-04-07T19:54:18.849109Z] Parameters [2021-04-07T19:54:18.849111Z] ---------- [2021-04-07T19:54:18.849113Z] radecsys : `list` or `tuple` [2021-04-07T19:54:18.849115Z] Header keywords to try corresponding to the tracking system. If none [2021-04-07T19:54:18.849118Z] match ICRS will be assumed. [2021-04-07T19:54:18.849120Z] radecpairs : `tuple` of `tuple` of pairs of `str` [2021-04-07T19:54:18.849122Z] Pairs of keywords specifying the RA/Dec in units of ``unit``. [2021-04-07T19:54:18.849124Z] unit : `astropy.unit.BaseUnit` or `tuple` [2021-04-07T19:54:18.849126Z] Unit definition suitable for the `~astropy.coordinate.SkyCoord` [2021-04-07T19:54:18.849128Z] constructor. [2021-04-07T19:54:18.849130Z] [2021-04-07T19:54:18.849132Z] Returns [2021-04-07T19:54:18.849136Z] ------- [2021-04-07T19:54:18.849138Z] radec = `astropy.coordinates.SkyCoord` [2021-04-07T19:54:18.849140Z] The RA/Dec coordinates. None if this is a moving target or a [2021-04-07T19:54:18.849142Z] non-science observation without any RA/Dec definition. [2021-04-07T19:54:18.849144Z] [2021-04-07T19:54:18.849146Z] Raises [2021-04-07T19:54:18.849148Z] ------ [2021-04-07T19:54:18.849150Z] KeyError [2021-04-07T19:54:18.849194Z] No RA/Dec keywords were found and this observation is a science [2021-04-07T19:54:18.849197Z] observation. [2021-04-07T19:54:18.849200Z] """ [2021-04-07T19:54:18.849202Z] used = [] [2021-04-07T19:54:18.849204Z] for k in radecsys: [2021-04-07T19:54:18.849206Z] if self.is_key_ok(k): [2021-04-07T19:54:18.849208Z] frame = self._header[k].strip().lower() [2021-04-07T19:54:18.849210Z] used.append(k) [2021-04-07T19:54:18.849212Z] if frame == "gappt": [2021-04-07T19:54:18.849214Z] self._used_these_cards(*used) [2021-04-07T19:54:18.849216Z] # Moving target [2021-04-07T19:54:18.849218Z] return None [2021-04-07T19:54:18.849220Z] break [2021-04-07T19:54:18.849222Z] else: [2021-04-07T19:54:18.849223Z] frame = "icrs" [2021-04-07T19:54:18.849225Z] for ra_key, dec_key in radecpairs: [2021-04-07T19:54:18.849227Z] if self.are_keys_ok([ra_key, dec_key]): [2021-04-07T19:54:18.849229Z] radec = SkyCoord(self._header[ra_key], self._header[dec_key], [2021-04-07T19:54:18.849231Z] frame=frame, unit=unit, obstime=self.to_datetime_begin(), [2021-04-07T19:54:18.849234Z] > location=self.to_location()) [2021-04-07T19:54:18.849236Z] [2021-04-07T19:54:18.849238Z] python/astro_metadata_translator/translators/helpers.py:119: [2021-04-07T19:54:18.849239Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-04-07T19:54:18.849241Z] [2021-04-07T19:54:18.849243Z] self = [2021-04-07T19:54:18.849245Z] [2021-04-07T19:54:18.849247Z] def func_wrapper(self): [2021-04-07T19:54:18.849249Z] if name not in self._translation_cache: [2021-04-07T19:54:18.849251Z] > self._translation_cache[name] = func(self) [2021-04-07T19:54:18.849253Z] [2021-04-07T19:54:18.849255Z] python/astro_metadata_translator/translator.py:62: [2021-04-07T19:54:18.849257Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-04-07T19:54:18.849259Z] [2021-04-07T19:54:18.849261Z] self = [2021-04-07T19:54:18.849263Z] [2021-04-07T19:54:18.849265Z] @cache_translation [2021-04-07T19:54:18.849267Z] def to_location(self): [2021-04-07T19:54:18.849269Z] """Calculate the observatory location. [2021-04-07T19:54:18.849271Z] [2021-04-07T19:54:18.849273Z] Returns [2021-04-07T19:54:18.849275Z] ------- [2021-04-07T19:54:18.849277Z] location : `astropy.coordinates.EarthLocation` [2021-04-07T19:54:18.849279Z] An object representing the location of the telescope. [2021-04-07T19:54:18.849281Z] """ [2021-04-07T19:54:18.849283Z] [2021-04-07T19:54:18.849285Z] # Look up the value since files do not have location [2021-04-07T19:54:18.849287Z] > value = EarthLocation.of_site("apo") [2021-04-07T19:54:18.849289Z] [2021-04-07T19:54:18.849291Z] python/astro_metadata_translator/translators/sdss.py:145: [2021-04-07T19:54:18.849293Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-04-07T19:54:18.849295Z] [2021-04-07T19:54:18.849297Z] cls = , site_name = 'apo' [2021-04-07T19:54:18.849299Z] [2021-04-07T19:54:18.849338Z] @classmethod [2021-04-07T19:54:18.849343Z] def of_site(cls, site_name): [2021-04-07T19:54:18.849345Z] """ [2021-04-07T19:54:18.849347Z] Return an object of this class for a known observatory/site by name. [2021-04-07T19:54:18.849349Z] [2021-04-07T19:54:18.849351Z] This is intended as a quick convenience function to get basic site [2021-04-07T19:54:18.849353Z] information, not a fully-featured exhaustive registry of observatories [2021-04-07T19:54:18.849355Z] and all their properties. [2021-04-07T19:54:18.849357Z] [2021-04-07T19:54:18.849426Z] Additional information about the site is stored in the ``.info.meta`` [2021-04-07T19:54:18.849434Z] dictionary of sites obtained using this method (see the examples below). [2021-04-07T19:54:18.849439Z] [2021-04-07T19:54:18.849442Z] .. note:: [2021-04-07T19:54:18.849446Z] When this function is called, it will attempt to download site [2021-04-07T19:54:18.849449Z] information from the astropy data server. If you would like a site [2021-04-07T19:54:18.849452Z] to be added, issue a pull request to the [2021-04-07T19:54:18.849471Z] `astropy-data repository `_ . [2021-04-07T19:54:18.849474Z] If a site cannot be found in the registry (i.e., an internet [2021-04-07T19:54:18.849476Z] connection is not available), it will fall back on a built-in list, [2021-04-07T19:54:18.849478Z] In the future, this bundled list might include a version-controlled [2021-04-07T19:54:18.849480Z] list of canonical observatories extracted from the online version, [2021-04-07T19:54:18.849482Z] but it currently only contains the Greenwich Royal Observatory as an [2021-04-07T19:54:18.849484Z] example case. [2021-04-07T19:54:18.849491Z] [2021-04-07T19:54:18.849493Z] [2021-04-07T19:54:18.849495Z] Parameters [2021-04-07T19:54:18.849497Z] ---------- [2021-04-07T19:54:18.849499Z] site_name : str [2021-04-07T19:54:18.849501Z] Name of the observatory (case-insensitive). [2021-04-07T19:54:18.849503Z] [2021-04-07T19:54:18.849505Z] Returns [2021-04-07T19:54:18.849507Z] ------- [2021-04-07T19:54:18.849509Z] site : This class (a `~astropy.coordinates.EarthLocation` or subclass) [2021-04-07T19:54:18.849511Z] The location of the observatory. [2021-04-07T19:54:18.849513Z] [2021-04-07T19:54:18.849515Z] Examples [2021-04-07T19:54:18.849517Z] -------- [2021-04-07T19:54:18.849519Z] [2021-04-07T19:54:18.849521Z] >>> from astropy.coordinates import EarthLocation [2021-04-07T19:54:18.849526Z] >>> keck = EarthLocation.of_site('Keck Observatory') # doctest: +REMOTE_DATA [2021-04-07T19:54:18.849528Z] >>> keck.geodetic # doctest: +REMOTE_DATA +FLOAT_CMP [2021-04-07T19:54:18.849530Z] GeodeticLocation(lon=, lat=, height=) [2021-04-07T19:54:18.849532Z] >>> keck.info # doctest: +REMOTE_DATA [2021-04-07T19:54:18.849534Z] name = W. M. Keck Observatory [2021-04-07T19:54:18.849536Z] dtype = void192 [2021-04-07T19:54:18.849538Z] unit = m [2021-04-07T19:54:18.849540Z] class = EarthLocation [2021-04-07T19:54:18.849542Z] n_bad = 0 [2021-04-07T19:54:18.849544Z] >>> keck.info.meta # doctest: +REMOTE_DATA [2021-04-07T19:54:18.849546Z] {'source': 'IRAF Observatory Database', 'timezone': 'US/Aleutian'} [2021-04-07T19:54:18.849548Z] [2021-04-07T19:54:18.849550Z] See Also [2021-04-07T19:54:18.849552Z] -------- [2021-04-07T19:54:18.849554Z] get_site_names : the list of sites that this function can access [2021-04-07T19:54:18.849556Z] """ # noqa [2021-04-07T19:54:18.849558Z] registry = cls._get_site_registry() [2021-04-07T19:54:18.849560Z] try: [2021-04-07T19:54:18.849562Z] el = registry[site_name] [2021-04-07T19:54:18.849564Z] except UnknownSiteException as e: [2021-04-07T19:54:18.849566Z] > raise UnknownSiteException(e.site, 'EarthLocation.get_site_names', [2021-04-07T19:54:18.849568Z] close_names=e.close_names) [2021-04-07T19:54:18.849570Z] E astropy.coordinates.errors.UnknownSiteException: "Site 'apo' not in database. Use EarthLocation.get_site_names to see available sites." [2021-04-07T19:54:18.849617Z] [2021-04-07T19:54:18.849624Z] ../../miniconda/envs/lsst-scipipe-0.4.3/lib/python3.8/site-packages/astropy/coordinates/earth.py:363: UnknownSiteException [2021-04-07T19:54:18.849629Z] [2021-04-07T19:54:18.849632Z] The above exception was the direct cause of the following exception: [2021-04-07T19:54:18.849636Z] [2021-04-07T19:54:18.849640Z] self = [2021-04-07T19:54:18.849657Z] [2021-04-07T19:54:18.849664Z] def test_sdss_translator(self): [2021-04-07T19:54:18.849667Z] test_data = (("fitsheader-sdss-fpC-006377-g4-0399.yaml", [2021-04-07T19:54:18.849669Z] dict(telescope="SDSS 2.5m", [2021-04-07T19:54:18.849671Z] instrument="Imager on SDSS 2.5m", [2021-04-07T19:54:18.849673Z] boresight_rotation_coord="sky", [2021-04-07T19:54:18.849675Z] dark_time=0.0*u.s, [2021-04-07T19:54:18.849677Z] detector_exposure_id=6377140399, [2021-04-07T19:54:18.849679Z] detector_name="54", [2021-04-07T19:54:18.849681Z] detector_unique_name="g4", [2021-04-07T19:54:18.849683Z] detector_group="4", [2021-04-07T19:54:18.849685Z] detector_num=15, [2021-04-07T19:54:18.849687Z] detector_serial="UNKNOWN", [2021-04-07T19:54:18.849689Z] exposure_id=6377, [2021-04-07T19:54:18.849691Z] exposure_group="6377", [2021-04-07T19:54:18.849693Z] exposure_time=53.907456*u.s, [2021-04-07T19:54:18.849695Z] object="82 S", [2021-04-07T19:54:18.849697Z] observation_counter=0, [2021-04-07T19:54:18.849699Z] observation_id="6377 4 g 407", [2021-04-07T19:54:18.849701Z] observation_type="science", [2021-04-07T19:54:18.849703Z] observation_reason="science", [2021-04-07T19:54:18.849705Z] observing_day=20060920, [2021-04-07T19:54:18.849708Z] physical_filter="g", [2021-04-07T19:54:18.849711Z] pressure=None, [2021-04-07T19:54:18.849714Z] relative_humidity=None, [2021-04-07T19:54:18.849718Z] science_program="82 S", [2021-04-07T19:54:18.849721Z] temperature=None, [2021-04-07T19:54:18.849724Z] visit_id=6377, [2021-04-07T19:54:18.849726Z] wcs_params=dict(max_sep=10.0))), [2021-04-07T19:54:18.849728Z] ) [2021-04-07T19:54:18.849730Z] for file, expected in test_data: [2021-04-07T19:54:18.849732Z] with self.subTest(f"Testing {file}"): [2021-04-07T19:54:18.849734Z] > self.assertObservationInfoFromYaml(file, dir=self.datadir, **expected) [2021-04-07T19:54:18.849736Z] [2021-04-07T19:54:18.849738Z] tests/test_sdss.py:55: [2021-04-07T19:54:18.849740Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-04-07T19:54:18.849742Z] python/astro_metadata_translator/tests.py:152: in assertObservationInfoFromYaml [2021-04-07T19:54:18.849744Z] self.assertObservationInfo(header, filename=file, check_wcs=check_wcs, [2021-04-07T19:54:18.849746Z] python/astro_metadata_translator/tests.py:183: in assertObservationInfo [2021-04-07T19:54:18.849748Z] obsinfo = ObservationInfo(header, pedantic=True, filename=filename) [2021-04-07T19:54:18.849750Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-04-07T19:54:18.849752Z] [2021-04-07T19:54:18.854866Z] self = [2021-04-07T19:54:18.854884Z] header = [2021-04-07T19:54:18.854889Z] filename = 'fitsheader-sdss-fpC-006377-g4-0399.yaml' [2021-04-07T19:54:18.854892Z] translator_class = [2021-04-07T19:54:18.854896Z] pedantic = True, search_path = None, required = set(), subset = None [2021-04-07T19:54:18.854900Z] [2021-04-07T19:54:18.854904Z] def __init__(self, header, filename=None, translator_class=None, pedantic=False, [2021-04-07T19:54:18.854908Z] search_path=None, required=None, subset=None): [2021-04-07T19:54:18.854911Z] [2021-04-07T19:54:18.854915Z] # Initialize the empty object [2021-04-07T19:54:18.854919Z] self._header = {} [2021-04-07T19:54:18.854923Z] self.filename = filename [2021-04-07T19:54:18.854927Z] self._translator = None [2021-04-07T19:54:18.854931Z] self.translator_class_name = "" [2021-04-07T19:54:18.854935Z] [2021-04-07T19:54:18.854939Z] # To allow makeObservationInfo to work, we special case a None [2021-04-07T19:54:18.854943Z] # header [2021-04-07T19:54:18.854947Z] if header is None: [2021-04-07T19:54:18.854950Z] return [2021-04-07T19:54:18.854954Z] [2021-04-07T19:54:18.854958Z] # Fix up the header (if required) [2021-04-07T19:54:18.854962Z] fix_header(header, translator_class=translator_class, filename=filename, [2021-04-07T19:54:18.854965Z] search_path=search_path) [2021-04-07T19:54:18.854969Z] [2021-04-07T19:54:18.854973Z] # Store the supplied header for later stripping [2021-04-07T19:54:18.854977Z] self._header = header [2021-04-07T19:54:18.854980Z] [2021-04-07T19:54:18.854984Z] if translator_class is None: [2021-04-07T19:54:18.854989Z] translator_class = MetadataTranslator.determine_translator(header, filename=filename) [2021-04-07T19:54:18.854993Z] elif not issubclass(translator_class, MetadataTranslator): [2021-04-07T19:54:18.854997Z] raise TypeError(f"Translator class must be a MetadataTranslator, not {translator_class}") [2021-04-07T19:54:18.855000Z] [2021-04-07T19:54:18.855004Z] # Create an instance for this header [2021-04-07T19:54:18.855008Z] translator = translator_class(header, filename=filename) [2021-04-07T19:54:18.855012Z] [2021-04-07T19:54:18.855015Z] # Store the translator [2021-04-07T19:54:18.855019Z] self._translator = translator [2021-04-07T19:54:18.855023Z] self.translator_class_name = translator_class.__name__ [2021-04-07T19:54:18.855026Z] [2021-04-07T19:54:18.855030Z] # Form file information string in case we need an error message [2021-04-07T19:54:18.855034Z] if filename: [2021-04-07T19:54:18.855038Z] file_info = f" and file {filename}" [2021-04-07T19:54:18.855041Z] else: [2021-04-07T19:54:18.855045Z] file_info = "" [2021-04-07T19:54:18.855050Z] [2021-04-07T19:54:18.855053Z] # Determine the properties of interest [2021-04-07T19:54:18.855057Z] all_properties = set(self._PROPERTIES) [2021-04-07T19:54:18.855061Z] if subset is not None: [2021-04-07T19:54:18.855064Z] if not subset: [2021-04-07T19:54:18.855068Z] raise ValueError("Cannot request no properties be calculated.") [2021-04-07T19:54:18.855072Z] if not subset.issubset(all_properties): [2021-04-07T19:54:18.855075Z] raise ValueError("Requested subset is not a subset of known properties. " [2021-04-07T19:54:18.855079Z] f"Got extra: {subset - all_properties}") [2021-04-07T19:54:18.855082Z] properties = subset [2021-04-07T19:54:18.855086Z] else: [2021-04-07T19:54:18.855090Z] properties = all_properties [2021-04-07T19:54:18.855094Z] [2021-04-07T19:54:18.855097Z] if required is None: [2021-04-07T19:54:18.855101Z] required = set() [2021-04-07T19:54:18.855105Z] else: [2021-04-07T19:54:18.855108Z] if not required.issubset(all_properties): [2021-04-07T19:54:18.855112Z] raise ValueError("Requested required properties include unknowns: " [2021-04-07T19:54:18.855171Z] f"{required - all_properties}") [2021-04-07T19:54:18.855176Z] [2021-04-07T19:54:18.855180Z] # Loop over each property and request the translated form [2021-04-07T19:54:18.855184Z] for t in properties: [2021-04-07T19:54:18.855187Z] # prototype code [2021-04-07T19:54:18.855191Z] method = f"to_{t}" [2021-04-07T19:54:18.855195Z] property = f"_{t}" [2021-04-07T19:54:18.855198Z] [2021-04-07T19:54:18.855202Z] try: [2021-04-07T19:54:18.855206Z] value = getattr(translator, method)() [2021-04-07T19:54:18.855210Z] except NotImplementedError as e: [2021-04-07T19:54:18.855213Z] raise NotImplementedError(f"No translation exists for property '{t}'" [2021-04-07T19:54:18.855217Z] f" using translator {translator.__class__}") from e [2021-04-07T19:54:18.855221Z] except KeyError as e: [2021-04-07T19:54:18.855225Z] err_msg = f"Error calculating property '{t}' using translator {translator.__class__}" \ [2021-04-07T19:54:18.855229Z] f"{file_info}" [2021-04-07T19:54:18.855232Z] if pedantic or t in required: [2021-04-07T19:54:18.855236Z] > raise KeyError(err_msg) from e [2021-04-07T19:54:18.855244Z] E KeyError: "Error calculating property 'tracking_radec' using translator and file fitsheader-sdss-fpC-006377-g4-0399.yaml" [2021-04-07T19:54:18.855249Z] [2021-04-07T19:54:18.855253Z] python/astro_metadata_translator/observationInfo.py:165: KeyError [2021-04-07T19:54:18.855256Z] __________________ TestTranslateHeader.test_translate_header ___________________ [2021-04-07T19:54:18.855260Z] [gw0] darwin -- Python 3.8.8 /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/bin/python3.8 [2021-04-07T19:54:18.855264Z] [2021-04-07T19:54:18.855267Z] self = [2021-04-07T19:54:18.855271Z] [2021-04-07T19:54:18.855275Z] def test_translate_header(self): [2021-04-07T19:54:18.855278Z] """Translate some header files.""" [2021-04-07T19:54:18.855282Z] with io.StringIO() as out: [2021-04-07T19:54:18.855286Z] with io.StringIO() as err: [2021-04-07T19:54:18.855289Z] okay, failed = process_files([TESTDATA], r"^fitsheader.*yaml$", 0, False, [2021-04-07T19:54:18.855293Z] outstream=out, errstream=err, output_mode="none") [2021-04-07T19:54:18.855297Z] > self.assertEqual(self._readlines(out), []) [2021-04-07T19:54:18.855300Z] E AssertionError: Lists differ: ['Failure processing /Users/am32496/Downlo[350 chars]ml"'] != [] [2021-04-07T19:54:18.855304Z] E [2021-04-07T19:54:18.855308Z] E First list contains 1 additional elements. [2021-04-07T19:54:18.855312Z] E First extra element 0: [2021-04-07T19:54:18.855316Z] E 'Failure processing /Users/am32496/Downloads/lsstsw/build/astro_metadata_translator/tests/data/fitsheader-sdss-fpC-006377-g4-0399.yaml: "Error calculating property \'tracking_radec\' using translator and file /Users/am32496/Downloads/lsstsw/build/astro_metadata_translator/tests/data/fitsheader-sdss-fpC-006377-g4-0399.yaml"' [2021-04-07T19:54:18.855321Z] E [2021-04-07T19:54:18.855324Z] E + [] [2021-04-07T19:54:18.855328Z] E - ['Failure processing ' [2021-04-07T19:54:18.855332Z] E - '/Users/am32496/Downloads/lsstsw/build/astro_metadata_translator/tests/data/fitsheader-sdss-fpC-006377-g4-0399.yaml: ' [2021-04-07T19:54:18.855336Z] E - '"Error calculating property \'tracking_radec\' using translator and file " [2021-04-07T19:54:18.855343Z] E - '/Users/am32496/Downloads/lsstsw/build/astro_metadata_translator/tests/data/fitsheader-sdss-fpC-006377-g4-0399.yaml"'] [2021-04-07T19:54:18.855347Z] [2021-04-07T19:54:18.855351Z] tests/test_translate_header.py:47: AssertionError [2021-04-07T19:54:18.855354Z] _______________ TestTranslateHeader.test_translate_header_table ________________ [2021-04-07T19:54:18.855358Z] [gw7] darwin -- Python 3.8.8 /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/bin/python3.8 [2021-04-07T19:54:18.855362Z] [2021-04-07T19:54:18.855365Z] self = [2021-04-07T19:54:18.855369Z] [2021-04-07T19:54:18.855373Z] def test_translate_header_table(self): [2021-04-07T19:54:18.855376Z] """Translate some header files with table output.""" [2021-04-07T19:54:18.855380Z] with io.StringIO() as out: [2021-04-07T19:54:18.855384Z] with io.StringIO() as err: [2021-04-07T19:54:18.855387Z] okay, failed = process_files([TESTDATA], r"^fitsheader.*yaml$", 0, False, [2021-04-07T19:54:18.855390Z] outstream=out, errstream=err) [2021-04-07T19:54:18.855393Z] output = self._readlines(out) [2021-04-07T19:54:18.855396Z] self.assertTrue(output[0].startswith("ObsId")) [2021-04-07T19:54:18.855399Z] self.assertTrue(output[1].startswith("-------")) [2021-04-07T19:54:18.855402Z] self.assertEqual(len(output), 12) [2021-04-07T19:54:18.855406Z] errlines = self._readlines(err) [2021-04-07T19:54:18.855410Z] self.assertEqual(len(errlines), 0) [2021-04-07T19:54:18.855413Z] [2021-04-07T19:54:18.855417Z] > self.assertEqual(len(okay), 10) [2021-04-07T19:54:18.855420Z] E AssertionError: 9 != 10 [2021-04-07T19:54:18.855424Z] [2021-04-07T19:54:18.855427Z] tests/test_translate_header.py:68: AssertionError [2021-04-07T19:54:18.855431Z] _______________ TestTranslateHeader.test_translate_header_fails ________________ [2021-04-07T19:54:18.855434Z] [gw2] darwin -- Python 3.8.8 /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/bin/python3.8 [2021-04-07T19:54:18.855438Z] [2021-04-07T19:54:18.855441Z] self = [2021-04-07T19:54:18.855445Z] [2021-04-07T19:54:18.855448Z] def test_translate_header_fails(self): [2021-04-07T19:54:18.855451Z] """Translate some header files that fail.""" [2021-04-07T19:54:18.855456Z] with io.StringIO() as out: [2021-04-07T19:54:18.855459Z] with io.StringIO() as err: [2021-04-07T19:54:18.855463Z] okay, failed = process_files([TESTDATA], r"^.*yaml$", 0, False, [2021-04-07T19:54:18.855466Z] outstream=out, errstream=err, output_mode="none") [2021-04-07T19:54:18.855470Z] [2021-04-07T19:54:18.855473Z] lines = self._readlines(out) [2021-04-07T19:54:18.855477Z] self.assertEqual(len(lines), len(failed)) [2021-04-07T19:54:18.855480Z] self.assertTrue(lines[0].startswith("Failure processing"), f"Line: '{lines[0]}'") [2021-04-07T19:54:18.855484Z] self.assertIn("not a mapping", lines[0], f"Line: '{lines[0]}'") [2021-04-07T19:54:18.855487Z] [2021-04-07T19:54:18.855491Z] lines = self._readlines(err) [2021-04-07T19:54:18.855494Z] self.assertEqual(len(lines), 13) [2021-04-07T19:54:18.855498Z] self.assertTrue(lines[0].startswith("Analyzing"), f"Line: '{lines[0]}'") [2021-04-07T19:54:18.855502Z] [2021-04-07T19:54:18.855505Z] > self.assertEqual(len(okay), 10) [2021-04-07T19:54:18.855509Z] E AssertionError: 9 != 10 [2021-04-07T19:54:18.855512Z] [2021-04-07T19:54:18.855516Z] tests/test_translate_header.py:87: AssertionError [2021-04-07T19:54:18.855520Z] _____________ TestTranslateHeader.test_translate_header_traceback ______________ [2021-04-07T19:54:18.855569Z] [gw7] darwin -- Python 3.8.8 /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/bin/python3.8 [2021-04-07T19:54:18.855575Z] [2021-04-07T19:54:18.855578Z] self = [2021-04-07T19:54:18.855582Z] [2021-04-07T19:54:18.855586Z] def test_translate_header_traceback(self): [2021-04-07T19:54:18.855590Z] """Translate some header files that fail and trigger traceback""" [2021-04-07T19:54:18.855593Z] with io.StringIO() as out: [2021-04-07T19:54:18.855597Z] with io.StringIO() as err: [2021-04-07T19:54:18.855601Z] okay, failed = process_files([TESTDATA], r"^.*yaml$", 0, True, [2021-04-07T19:54:18.855604Z] outstream=out, errstream=err, output_mode="none") [2021-04-07T19:54:18.855608Z] [2021-04-07T19:54:18.855612Z] lines = self._readlines(out) [2021-04-07T19:54:18.855615Z] > self.assertEqual(len(lines), 22) [2021-04-07T19:54:18.855619Z] E AssertionError: 56 != 22 [2021-04-07T19:54:18.855623Z] [2021-04-07T19:54:18.855626Z] tests/test_translate_header.py:98: AssertionError [2021-04-07T19:54:18.855630Z] =============================== warnings summary =============================== [2021-04-07T19:54:18.855634Z] :219 [2021-04-07T19:54:18.855637Z] :219 [2021-04-07T19:54:18.855641Z] :219 [2021-04-07T19:54:18.855645Z] :219 [2021-04-07T19:54:18.855648Z] :219 [2021-04-07T19:54:18.855652Z] :219 [2021-04-07T19:54:18.855656Z] :219 [2021-04-07T19:54:18.855659Z] :219 [2021-04-07T19:54:18.855663Z] :219: RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility. Expected 80 from C header, got 88 from PyObject [2021-04-07T19:54:18.855667Z] [2021-04-07T19:54:18.855670Z] tests/test_sdss.py::SdssTestCase::test_sdss_translator [2021-04-07T19:54:18.855674Z] tests/test_translate_header.py::TestTranslateHeader::test_translate_header_table [2021-04-07T19:54:18.855678Z] tests/test_translate_header.py::TestTranslateHeader::test_translate_header_fails [2021-04-07T19:54:18.855682Z] /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/lib/python3.8/site-packages/astropy/coordinates/earth.py:553: AstropyUserWarning: Could not access the online site list. Falling back on the built-in version, which is rather limited. If you want to retry the download, do EarthLocation._get_site_registry(force_download=True) [2021-04-07T19:54:18.855686Z] warn(AstropyUserWarning(msg.format(cls.__name__))) [2021-04-07T19:54:18.855689Z] [2021-04-07T19:54:18.855693Z] tests/test_translate_header.py::TestTranslateHeader::test_translate_header_table [2021-04-07T19:54:18.855697Z] /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/lib/python3.8/site-packages/yaml/reader.py:119: ResourceWarning: unclosed [2021-04-07T19:54:18.855707Z] return Mark(self.name, self.index, self.line, self.column, [2021-04-07T19:54:18.855711Z] [2021-04-07T19:54:18.855714Z] tests/test_translate_header.py::TestTranslateHeader::test_translate_header_table [2021-04-07T19:54:18.855718Z] /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/lib/python3.8/site-packages/yaml/reader.py:119: ResourceWarning: unclosed [2021-04-07T19:54:18.855722Z] return Mark(self.name, self.index, self.line, self.column, [2021-04-07T19:54:18.855725Z] [2021-04-07T19:54:18.855729Z] tests/test_translate_header.py::TestTranslateHeader::test_translate_header_fails [2021-04-07T19:54:18.855733Z] /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/lib/python3.8/site-packages/yaml/tokens.py:99: ResourceWarning: unclosed [2021-04-07T19:54:18.855736Z] self.value = value [2021-04-07T19:54:18.855740Z] [2021-04-07T19:54:18.855744Z] tests/test_translate_header.py::TestTranslateHeader::test_translate_header_fails [2021-04-07T19:54:18.855747Z] /Users/am32496/Downloads/lsstsw/miniconda/envs/lsst-scipipe-0.4.3/lib/python3.8/site-packages/yaml/tokens.py:99: ResourceWarning: unclosed [2021-04-07T19:54:18.855751Z] self.value = value [2021-04-07T19:54:18.855755Z] [2021-04-07T19:54:18.855758Z] -- Docs: https://docs.pytest.org/en/stable/warnings.html [2021-04-07T19:54:18.855762Z] - generated xml file: /Users/am32496/Downloads/lsstsw/build/astro_metadata_translator/tests/.tests/pytest-astro_metadata_translator.xml - [2021-04-07T19:54:18.855766Z] [2021-04-07T19:54:18.855769Z] ---------- coverage: platform darwin, python 3.8.8-final-0 ----------- [2021-04-07T19:54:18.855773Z] Name Stmts Miss Branch BrPart Cover [2021-04-07T19:54:18.855777Z] ---------------------------------------------------------------------------------------------- [2021-04-07T19:54:18.855781Z] python/astro_metadata_translator/__init__.py 6 0 0 0 100% [2021-04-07T19:54:18.855784Z] python/astro_metadata_translator/bin/__init__.py 0 0 0 0 100% [2021-04-07T19:54:18.855788Z] python/astro_metadata_translator/bin/translateheader.py 114 41 58 8 62% [2021-04-07T19:54:18.855792Z] python/astro_metadata_translator/cli/__init__.py 0 0 0 0 100% [2021-04-07T19:54:18.855795Z] python/astro_metadata_translator/file_helpers.py 107 22 54 5 77% [2021-04-07T19:54:18.855799Z] python/astro_metadata_translator/headers.py 182 5 106 4 97% [2021-04-07T19:54:18.855802Z] python/astro_metadata_translator/indexing.py 103 30 44 10 67% [2021-04-07T19:54:18.855807Z] python/astro_metadata_translator/observationGroup.py 72 9 26 3 88% [2021-04-07T19:54:18.855810Z] python/astro_metadata_translator/observationInfo.py 183 10 78 6 93% [2021-04-07T19:54:18.855814Z] python/astro_metadata_translator/properties.py 43 0 2 0 100% [2021-04-07T19:54:18.855818Z] python/astro_metadata_translator/serialize/__init__.py 1 0 0 0 100% [2021-04-07T19:54:18.855822Z] python/astro_metadata_translator/serialize/fits.py 34 1 12 5 87% [2021-04-07T19:54:18.855825Z] python/astro_metadata_translator/tests.py 83 17 28 3 75% [2021-04-07T19:54:18.855831Z] python/astro_metadata_translator/translator.py 322 44 134 17 84% [2021-04-07T19:54:18.855835Z] python/astro_metadata_translator/translators/__init__.py 8 0 0 0 100% [2021-04-07T19:54:18.855839Z] python/astro_metadata_translator/translators/decam.py 125 26 32 5 73% [2021-04-07T19:54:18.855843Z] python/astro_metadata_translator/translators/fits.py 54 0 16 0 100% [2021-04-07T19:54:18.855846Z] python/astro_metadata_translator/translators/helpers.py 51 12 26 8 71% [2021-04-07T19:54:18.855850Z] python/astro_metadata_translator/translators/hsc.py 81 14 20 5 77% [2021-04-07T19:54:18.855853Z] python/astro_metadata_translator/translators/megaprime.py 89 15 24 5 75% [2021-04-07T19:54:18.855857Z] python/astro_metadata_translator/translators/sdss.py 94 25 16 3 69% [2021-04-07T19:54:18.855861Z] python/astro_metadata_translator/translators/subaru.py 12 0 0 0 100% [2021-04-07T19:54:18.855900Z] python/astro_metadata_translator/translators/suprimecam.py 101 10 22 6 85% [2021-04-07T19:54:18.855905Z] python/astro_metadata_translator/version.py 5 0 0 0 100% [2021-04-07T19:54:18.855909Z] setup.py 9 9 0 0 0% [2021-04-07T19:54:18.855913Z] tests/test_basics.py 31 1 2 1 94% [2021-04-07T19:54:18.855916Z] tests/test_cfht.py 22 1 4 1 92% [2021-04-07T19:54:18.855920Z] tests/test_decam.py 14 1 4 1 89% [2021-04-07T19:54:18.855924Z] tests/test_groups.py 55 1 4 1 97% [2021-04-07T19:54:18.855927Z] tests/test_headers.py 176 1 6 1 99% [2021-04-07T19:54:18.855931Z] tests/test_indexing.py 97 1 4 1 98% [2021-04-07T19:54:18.855935Z] tests/test_sdss.py 14 1 4 1 89% [2021-04-07T19:54:18.855938Z] tests/test_shadowing.py 40 4 2 1 88% [2021-04-07T19:54:18.855942Z] tests/test_subaru.py 35 1 8 1 95% [2021-04-07T19:54:18.855946Z] tests/test_translate_header.py 82 14 4 1 83% [2021-04-07T19:54:18.855949Z] tests/test_translation.py 110 1 2 1 98% [2021-04-07T19:54:18.855953Z] ---------------------------------------------------------------------------------------------- [2021-04-07T19:54:18.855957Z] TOTAL 2555 317 742 104 84% [2021-04-07T19:54:18.855961Z] Coverage HTML written to dir tests/.tests/pytest-astro_metadata_translator.xml-htmlcov [2021-04-07T19:54:18.855965Z] Coverage XML written to file tests/.tests/pytest-astro_metadata_translator.xml-cov-astro_metadata_translator.xml [2021-04-07T19:54:18.855968Z] [2021-04-07T19:54:18.855972Z] =========================== short test summary info ============================ [2021-04-07T19:54:18.855976Z] FAILED tests/test_sdss.py::SdssTestCase::test_sdss_translator - KeyError: "Er... [2021-04-07T19:54:18.855979Z] FAILED tests/test_translate_header.py::TestTranslateHeader::test_translate_header [2021-04-07T19:54:18.855983Z] FAILED tests/test_translate_header.py::TestTranslateHeader::test_translate_header_table [2021-04-07T19:54:18.855987Z] FAILED tests/test_translate_header.py::TestTranslateHeader::test_translate_header_fails [2021-04-07T19:54:18.855991Z] FAILED tests/test_translate_header.py::TestTranslateHeader::test_translate_header_traceback [2021-04-07T19:54:18.855994Z] ================== 5 failed, 81 passed, 15 warnings in 20.76s ================== [2021-04-07T19:54:18.946398Z] Global pytest run: failed with 1 [2021-04-07T19:54:18.962508Z] Failed test output: [2021-04-07T19:54:18.965442Z] Global pytest output is in /Users/am32496/Downloads/lsstsw/build/astro_metadata_translator/tests/.tests/pytest-astro_metadata_translator.xml.failed [2021-04-07T19:54:18.965462Z] The following tests failed: [2021-04-07T19:54:18.967509Z] /Users/am32496/Downloads/lsstsw/build/astro_metadata_translator/tests/.tests/pytest-astro_metadata_translator.xml.failed [2021-04-07T19:54:18.967709Z] 1 tests failed [2021-04-07T19:54:18.968539Z] scons: *** [checkTestStatus] Error 1 [2021-04-07T19:54:18.969125Z] scons: building terminated because of errors.