{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astropy/issues/4646","repository_url":"https://api.github.com/repos/astropy/astropy","labels_url":"https://api.github.com/repos/astropy/astropy/issues/4646/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/4646/comments","events_url":"https://api.github.com/repos/astropy/astropy/issues/4646/events","html_url":"https://github.com/astropy/astropy/issues/4646","id":137175605,"number":4646,"title":"test_compression_column_tforms failure with cfitsio 3.380","user":{"login":"olebole","id":397223,"avatar_url":"https://avatars.githubusercontent.com/u/397223?v=3","gravatar_id":"","url":"https://api.github.com/users/olebole","html_url":"https://github.com/olebole","followers_url":"https://api.github.com/users/olebole/followers","following_url":"https://api.github.com/users/olebole/following{/other_user}","gists_url":"https://api.github.com/users/olebole/gists{/gist_id}","starred_url":"https://api.github.com/users/olebole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olebole/subscriptions","organizations_url":"https://api.github.com/users/olebole/orgs","repos_url":"https://api.github.com/users/olebole/repos","events_url":"https://api.github.com/users/olebole/events{/privacy}","received_events_url":"https://api.github.com/users/olebole/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/astropy/astropy/labels/io.fits","name":"io.fits","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-29T07:43:26Z","updated_at":"2016-02-29T13:04:01Z","closed_at":null,"body":"With the latest relase of cfitsio (which just entered Debian unstable), there are two test failures. The first one:\r\n```\r\n_________ TestCompressedImage.test_compression_column_tforms ______________\r\n\r\nself = <astropy.io.fits.tests.test_image.TestCompressedImage object at 0x7fcf39d96210>\r\n\r\n    def test_compression_column_tforms(self):\r\n        \"\"\"Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/199\"\"\"\r\n    \r\n        # Some interestingly tiled data so that some of it is quantized and\r\n        # some of it ends up just getting gzip-compressed\r\n        data2 = ((np.arange(1, 8, dtype=np.float32) * 10)[:, np.newaxis] +\r\n                 np.arange(1, 7))\r\n        np.random.seed(1337)\r\n        data1 = np.random.uniform(size=(6 * 4, 7 * 4))\r\n        data1[:data2.shape[0], :data2.shape[1]] = data2\r\n        chdu = fits.CompImageHDU(data1, compressionType='RICE_1',\r\n                                 tileSize=(6, 7))\r\n        chdu.writeto(self.temp('test.fits'))\r\n    \r\n        with fits.open(self.temp('test.fits'),\r\n                       disable_image_compression=True) as h:\r\n>           assert h[1].header['TFORM1'] == '1PB(30)'\r\nE           assert '1PB(45)' == '1PB(30)'\r\nE             - 1PB(45)\r\nE             + 1PB(30)\r\n\r\nastropy/io/fits/tests/test_image.py:1268: AssertionError\r\n```\r\nThis may be a bug in cfitsio as well; I would need your hint here.\r\nFull log [here](https://buildd.debian.org/status/fetch.php?pkg=python-astropy&arch=amd64&ver=1.1.1-3%2Bb1&stamp=1456707318).\r\nThis happens on all architectures."},"comment":{"url":"https://api.github.com/repos/astropy/astropy/issues/comments/190201695","html_url":"https://github.com/astropy/astropy/issues/4646#issuecomment-190201695","issue_url":"https://api.github.com/repos/astropy/astropy/issues/4646","id":190201695,"user":{"login":"olebole","id":397223,"avatar_url":"https://avatars.githubusercontent.com/u/397223?v=3","gravatar_id":"","url":"https://api.github.com/users/olebole","html_url":"https://github.com/olebole","followers_url":"https://api.github.com/users/olebole/followers","following_url":"https://api.github.com/users/olebole/following{/other_user}","gists_url":"https://api.github.com/users/olebole/gists{/gist_id}","starred_url":"https://api.github.com/users/olebole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olebole/subscriptions","organizations_url":"https://api.github.com/users/olebole/orgs","repos_url":"https://api.github.com/users/olebole/repos","events_url":"https://api.github.com/users/olebole/events{/privacy}","received_events_url":"https://api.github.com/users/olebole/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T13:04:01Z","updated_at":"2016-02-29T13:04:01Z","body":"Looking into the code of cfitsio, I think this is a problem with this test. In cfitsio, the function `ffuptf()` updates the `TFORM` keyword with the maximum length, which is actually calculated from the file.\r\nThere is no reason why `TFORM1` should specify a length of 30 (except that previous versions of cfitsio probably did this) or 45. In principle _any_ length should do it, so maybe the fix could just be testing against the regexp `r'1TP\\(\\d+\\)'`? What do you think, @embray?"}}