opencadc / vostools

VOSpace command line and FUSE clients
https://www.canfar.net/en/docs/storage
12 stars 18 forks source link

vcp can't handle coordinate-based access on 4D FITS files? #129

Closed Cameron-Van-Eck closed 4 years ago

Cameron-Van-Eck commented 4 years ago

Hello:

I want to report a problem I ran into using vcp. I have some very large FITS files (67 GB each) on CANFAR, from which I want to download small regions. When I use the pixel-based cutout method (file.fits[xmin:xmax,ymin:ymax]), it works as expected, and I get a file with the expected dimensions. A great feature, thanks for making it!

What is not working for me is the coordinate based cutout method ( file.fits(ra,dec,rad) ). On my files it consistently fails with "HTTPError: 500 Server Error: Internal Server Error", and I am unable to diagnose further (full error log below).

This is simply speculation, but I wonder if this may be a result of my FITS files having 4 axes (3 non-degenerate)? I went digging for a 2D fits image and tested it, and it worked fine. This is potentially a big problem for those of us working with radio data, especially polarimetry data, because ALL of our data natively has 4 axes (often 1-2 of these are degenerate, but not always). All of the files we get from the VLA, and from ASKAP, are 4D by default (I don't even have any 2D files to test with; I had to go digging into the CANFAR public archives to find one!).

Any chance you could look into this? For clarity: I'm not asking for any ability to cutout based on the additional axes, just RA and Dec are fine. I wrote a little work-around script to do the coordinate-to-pixel conversion and then submits a copy request based on the pixels, and that seems to work OK in the mean time, but I'd like a cleaner solution in the long run (particularly when sharing data with collaborators).

Thanks a lot, Cameron

Diagnostic information: OS: MacOS 10.13.6 Python version 3.7.1 (Anaconda installation) vos version 3.0.14

Attempt on 4D file (sidenote: this file should be public, if you want to test yourself): vcp -d --vos-debug vos:cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits(326.22,-50.8933,0.01) ~/Desktop/image.fits 2>&1 | tee -a vcp_log.txt Log:

DEBUG 2020-01-22 11:23:21,285 140735930954624 vos-3.0.14 vos.init.238 Authenticate with cert /Users/cvaneck/.ssl/cadcproxy.pem DEBUG 2020-01-22 11:23:21,297 140735930954624 vos-3.0.14 ws._get_capability_url.708 Resolved URL: http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/reg/resource-caps DEBUG 2020-01-22 11:23:21,297 140735930954624 vos-3.0.14 ws._get_content.657 Read cached content of /Users/cvaneck/.config/cadc-registry/resource-caps DEBUG 2020-01-22 11:23:21,297 140735930954624 vos-3.0.14 ws._get_content.657 Read cached content of /Users/cvaneck/.config/cadc-registry/cadc.nrc.ca/.vault DEBUG 2020-01-22 11:23:21,299 140735930954624 vos-3.0.14 wscapabilities.add_interface.193 access url already exists for ivo://ivoa.net/sso#BasicAA DEBUG 2020-01-22 11:23:21,300 140735930954624 vos-3.0.14 wscapabilities.add_interface.193 access url already exists for ivo://ivoa.net/sso#BasicAA DEBUG 2020-01-22 11:23:21,304 140735930954624 vos-3.0.14 vcp.vcp.357 cutout: None DEBUG 2020-01-22 11:23:21,304 140735930954624 vos-3.0.14 vos.get_node.1844 Getting node vos:cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits(326.22,-50.8933,0.01) DEBUG 2020-01-22 11:23:21,305 140735930954624 vos-3.0.14 vos.fix_uri.1797 Got value of args: DEBUG 2020-01-22 11:23:21,305 140735930954624 vos-3.0.14 vos.fix_uri.1811 Match : {'filename': 'cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits', 'cutout': '(326.22,-50.8933,0.01)', 'pix': None, 'wcs': '(326.22,-50.8933,0.01)', 'ra': '326.22', 'dec': '-50.8933', 'rad': '0.01'} DEBUG 2020-01-22 11:23:21,305 140735930954624 vos-3.0.14 vos.fix_uri.1828 Returning URI: vos://cadc.nrc.ca!vault/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits DEBUG 2020-01-22 11:23:21,305 140735930954624 vos-3.0.14 vos.get_node.1850 Getting node vos://cadc.nrc.ca!vault/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits from ws DEBUG 2020-01-22 11:23:21,305 140735930954624 vos-3.0.14 vos.fix_uri.1797 Got value of args: DEBUG 2020-01-22 11:23:21,305 140735930954624 vos-3.0.14 vos.fix_uri.1811 Match : {'filename': '/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits', 'cutout': None, 'pix': None, 'wcs': None, 'ra': None, 'dec': None, 'rad': None} DEBUG 2020-01-22 11:23:21,305 140735930954624 vos-3.0.14 vos.fix_uri.1828 Returning URI: vos://cadc.nrc.ca!vault/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits DEBUG 2020-01-22 11:23:21,305 140735930954624 vos-3.0.14 vos.get_node_url.1973 Getting URL for: vos://cadc.nrc.ca!vault/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits DEBUG 2020-01-22 11:23:21,306 140735930954624 vos-3.0.14 ws._get_capability_url.708 Resolved URL: http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/reg/resource-caps DEBUG 2020-01-22 11:23:21,306 140735930954624 vos-3.0.14 ws._get_content.657 Read cached content of /Users/cvaneck/.config/cadc-registry/resource-caps DEBUG 2020-01-22 11:23:21,306 140735930954624 vos-3.0.14 ws._get_content.657 Read cached content of /Users/cvaneck/.config/cadc-registry/cadc.nrc.ca/.vault DEBUG 2020-01-22 11:23:21,307 140735930954624 vos-3.0.14 wscapabilities.add_interface.193 access url already exists for ivo://ivoa.net/sso#BasicAA DEBUG 2020-01-22 11:23:21,308 140735930954624 vos-3.0.14 wscapabilities.add_interface.193 access url already exists for ivo://ivoa.net/sso#BasicAA DEBUG 2020-01-22 11:23:21,311 140735930954624 vos-3.0.14 vos.get_node_url.2020 URL: https://ws-cadc.canfar.net/vault/nodes/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits?limit=0 (GET) DEBUG 2020-01-22 11:23:21,311 140735930954624 vos-3.0.14 vos.open.1091 Opening https://ws-cadc.canfar.net/vault/nodes/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits?limit=0 (GET) DEBUG 2020-01-22 11:23:21,311 140735930954624 vos-3.0.14 ws._get_session.381 Creating session. DEBUG 2020-01-22 11:23:21,323 140735930954624 vos-3.0.14 ws.send.477 Sending request <PreparedRequest [GET]> to server. DEBUG 2020-01-22 11:23:21,323 140735930954624 vos-3.0.14 connectionpool._new_conn.813 Starting new HTTPS connection (1): ws-cadc.canfar.net:443 DEBUG 2020-01-22 11:23:31,403 140735930954624 vos-3.0.14 connectionpool._make_request.393 https://ws-cadc.canfar.net:443 "GET /vault/nodes/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits?limit=0 HTTP/1.1" 200 1382 DEBUG 2020-01-22 11:23:31,405 140735930954624 vos-3.0.14 vos.update.364 vos://cadc.nrc.ca!vault/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits ivo://cadc.nrc.ca/vospace/core#islocked -> {'length': '71482570560', 'MD5': '816227b1e8e7afeec2d1aec57fd116cd', 'date': '2020-01-21T18:59:50.237', 'groupwrite': 'ivo://cadc.nrc.ca/gms#CIRADA-Polarimetry', 'ispublic': 'true', 'creator': 'CN=CameronVanEck_325,OU=CADC,O=HIA,C=CA'} DEBUG 2020-01-22 11:23:31,405 140735930954624 vos-3.0.14 vos.update.367 Setting file attributes via setattr DEBUG 2020-01-22 11:23:31,410 140735930954624 vos-3.0.14 vos.update.369 Setting file x-attributes via setxattr DEBUG 2020-01-22 11:23:31,411 140735930954624 vos-3.0.14 vcp.access.161 checking for access vos:cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits(326.22,-50.8933,0.01) DEBUG 2020-01-22 11:23:31,411 140735930954624 vos-3.0.14 vos.get_node.1844 Getting node vos:cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits(326.22,-50.8933,0.01) DEBUG 2020-01-22 11:23:31,412 140735930954624 vos-3.0.14 vos.fix_uri.1797 Got value of args: DEBUG 2020-01-22 11:23:31,412 140735930954624 vos-3.0.14 vos.fix_uri.1811 Match : {'filename': 'cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits', 'cutout': '(326.22,-50.8933,0.01)', 'pix': None, 'wcs': '(326.22,-50.8933,0.01)', 'ra': '326.22', 'dec': '-50.8933', 'rad': '0.01'} DEBUG 2020-01-22 11:23:31,413 140735930954624 vos-3.0.14 vos.fix_uri.1828 Returning URI: vos://cadc.nrc.ca!vault/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits DEBUG 2020-01-22 11:23:31,413 140735930954624 vos-3.0.14 vcp.islink.145 Doing an islink on vos:cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits(326.22,-50.8933,0.01) DEBUG 2020-01-22 11:23:31,413 140735930954624 vos-3.0.14 vos.get_node.1844 Getting node vos:cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits(326.22,-50.8933,0.01) DEBUG 2020-01-22 11:23:31,413 140735930954624 vos-3.0.14 vos.fix_uri.1797 Got value of args: DEBUG 2020-01-22 11:23:31,413 140735930954624 vos-3.0.14 vos.fix_uri.1811 Match : {'filename': 'cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits', 'cutout': '(326.22,-50.8933,0.01)', 'pix': None, 'wcs': '(326.22,-50.8933,0.01)', 'ra': '326.22', 'dec': '-50.8933', 'rad': '0.01'} DEBUG 2020-01-22 11:23:31,414 140735930954624 vos-3.0.14 vos.fix_uri.1828 Returning URI: vos://cadc.nrc.ca!vault/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits DEBUG 2020-01-22 11:23:31,414 140735930954624 vos-3.0.14 vcp.isdir.138 Doing an isdir on vos:cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits(326.22,-50.8933,0.01) DEBUG 2020-01-22 11:23:31,414 140735930954624 vos-3.0.14 vos.get_node.1844 Getting node vos:cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits(326.22,-50.8933,0.01) DEBUG 2020-01-22 11:23:31,414 140735930954624 vos-3.0.14 vos.fix_uri.1797 Got value of args: DEBUG 2020-01-22 11:23:31,414 140735930954624 vos-3.0.14 vos.fix_uri.1811 Match : {'filename': 'cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits', 'cutout': '(326.22,-50.8933,0.01)', 'pix': None, 'wcs': '(326.22,-50.8933,0.01)', 'ra': '326.22', 'dec': '-50.8933', 'rad': '0.01'} DEBUG 2020-01-22 11:23:31,414 140735930954624 vos-3.0.14 vos.fix_uri.1828 Returning URI: vos://cadc.nrc.ca!vault/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits DEBUG 2020-01-22 11:23:31,415 140735930954624 vos-3.0.14 vcp.isdir.138 Doing an isdir on /Users/cvaneck/Desktop/image.fits DEBUG 2020-01-22 11:23:31,415 140735930954624 vos-3.0.14 vcp.islink.145 Doing an islink on vos:cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits(326.22,-50.8933,0.01) DEBUG 2020-01-22 11:23:31,415 140735930954624 vos-3.0.14 vos.get_node.1844 Getting node vos:cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits(326.22,-50.8933,0.01) DEBUG 2020-01-22 11:23:31,416 140735930954624 vos-3.0.14 vos.fix_uri.1797 Got value of args: DEBUG 2020-01-22 11:23:31,416 140735930954624 vos-3.0.14 vos.fix_uri.1811 Match : {'filename': 'cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits', 'cutout': '(326.22,-50.8933,0.01)', 'pix': None, 'wcs': '(326.22,-50.8933,0.01)', 'ra': '326.22', 'dec': '-50.8933', 'rad': '0.01'} DEBUG 2020-01-22 11:23:31,416 140735930954624 vos-3.0.14 vos.fix_uri.1828 Returning URI: vos://cadc.nrc.ca!vault/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits DEBUG 2020-01-22 11:23:31,416 140735930954624 vos-3.0.14 vcp.isdir.138 Doing an isdir on vos:cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits(326.22,-50.8933,0.01) DEBUG 2020-01-22 11:23:31,416 140735930954624 vos-3.0.14 vos.get_node.1844 Getting node vos:cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits(326.22,-50.8933,0.01) DEBUG 2020-01-22 11:23:31,417 140735930954624 vos-3.0.14 vos.fix_uri.1797 Got value of args: DEBUG 2020-01-22 11:23:31,417 140735930954624 vos-3.0.14 vos.fix_uri.1811 Match : {'filename': 'cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits', 'cutout': '(326.22,-50.8933,0.01)', 'pix': None, 'wcs': '(326.22,-50.8933,0.01)', 'ra': '326.22', 'dec': '-50.8933', 'rad': '0.01'} DEBUG 2020-01-22 11:23:31,417 140735930954624 vos-3.0.14 vos.fix_uri.1828 Returning URI: vos://cadc.nrc.ca!vault/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits DEBUG 2020-01-22 11:23:31,417 140735930954624 vos-3.0.14 vcp.access.161 checking for access /Users/cvaneck/Desktop DEBUG 2020-01-22 11:23:31,417 140735930954624 vos-3.0.14 vcp.isdir.138 Doing an isdir on /Users/cvaneck/Desktop INFO 2020-01-22 11:23:31,417 140735930954624 vos-3.0.14 vcp.copy.285 vos:cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits(326.22,-50.8933,0.01) -> /Users/cvaneck/Desktop/image.fits DEBUG 2020-01-22 11:23:31,418 140735930954624 vos-3.0.14 vcp.copy.289 Starting call to copy DEBUG 2020-01-22 11:23:31,418 140735930954624 vos-3.0.14 vos.fix_uri.1797 Got value of args: DEBUG 2020-01-22 11:23:31,418 140735930954624 vos-3.0.14 vos.fix_uri.1811 Match : {'filename': 'cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits', 'cutout': None, 'pix': None, 'wcs': None, 'ra': None, 'dec': None, 'rad': None} DEBUG 2020-01-22 11:23:31,419 140735930954624 vos-3.0.14 vos.fix_uri.1828 Returning URI: vos://cadc.nrc.ca!vault/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits DEBUG 2020-01-22 11:23:31,419 140735930954624 vos-3.0.14 vos.get_node.1844 Getting node vos://cadc.nrc.ca!vault/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits DEBUG 2020-01-22 11:23:31,419 140735930954624 vos-3.0.14 vos.fix_uri.1797 Got value of args: DEBUG 2020-01-22 11:23:31,419 140735930954624 vos-3.0.14 vos.fix_uri.1811 Match : {'filename': '/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits', 'cutout': None, 'pix': None, 'wcs': None, 'ra': None, 'dec': None, 'rad': None} DEBUG 2020-01-22 11:23:31,420 140735930954624 vos-3.0.14 vos.fix_uri.1828 Returning URI: vos://cadc.nrc.ca!vault/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits DEBUG 2020-01-22 11:23:31,420 140735930954624 vos-3.0.14 vos.get_node_url.1973 Getting URL for: vos://cadc.nrc.ca!vault/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits DEBUG 2020-01-22 11:23:31,423 140735930954624 vos-3.0.14 vos.transfer.2182 b'vos://cadc.nrc.ca!vault/cirada/polarimetry/ASKAP/SB10168/image.restored.i.SB10168.contcube.fits</vos:target>pullFromVoSpace</vos:direction>CIRCLE ICRS 326.22 -50.8933 0.01</vos:param></vos:view></vos:transfer>' DEBUG 2020-01-22 11:23:31,423 140735930954624 vos-3.0.14 vos.transfer.2183 Sending to : https://ws-cadc.canfar.net/vault/synctrans DEBUG 2020-01-22 11:23:31,438 140735930954624 vos-3.0.14 ws.send.477 Sending request <PreparedRequest [POST]> to server. DEBUG 2020-01-22 11:23:42,169 140735930954624 vos-3.0.14 connectionpool._make_request.393 https://ws-cadc.canfar.net:443 "POST /vault/synctrans HTTP/1.1" 303 0 DEBUG 2020-01-22 11:23:42,178 140735930954624 vos-3.0.14 vos.transfer.2191 <Response [303]> DEBUG 2020-01-22 11:23:42,178 140735930954624 vos-3.0.14 vos.transfer.2192 DEBUG 2020-01-22 11:23:42,179 140735930954624 vos-3.0.14 vos.transfer.2201 Got back from transfer URL: https://ws-cadc.canfar.net/vault/transfers/udnkencpokeark3r/results/transferDetails DEBUG 2020-01-22 11:23:42,189 140735930954624 vos-3.0.14 ws.send.477 Sending request <PreparedRequest [GET]> to server. DEBUG 2020-01-22 11:23:48,361 140735930954624 vos-3.0.14 connectionpool._make_request.393 https://ws-cadc.canfar.net:443 "GET /vault/transfers/udnkencpokeark3r/results/transferDetails HTTP/1.1" 303 0 DEBUG 2020-01-22 11:23:48,375 140735930954624 vos-3.0.14 ws.send.477 Sending request <PreparedRequest [GET]> to server. DEBUG 2020-01-22 11:24:28,891 140735930954624 vos-3.0.14 connectionpool._make_request.393 https://ws-cadc.canfar.net:443 "GET /vault/xfer/udnkencpokeark3r HTTP/1.1" 500 None DEBUG 2020-01-22 11:24:28,893 140735930954624 vos-3.0.14 vcp.copy.295 Internal Error: (500) Internal Server Error File "/anaconda3/bin/vcp", line 10, in sys.exit(vcp()) File "/anaconda3/lib/python3.7/site-packages/vos/commands/vcp.py", line 409, in vcp ignore=args.ignore, head=args.head) File "/anaconda3/lib/python3.7/site-packages/vos/commands/vcp.py", line 291, in copy send_md5=True, head=head) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 1651, in copy view=view) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 1989, in get_node_url return self._get(uri, view=view, cutout=cutout) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 2134, in _get return self.transfer(uri, "pullFromVoSpace", view, cutout) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 2212, in transfer xml_string = self.conn.session.get(xfer_url).text File "/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 546, in get return self.request('GET', url, kwargs) File "/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 533, in request resp = self.send(prep, send_kwargs) File "/anaconda3/lib/python3.7/site-packages/cadcutils/net/ws.py", line 483, in send self.check_status(response) File "/anaconda3/lib/python3.7/site-packages/cadcutils/net/ws.py", line 548, in check_status raise exceptions.InternalServerException(orig_exception=e) File "/anaconda3/lib/python3.7/site-packages/cadcutils/exceptions.py", line 173, in init HttpException.init(self, msg, orig_exception) File "/anaconda3/lib/python3.7/site-packages/cadcutils/exceptions.py", line 99, in init self._msg, ''.join(traceback.format_stack())) ERROR:: Internal Error: (500) Internal Server Error File "/anaconda3/bin/vcp", line 10, in sys.exit(vcp()) File "/anaconda3/lib/python3.7/site-packages/vos/commands/vcp.py", line 409, in vcp ignore=args.ignore, head=args.head) File "/anaconda3/lib/python3.7/site-packages/vos/commands/vcp.py", line 291, in copy send_md5=True, head=head) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 1651, in copy view=view) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 1989, in get_node_url return self._get(uri, view=view, cutout=cutout) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 2134, in _get return self.transfer(uri, "pullFromVoSpace", view, cutout) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 2212, in transfer xml_string = self.conn.session.get(xfer_url).text File "/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 546, in get return self.request('GET', url, kwargs) File "/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 533, in request resp = self.send(prep, send_kwargs) File "/anaconda3/lib/python3.7/site-packages/cadcutils/net/ws.py", line 483, in send self.check_status(response) File "/anaconda3/lib/python3.7/site-packages/cadcutils/net/ws.py", line 548, in check_status raise exceptions.InternalServerException(orig_exception=e) File "/anaconda3/lib/python3.7/site-packages/cadcutils/exceptions.py", line 173, in init HttpException.init(self, msg, orig_exception) File "/anaconda3/lib/python3.7/site-packages/cadcutils/exceptions.py", line 99, in init self._msg, ''.join(traceback.format_stack()))

DEBUG 2020-01-22 11:24:28,894 140735930954624 vos-3.0.14 commonparser.exit_on_exception.39 Traceback (most recent call last): File "/anaconda3/lib/python3.7/site-packages/cadcutils/net/ws.py", line 534, in check_status response.raise_for_status() File "/anaconda3/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://ws-cadc.canfar.net/vault/xfer/udnkencpokeark3r

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/anaconda3/lib/python3.7/site-packages/vos/commands/vcp.py", line 409, in vcp ignore=args.ignore, head=args.head) File "/anaconda3/lib/python3.7/site-packages/vos/commands/vcp.py", line 319, in copy raise client_exception File "/anaconda3/lib/python3.7/site-packages/vos/commands/vcp.py", line 291, in copy send_md5=True, head=head) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 1651, in copy view=view) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 1989, in get_node_url return self._get(uri, view=view, cutout=cutout) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 2134, in _get return self.transfer(uri, "pullFromVoSpace", view, cutout) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 2212, in transfer xml_string = self.conn.session.get(xfer_url).text File "/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 546, in get return self.request('GET', url, kwargs) File "/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 533, in request resp = self.send(prep, send_kwargs) File "/anaconda3/lib/python3.7/site-packages/cadcutils/net/ws.py", line 483, in send self.check_status(response) File "/anaconda3/lib/python3.7/site-packages/cadcutils/net/ws.py", line 548, in check_status raise exceptions.InternalServerException(orig_exception=e) cadcutils.exceptions.InternalServerException: Internal Error: (500) Internal Server Error File "/anaconda3/bin/vcp", line 10, in sys.exit(vcp()) File "/anaconda3/lib/python3.7/site-packages/vos/commands/vcp.py", line 409, in vcp ignore=args.ignore, head=args.head) File "/anaconda3/lib/python3.7/site-packages/vos/commands/vcp.py", line 291, in copy send_md5=True, head=head) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 1651, in copy view=view) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 1989, in get_node_url return self._get(uri, view=view, cutout=cutout) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 2134, in _get return self.transfer(uri, "pullFromVoSpace", view, cutout) File "/anaconda3/lib/python3.7/site-packages/vos/vos.py", line 2212, in transfer xml_string = self.conn.session.get(xfer_url).text File "/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 546, in get return self.request('GET', url, kwargs) File "/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 533, in request resp = self.send(prep, send_kwargs) File "/anaconda3/lib/python3.7/site-packages/cadcutils/net/ws.py", line 483, in send self.check_status(response) File "/anaconda3/lib/python3.7/site-packages/cadcutils/net/ws.py", line 548, in check_status raise exceptions.InternalServerException(orig_exception=e) File "/anaconda3/lib/python3.7/site-packages/cadcutils/exceptions.py", line 173, in init HttpException.init(self, msg, orig_exception) File "/anaconda3/lib/python3.7/site-packages/cadcutils/exceptions.py", line 99, in init self._msg, ''.join(traceback.format_stack()))

Attempt on 2D file: vcp vos:/SITELLE/Abell2390/A2390NW_C4.merged.InterferogramMerger.deep_frame.fits(0.085658,0.09555,0.01) ./image.fits Log omitted. The file looked as expected, with the correct coordinates and size.

ijiraq commented 4 years ago

This appears to be a service layer problem in how cutouts are done. It might relate to the multiple axis or it might also be about the size of the file and how cutouts are done when their are multiple dimensions.

at88mph commented 4 years ago

Hi Cameron,

There is an issue where the Polarization WCS is unreadable/unusable in that file. We're working on a bug fix now.

pdowler commented 4 years ago

The polarization WCS issue was fixed, but I also determined that the fits wile in question uses the PC matrix + CDELT values for spatial WCS. Our current s/w that extracts WCS from the file in order to compute cutouts only supports CD matrix. I will create an issue (bug) in the correct place and we'll determine when we can get someone to work on the fix.

ijiraq commented 4 years ago

Adding support to PC matrix values is now being worked on. @pdowler where is the 'the correct place' that you created an issue in to fix this? I would like to close this issue and link to the other location.

jburke-cadc commented 4 years ago

Hi Cameron,

Yesterday March 18th we released a software fix that supports PC matrix keywords in the FITS header. I ran your example vcp command which gave me a cutout that matches the requested coordinates. Thanks for the very detailed description. It really helps when fixing a bug.

Closing this issue.