{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astropy/issues/5918","repository_url":"https://api.github.com/repos/astropy/astropy","labels_url":"https://api.github.com/repos/astropy/astropy/issues/5918/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/5918/comments","events_url":"https://api.github.com/repos/astropy/astropy/issues/5918/events","html_url":"https://github.com/astropy/astropy/issues/5918","id":217646980,"number":5918,"title":"Question: Why is io.fits convenience 'getdata' much faster than fits.open()?","user":{"login":"mcara","id":5985250,"avatar_url":"https://avatars2.githubusercontent.com/u/5985250?v=3","gravatar_id":"","url":"https://api.github.com/users/mcara","html_url":"https://github.com/mcara","followers_url":"https://api.github.com/users/mcara/followers","following_url":"https://api.github.com/users/mcara/following{/other_user}","gists_url":"https://api.github.com/users/mcara/gists{/gist_id}","starred_url":"https://api.github.com/users/mcara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcara/subscriptions","organizations_url":"https://api.github.com/users/mcara/orgs","repos_url":"https://api.github.com/users/mcara/repos","events_url":"https://api.github.com/users/mcara/events{/privacy}","received_events_url":"https://api.github.com/users/mcara/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},{"id":133220484,"url":"https://api.github.com/repos/astropy/astropy/labels/Performance","name":"Performance","color":"bfe5bf","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2017-03-28T18:13:33Z","updated_at":"2017-03-28T19:49:48Z","closed_at":null,"body":"```python\r\n>>> import sys\r\n>>> print(sys.version)\r\n2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:05:08) \r\n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]\r\n>>> import astropy \r\n>>> astropy.__version__\r\nu'2.0.dev17848'\r\n>>> import timeit\r\n>>> timeit.timeit(\"h=fits.open('jcdua3f4q_flc.fits'); d=h[3].data; h.close()\",\r\n... setup=\"from astropy.io import fits\", number=1000) \r\n22.351375102996826\r\n>>> timeit.timeit(\"d=fits.getdata('jcdua3f4q_flc.fits', ext=3)\",\r\n... setup=\"from astropy.io import fits\", number=1000)\r\n8.482270956039429\r\n```\r\nHow is this possible and what can be done to make \"regular\" ``fits.io`` operations as fast as \"convenience\" functions?"},"comment":{"url":"https://api.github.com/repos/astropy/astropy/issues/comments/289883897","html_url":"https://github.com/astropy/astropy/issues/5918#issuecomment-289883897","issue_url":"https://api.github.com/repos/astropy/astropy/issues/5918","id":289883897,"user":{"login":"mwcraig","id":1147167,"avatar_url":"https://avatars2.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":"2017-03-28T19:49:48Z","updated_at":"2017-03-28T19:49:48Z","body":"> However in #5589 @mwcraig decided not to fix close()\r\n\r\nIIRC, that came down to running out of time before feature freeze. 😀 \r\n\r\nIn addition, the goal was not to change the previous behavior (in which headers remained available even after closing).\r\n\r\n> hdulist.close(no_really_do_not_load_all_other_hdus_please=True)\r\n\r\nI'd rather just remove this old behavior in 2.0.\r\n \r\n> Should we close this as duplicate of #5582 then?\r\n\r\nSure; could you please also add a note over there referring to this issue? Would do it myself but about to run to a meeting...\r\n"}}
{"actor":{"display_login":"mwcraig"}}