Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[track] comparison image url failing #337

Open
mtbannister opened this issue Dec 3, 2014 · 0 comments
Open

[track] comparison image url failing #337

mtbannister opened this issue Dec 3, 2014 · 0 comments

Comments

@mtbannister
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant