{"action":"created","comment":{"url":"https://api.github.com/repos/astropy/astropy/pulls/comments/59714809","id":59714809,"diff_hunk":"@@ -188,6 +188,7 @@ def getdata(filename, *args, **kwargs):\n     data = hdu.data\n     if data is None and extidx == 0:\n         try:\n+            hdulist, extidx = _getext(filename, mode, ext=1, *args, **kwargs)","path":"astropy/io/fits/convenience.py","position":4,"original_position":4,"commit_id":"dd499341be01b2134b6665ffb3b993ee37be10df","original_commit_id":"dd499341be01b2134b6665ffb3b993ee37be10df","user":{"login":"pllim","id":2090236,"avatar_url":"https://avatars.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},"body":"I am against hardcoding `ext=1` here. There are all sorts of data formats out there, where the data is not always in Extension 1. This is bound to break someone else's codes.","created_at":"2016-04-14T13:20:45Z","updated_at":"2016-04-14T13:20:45Z","html_url":"https://github.com/astropy/astropy/pull/4634#discussion_r59714809","pull_request_url":"https://api.github.com/repos/astropy/astropy/pulls/4634","_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/59714809"},"html":{"href":"https://github.com/astropy/astropy/pull/4634#discussion_r59714809"},"pull_request":{"href":"https://api.github.com/repos/astropy/astropy/pulls/4634"}}},"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/4634","id":60520024,"html_url":"https://github.com/astropy/astropy/pull/4634","diff_url":"https://github.com/astropy/astropy/pull/4634.diff","patch_url":"https://github.com/astropy/astropy/pull/4634.patch","issue_url":"https://api.github.com/repos/astropy/astropy/issues/4634","number":4634,"state":"open","locked":false,"title":"io.fits: allow limiting the number of read extensions","user":{"login":"juliantaylor","id":542663,"avatar_url":"https://avatars.githubusercontent.com/u/542663?v=3","gravatar_id":"","url":"https://api.github.com/users/juliantaylor","html_url":"https://github.com/juliantaylor","followers_url":"https://api.github.com/users/juliantaylor/followers","following_url":"https://api.github.com/users/juliantaylor/following{/other_user}","gists_url":"https://api.github.com/users/juliantaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/juliantaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliantaylor/subscriptions","organizations_url":"https://api.github.com/users/juliantaylor/orgs","repos_url":"https://api.github.com/users/juliantaylor/repos","events_url":"https://api.github.com/users/juliantaylor/events{/privacy}","received_events_url":"https://api.github.com/users/juliantaylor/received_events","type":"User","site_admin":false},"body":"In the convenience functions only read as many extensions as necessary\r\nto satisfy the users request. This can greatly increase performance when\r\none is only interested in an early subset of extensions.\r\nIt adds the `ext` keyword to the fitsopen function so it will also be\r\naccepted by the top level fits.open function, but this is an\r\nimplementational detail and not documented.\r\n\r\nCloses gh-4589","created_at":"2016-02-24T14:51:06Z","updated_at":"2016-04-14T13:20:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a45637c96b039081e988f7a780674e7dfc1ee4dc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/astropy/astropy/pulls/4634/commits","review_comments_url":"https://api.github.com/repos/astropy/astropy/pulls/4634/comments","review_comment_url":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/4634/comments","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/dd499341be01b2134b6665ffb3b993ee37be10df","head":{"label":"juliantaylor:fits-load-as-needed","ref":"fits-load-as-needed","sha":"dd499341be01b2134b6665ffb3b993ee37be10df","user":{"login":"juliantaylor","id":542663,"avatar_url":"https://avatars.githubusercontent.com/u/542663?v=3","gravatar_id":"","url":"https://api.github.com/users/juliantaylor","html_url":"https://github.com/juliantaylor","followers_url":"https://api.github.com/users/juliantaylor/followers","following_url":"https://api.github.com/users/juliantaylor/following{/other_user}","gists_url":"https://api.github.com/users/juliantaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/juliantaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliantaylor/subscriptions","organizations_url":"https://api.github.com/users/juliantaylor/orgs","repos_url":"https://api.github.com/users/juliantaylor/repos","events_url":"https://api.github.com/users/juliantaylor/events{/privacy}","received_events_url":"https://api.github.com/users/juliantaylor/received_events","type":"User","site_admin":false},"repo":{"id":52309633,"name":"astropy","full_name":"juliantaylor/astropy","owner":{"login":"juliantaylor","id":542663,"avatar_url":"https://avatars.githubusercontent.com/u/542663?v=3","gravatar_id":"","url":"https://api.github.com/users/juliantaylor","html_url":"https://github.com/juliantaylor","followers_url":"https://api.github.com/users/juliantaylor/followers","following_url":"https://api.github.com/users/juliantaylor/following{/other_user}","gists_url":"https://api.github.com/users/juliantaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/juliantaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliantaylor/subscriptions","organizations_url":"https://api.github.com/users/juliantaylor/orgs","repos_url":"https://api.github.com/users/juliantaylor/repos","events_url":"https://api.github.com/users/juliantaylor/events{/privacy}","received_events_url":"https://api.github.com/users/juliantaylor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/juliantaylor/astropy","description":"Repository for the Astropy core package","fork":true,"url":"https://api.github.com/repos/juliantaylor/astropy","forks_url":"https://api.github.com/repos/juliantaylor/astropy/forks","keys_url":"https://api.github.com/repos/juliantaylor/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juliantaylor/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juliantaylor/astropy/teams","hooks_url":"https://api.github.com/repos/juliantaylor/astropy/hooks","issue_events_url":"https://api.github.com/repos/juliantaylor/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/juliantaylor/astropy/events","assignees_url":"https://api.github.com/repos/juliantaylor/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/juliantaylor/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/juliantaylor/astropy/tags","blobs_url":"https://api.github.com/repos/juliantaylor/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juliantaylor/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juliantaylor/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/juliantaylor/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juliantaylor/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/juliantaylor/astropy/languages","stargazers_url":"https://api.github.com/repos/juliantaylor/astropy/stargazers","contributors_url":"https://api.github.com/repos/juliantaylor/astropy/contributors","subscribers_url":"https://api.github.com/repos/juliantaylor/astropy/subscribers","subscription_url":"https://api.github.com/repos/juliantaylor/astropy/subscription","commits_url":"https://api.github.com/repos/juliantaylor/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/juliantaylor/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/juliantaylor/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/juliantaylor/astropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/juliantaylor/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/juliantaylor/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juliantaylor/astropy/merges","archive_url":"https://api.github.com/repos/juliantaylor/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juliantaylor/astropy/downloads","issues_url":"https://api.github.com/repos/juliantaylor/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/juliantaylor/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/juliantaylor/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/juliantaylor/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juliantaylor/astropy/labels{/name}","releases_url":"https://api.github.com/repos/juliantaylor/astropy/releases{/id}","deployments_url":"https://api.github.com/repos/juliantaylor/astropy/deployments","created_at":"2016-02-22T22:08:26Z","updated_at":"2016-02-22T22:08:30Z","pushed_at":"2016-02-24T14:49:46Z","git_url":"git://github.com/juliantaylor/astropy.git","ssh_url":"git@github.com:juliantaylor/astropy.git","clone_url":"https://github.com/juliantaylor/astropy.git","svn_url":"https://github.com/juliantaylor/astropy","homepage":"www.astropy.org","size":42024,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"astropy:master","ref":"master","sha":"2259982985b8e7d3a1e9115b3255b06c01c5fc20","user":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"repo":{"id":2081289,"name":"astropy","full_name":"astropy/astropy","owner":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/astropy/astropy","description":"Repository for the Astropy core package","fork":false,"url":"https://api.github.com/repos/astropy/astropy","forks_url":"https://api.github.com/repos/astropy/astropy/forks","keys_url":"https://api.github.com/repos/astropy/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astropy/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astropy/astropy/teams","hooks_url":"https://api.github.com/repos/astropy/astropy/hooks","issue_events_url":"https://api.github.com/repos/astropy/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/astropy/astropy/events","assignees_url":"https://api.github.com/repos/astropy/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/astropy/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/astropy/astropy/tags","blobs_url":"https://api.github.com/repos/astropy/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astropy/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astropy/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/astropy/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/astropy/astropy/languages","stargazers_url":"https://api.github.com/repos/astropy/astropy/stargazers","contributors_url":"https://api.github.com/repos/astropy/astropy/contributors","subscribers_url":"https://api.github.com/repos/astropy/astropy/subscribers","subscription_url":"https://api.github.com/repos/astropy/astropy/subscription","commits_url":"https://api.github.com/repos/astropy/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/astropy/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/astropy/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/astropy/astropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/astropy/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/astropy/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astropy/astropy/merges","archive_url":"https://api.github.com/repos/astropy/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astropy/astropy/downloads","issues_url":"https://api.github.com/repos/astropy/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/astropy/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/astropy/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/astropy/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astropy/astropy/labels{/name}","releases_url":"https://api.github.com/repos/astropy/astropy/releases{/id}","deployments_url":"https://api.github.com/repos/astropy/astropy/deployments","created_at":"2011-07-21T01:33:49Z","updated_at":"2016-04-08T14:36:09Z","pushed_at":"2016-04-14T08:11:02Z","git_url":"git://github.com/astropy/astropy.git","ssh_url":"git@github.com:astropy/astropy.git","clone_url":"https://github.com/astropy/astropy.git","svn_url":"https://github.com/astropy/astropy","homepage":"www.astropy.org","size":61696,"stargazers_count":826,"watchers_count":826,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":539,"mirror_url":null,"open_issues_count":717,"forks":539,"open_issues":717,"watchers":826,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/4634"},"html":{"href":"https://github.com/astropy/astropy/pull/4634"},"issue":{"href":"https://api.github.com/repos/astropy/astropy/issues/4634"},"comments":{"href":"https://api.github.com/repos/astropy/astropy/issues/4634/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/astropy/pulls/4634/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/astropy/astropy/pulls/4634/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/astropy/statuses/dd499341be01b2134b6665ffb3b993ee37be10df"}}}}