{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astropy/issues/5955","repository_url":"https://api.github.com/repos/astropy/astropy","labels_url":"https://api.github.com/repos/astropy/astropy/issues/5955/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/5955/comments","events_url":"https://api.github.com/repos/astropy/astropy/issues/5955/events","html_url":"https://github.com/astropy/astropy/pull/5955","id":220809138,"number":5955,"title":"always use user-supplied scaling values when given","user":{"login":"griffin-h","id":1976665,"avatar_url":"https://avatars3.githubusercontent.com/u/1976665?v=3","gravatar_id":"","url":"https://api.github.com/users/griffin-h","html_url":"https://github.com/griffin-h","followers_url":"https://api.github.com/users/griffin-h/followers","following_url":"https://api.github.com/users/griffin-h/following{/other_user}","gists_url":"https://api.github.com/users/griffin-h/gists{/gist_id}","starred_url":"https://api.github.com/users/griffin-h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griffin-h/subscriptions","organizations_url":"https://api.github.com/users/griffin-h/orgs","repos_url":"https://api.github.com/users/griffin-h/repos","events_url":"https://api.github.com/users/griffin-h/events{/privacy}","received_events_url":"https://api.github.com/users/griffin-h/received_events","type":"User","site_admin":false},"labels":[{"id":3496818,"url":"https://api.github.com/repos/astropy/astropy/labels/io.fits","name":"io.fits","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-11T00:48:10Z","updated_at":"2017-04-11T13:55:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/5955","html_url":"https://github.com/astropy/astropy/pull/5955","diff_url":"https://github.com/astropy/astropy/pull/5955.diff","patch_url":"https://github.com/astropy/astropy/pull/5955.patch"},"body":"This pull request addresses three related issues regarding the scaling of fits images:\r\n1. Currently, ``_ImageBaseHDU.scale`` will ignore the user-supplied ``bscale`` and ``bzero`` parameters if they are equal to the default values (1 and 0, respectively). This changes the function defaults to ``None`` so that it can check if the user explicitly wants to use 1 and/or 0.\r\n2. ``_ImageBaseHDU.scale`` will crash if ``option='old'`` and ``self._orig_bzero=None``. This checks if ``self._orig_bzero`` or ``self._orig_bscale`` is ``None`` and uses the appropriate default value.\r\n3. This fixes a small bug (added in #4974) that inverts the logic of checking the header of a new fits file for the ``BSCALE`` keyword."},"comment":{"url":"https://api.github.com/repos/astropy/astropy/issues/comments/293270945","html_url":"https://github.com/astropy/astropy/pull/5955#issuecomment-293270945","issue_url":"https://api.github.com/repos/astropy/astropy/issues/5955","id":293270945,"user":{"login":"pllim","id":2090236,"avatar_url":"https://avatars1.githubusercontent.com/u/2090236?v=3","gravatar_id":"","url":"https://api.github.com/users/pllim","html_url":"https://github.com/pllim","followers_url":"https://api.github.com/users/pllim/followers","following_url":"https://api.github.com/users/pllim/following{/other_user}","gists_url":"https://api.github.com/users/pllim/gists{/gist_id}","starred_url":"https://api.github.com/users/pllim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pllim/subscriptions","organizations_url":"https://api.github.com/users/pllim/orgs","repos_url":"https://api.github.com/users/pllim/repos","events_url":"https://api.github.com/users/pllim/events{/privacy}","received_events_url":"https://api.github.com/users/pllim/received_events","type":"User","site_admin":false},"created_at":"2017-04-11T13:55:59Z","updated_at":"2017-04-11T13:55:59Z","body":"#4974 was never merged, so it could not have introduced any bugs. Please clarify."}}
{"actor":{"display_login":"pllim"}}