{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astropy/issues/3916","labels_url":"https://api.github.com/repos/astropy/astropy/issues/3916/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/3916/comments","events_url":"https://api.github.com/repos/astropy/astropy/issues/3916/events","html_url":"https://github.com/astropy/astropy/pull/3916","id":93284694,"number":3916,"title":"A few minor improvements to scaling and uint support","user":{"login":"embray","id":676149,"avatar_url":"https://avatars.githubusercontent.com/u/676149?v=3","gravatar_id":"","url":"https://api.github.com/users/embray","html_url":"https://github.com/embray","followers_url":"https://api.github.com/users/embray/followers","following_url":"https://api.github.com/users/embray/following{/other_user}","gists_url":"https://api.github.com/users/embray/gists{/gist_id}","starred_url":"https://api.github.com/users/embray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embray/subscriptions","organizations_url":"https://api.github.com/users/embray/orgs","repos_url":"https://api.github.com/users/embray/repos","events_url":"https://api.github.com/users/embray/events{/privacy}","received_events_url":"https://api.github.com/users/embray/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/astropy/astropy/labels/Affects-release","name":"Affects-release","color":"0052cc"},{"url":"https://api.github.com/repos/astropy/astropy/labels/Enhancement","name":"Enhancement","color":"fad8c7"},{"url":"https://api.github.com/repos/astropy/astropy/labels/io.fits","name":"io.fits","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/astropy/astropy/milestones/20","html_url":"https://github.com/astropy/astropy/milestones/v1.1.0","labels_url":"https://api.github.com/repos/astropy/astropy/milestones/20/labels","id":907426,"number":20,"title":"v1.1.0","description":"","creator":{"login":"eteq","id":346587,"avatar_url":"https://avatars.githubusercontent.com/u/346587?v=3","gravatar_id":"","url":"https://api.github.com/users/eteq","html_url":"https://github.com/eteq","followers_url":"https://api.github.com/users/eteq/followers","following_url":"https://api.github.com/users/eteq/following{/other_user}","gists_url":"https://api.github.com/users/eteq/gists{/gist_id}","starred_url":"https://api.github.com/users/eteq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eteq/subscriptions","organizations_url":"https://api.github.com/users/eteq/orgs","repos_url":"https://api.github.com/users/eteq/repos","events_url":"https://api.github.com/users/eteq/events{/privacy}","received_events_url":"https://api.github.com/users/eteq/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":73,"state":"open","created_at":"2014-12-17T20:05:23Z","updated_at":"2015-07-17T11:28:54Z","due_on":"2015-07-23T04:00:00Z","closed_at":null},"comments":4,"created_at":"2015-07-06T13:57:15Z","updated_at":"2015-07-17T17:58:53Z","closed_at":"2015-07-07T13:40:24Z","pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/3916","html_url":"https://github.com/astropy/astropy/pull/3916","diff_url":"https://github.com/astropy/astropy/pull/3916.diff","patch_url":"https://github.com/astropy/astropy/pull/3916.patch"},"body":"Just a grab bag of minor improvements from a branch I started but didn't do much else with yet (I think I had planned to do more but better to start fresh).\r\n\r\nThis improves somewhat on the surprising behavior that a FITS HDU's type changes *after* accessing the data when scaled data is present.  Now, `fits.info()` gives more info about scaled images ahead of time.\r\n\r\nThis also enables unsigned integer support by default.  The current version of the FITS standard even describes the convention of using BZERO=2**(BITPIX - 1) to represent unsigned ints.  Although it is still \"merely\" a convention there's almost no reason not to assume this was the intent in practice.  This hopefully shouldn't break anything existing, but in the odd case that it does the default can be changed via a config flag."},"comment":{"url":"https://api.github.com/repos/astropy/astropy/issues/comments/122357319","html_url":"https://github.com/astropy/astropy/pull/3916#issuecomment-122357319","issue_url":"https://api.github.com/repos/astropy/astropy/issues/3916","id":122357319,"user":{"login":"mwcraig","id":1147167,"avatar_url":"https://avatars.githubusercontent.com/u/1147167?v=3","gravatar_id":"","url":"https://api.github.com/users/mwcraig","html_url":"https://github.com/mwcraig","followers_url":"https://api.github.com/users/mwcraig/followers","following_url":"https://api.github.com/users/mwcraig/following{/other_user}","gists_url":"https://api.github.com/users/mwcraig/gists{/gist_id}","starred_url":"https://api.github.com/users/mwcraig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwcraig/subscriptions","organizations_url":"https://api.github.com/users/mwcraig/orgs","repos_url":"https://api.github.com/users/mwcraig/repos","events_url":"https://api.github.com/users/mwcraig/events{/privacy}","received_events_url":"https://api.github.com/users/mwcraig/received_events","type":"User","site_admin":false},"created_at":"2015-07-17T17:58:53Z","updated_at":"2015-07-17T17:58:53Z","body":"@embray -- what is the expected behavior of the `BZERO` keyword when `uint=True`? \r\n\r\nIf `uint=False` then the `BZERO` keyword is removed from the header after the data is accessed/scaled. That makes sense because the header is consistent with the state of the data.\r\n\r\nWith `uint=True`, the data is `uint16`, which makes sense, but the header still has `BZERO=32768`  (assuming `BITPIX=16`). \r\n\r\nIf that is the intended behavior, I can add something about it to the docs. If it is not the intended behavior,  I can try to fix so that `BZERO` gets droped."}}