Skip to content

[track] comparison image url failing #337

@mtbannister

Description

@mtbannister

The url for comparison images is more manually generated than in normal SourceCutout creation.
Currently the keymap 'b' is producing:

ERROR: [Errno 500] InternalFault: Failed to read observation from fits file.: 'https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/vospace/nodes/OSSOS/dbimages/1645756/1645756p.fits?cutout=CIRCLE+ICRS+12.5863231586+2.23955583219+0.00644606654704&view=cutout'
While loading None {'URL': 'https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/vospace/nodes/OSSOS/dbimages/1645756/1645756p.fits?cutout=CIRCLE+ICRS+12.5863231586+2.23955583219+0.00644606654704&view=cutout'}
ERROR: TypeError: 'NoneType' object has no attribute 'getitem' [ossos.downloads.cutouts.source]
Traceback (most recent call last):
File "/Users/michele/Dropbox/OSSOS/ossos-pipeline/src/ossos-pipeline/ossos/gui/views/keybinds.py", line 84, in on_load_comparison_keybind
self.controller.on_load_comparison()
File "/Users/michele/Dropbox/OSSOS/ossos-pipeline/src/ossos-pipeline/ossos/gui/controllers.py", line 440, in on_load_comparison
cutout.retrieve_comparison_image(self.downloader)
File "/Users/michele/Dropbox/OSSOS/ossos-pipeline/src/ossos-pipeline/ossos/downloads/cutouts/source.py", line 246, in retrieve_comparison_image
comp_wcs = wcs.WCS(hdu_list[-1].header)
TypeError: 'NoneType' object has no attribute 'getitem'

cutout.retrieve_comparison_image() calls downloads/core.py's Downloader.download_hdulist(), which was recently deprecated in favour of greater usage of storage.get_image().

However, simply switching the call to Downloader.download_hdulist() and making more use of storage:

    base_url = storage.DBIMAGES+"/{}/{}p.fits".format(
        comparison, comparison)
    hdu_list = storage.get_image(expnum=comparison,
                                ccd=self.reading.get_ccd_num(),
                                cutout=url,
                                version=self.reading.get_observation().ftype,
                                prefix=self.reading.get_observation().fk,
                                return_file=False
                                )

is failing on the url construction:
File "/Users/michele/Dropbox/OSSOS/ossos-pipeline/src/ossos-pipeline/ossos/downloads/cutouts/source.py", line 245, in retrieve_comparison_image
return_file=False
File "/Users/michele/Dropbox/OSSOS/ossos-pipeline/src/ossos-pipeline/ossos/storage.py", line 398, in get_image
raise IOError(errno.ENOENT, "Failed to get image using {} {} {} {}.".format(expnum, version, ccd, cutout))
IOError: [Errno 2] Failed to get image using 1645756 p 33 [34]https://www.canfar.phys.uvic.ca/vospace/nodes/OSSOS/dbimages/1645756/1645756p.fits?cutout=CIRCLE+ICRS+12.5863231586+2.23955583219+0.00644606654704&view=cutout.

Has something changed in the way CIRCLE ICRS or similar are described, or have I just improperly constructed the url?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions