{"action":"closed","issue":{"url":"https://api.github.com/repos/chihchunhsu/nirspec_pip/issues/4","repository_url":"https://api.github.com/repos/chihchunhsu/nirspec_pip","labels_url":"https://api.github.com/repos/chihchunhsu/nirspec_pip/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/chihchunhsu/nirspec_pip/issues/4/comments","events_url":"https://api.github.com/repos/chihchunhsu/nirspec_pip/issues/4/events","html_url":"https://github.com/chihchunhsu/nirspec_pip/issues/4","id":348887613,"node_id":"MDU6SXNzdWUzNDg4ODc2MTM=","number":4,"title":"Issues with defringing code reading in fits file as integers instead of floats","user":{"login":"ctheissen","id":7979844,"node_id":"MDQ6VXNlcjc5Nzk4NDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/7979844?v=4","gravatar_id":"","url":"https://api.github.com/users/ctheissen","html_url":"https://github.com/ctheissen","followers_url":"https://api.github.com/users/ctheissen/followers","following_url":"https://api.github.com/users/ctheissen/following{/other_user}","gists_url":"https://api.github.com/users/ctheissen/gists{/gist_id}","starred_url":"https://api.github.com/users/ctheissen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctheissen/subscriptions","organizations_url":"https://api.github.com/users/ctheissen/orgs","repos_url":"https://api.github.com/users/ctheissen/repos","events_url":"https://api.github.com/users/ctheissen/events{/privacy}","received_events_url":"https://api.github.com/users/ctheissen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-08T20:52:38Z","updated_at":"2018-08-11T00:25:02Z","closed_at":"2018-08-11T00:25:02Z","author_association":"NONE","body":"I had an issue with the defringing code since it appears new versions of astropy are not creating an array of floats from a fits file, but instead an array of integers. One workaround is to add the line\r\n`defringe_data = np.array(defringeflat_img[0].data, dtype=float)` below the line `defringeflat_img = flat_file` in defringe.py (line 83).\r\n\r\nThen you can change line 118 from `defringeflat_img[0].data[k:k+wbin,:] -= reconstruct_image`\r\nto `defringe_data[k:k+wbin,:] -= reconstruct_image`"}}
{"actor":{"display_login":"chihchunhsu"}}