{"action":"closed","number":370,"pull_request":{"url":"https://api.github.com/repos/astropy/photutils/pulls/370","id":73403205,"html_url":"https://github.com/astropy/photutils/pull/370","diff_url":"https://github.com/astropy/photutils/pull/370.diff","patch_url":"https://github.com/astropy/photutils/pull/370.patch","issue_url":"https://api.github.com/repos/astropy/photutils/issues/370","number":370,"state":"closed","locked":false,"title":"Add general Background classes","user":{"login":"larrybradley","id":4992897,"avatar_url":"https://avatars.githubusercontent.com/u/4992897?v=3","gravatar_id":"","url":"https://api.github.com/users/larrybradley","html_url":"https://github.com/larrybradley","followers_url":"https://api.github.com/users/larrybradley/followers","following_url":"https://api.github.com/users/larrybradley/following{/other_user}","gists_url":"https://api.github.com/users/larrybradley/gists{/gist_id}","starred_url":"https://api.github.com/users/larrybradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrybradley/subscriptions","organizations_url":"https://api.github.com/users/larrybradley/orgs","repos_url":"https://api.github.com/users/larrybradley/repos","events_url":"https://api.github.com/users/larrybradley/events{/privacy}","received_events_url":"https://api.github.com/users/larrybradley/received_events","type":"User","site_admin":false},"body":"This large PR contains the following changes:\r\n\r\n1.  Turns the `background.py` module into a `background` subpackage.\r\n\r\n2.  Adds many new classes for computing a (scalar) background value or background rms value from a (possibly masked) array of any dimension:\r\n\r\n  * `MeanBackground`\r\n  * `MedianBackground`\r\n  * `MMMBackground`\r\n  * `SExtractorBackground`\r\n  * `BiweightLocationBackground`\r\n  * `StdBackgroundRMS`\r\n  * `MADStdBackgroundRMS`\r\n  * `BiweightMidvarianceBackgroundRMS`\r\n\r\n  Sigma-clipping is performed by default, but can be turned off by setting `sigclip = False`.\r\n\r\n3. The existing `BackgroundBase`, `Background` and `BackgroundIDW` classes are now called `BackgroundBase2D`, `Background2D`, and `BackgroundIDW2D`, respectively, since they return 2D background *images*.\r\n\r\nMy plan is to submit another PR to integrate the general background classes into the 2D background classes (with a similar interface).\r\n\r\nExample\r\n------------\r\n```\r\nfrom photutils import MMMBackground\r\nbkg = MMMBackground(sigma=3., iters=10)\r\nbkg_value = bkg.calc_background(data)\r\n``` \r\n\r\nThe classes are designed to be used as an object-oriented interface for other functions, e.g.:\r\n```\r\nbkg = MMMBackground(sigma_lower=5.5, sigma_upper=3., iters=10)\r\nresult = psf_photometry(data, ... , background_sub=bkg)\r\n```\r\n\r\nin function form (requires `calc_background` -> `__call__`):\r\n```\r\nresult = psf_photometry(data, ... , background_sub=np.ma.mean)\r\n```\r\nwhere the user can define custom background classes if desired.\r\n\r\ncc: @eteq, @hcferguson \r\n","created_at":"2016-06-10T16:49:52Z","updated_at":"2016-06-20T14:50:23Z","closed_at":"2016-06-20T14:50:23Z","merged_at":"2016-06-20T14:50:23Z","merge_commit_sha":"4e206ccbba0d16c6598e1e6f3dfeccfa083759ea","assignee":{"login":"larrybradley","id":4992897,"avatar_url":"https://avatars.githubusercontent.com/u/4992897?v=3","gravatar_id":"","url":"https://api.github.com/users/larrybradley","html_url":"https://github.com/larrybradley","followers_url":"https://api.github.com/users/larrybradley/followers","following_url":"https://api.github.com/users/larrybradley/following{/other_user}","gists_url":"https://api.github.com/users/larrybradley/gists{/gist_id}","starred_url":"https://api.github.com/users/larrybradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrybradley/subscriptions","organizations_url":"https://api.github.com/users/larrybradley/orgs","repos_url":"https://api.github.com/users/larrybradley/repos","events_url":"https://api.github.com/users/larrybradley/events{/privacy}","received_events_url":"https://api.github.com/users/larrybradley/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/astropy/photutils/milestones/5","html_url":"https://github.com/astropy/photutils/milestones/0.3","labels_url":"https://api.github.com/repos/astropy/photutils/milestones/5/labels","id":1505008,"number":5,"title":"0.3","description":"","creator":{"login":"larrybradley","id":4992897,"avatar_url":"https://avatars.githubusercontent.com/u/4992897?v=3","gravatar_id":"","url":"https://api.github.com/users/larrybradley","html_url":"https://github.com/larrybradley","followers_url":"https://api.github.com/users/larrybradley/followers","following_url":"https://api.github.com/users/larrybradley/following{/other_user}","gists_url":"https://api.github.com/users/larrybradley/gists{/gist_id}","starred_url":"https://api.github.com/users/larrybradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrybradley/subscriptions","organizations_url":"https://api.github.com/users/larrybradley/orgs","repos_url":"https://api.github.com/users/larrybradley/repos","events_url":"https://api.github.com/users/larrybradley/events{/privacy}","received_events_url":"https://api.github.com/users/larrybradley/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":20,"state":"open","created_at":"2016-01-13T17:46:36Z","updated_at":"2016-06-20T14:50:23Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/astropy/photutils/pulls/370/commits","review_comments_url":"https://api.github.com/repos/astropy/photutils/pulls/370/comments","review_comment_url":"https://api.github.com/repos/astropy/photutils/pulls/comments{/number}","comments_url":"https://api.github.com/repos/astropy/photutils/issues/370/comments","statuses_url":"https://api.github.com/repos/astropy/photutils/statuses/425728449afbcee5d89d2d012983ea7f78a718b5","head":{"label":"larrybradley:background","ref":"background","sha":"425728449afbcee5d89d2d012983ea7f78a718b5","user":{"login":"larrybradley","id":4992897,"avatar_url":"https://avatars.githubusercontent.com/u/4992897?v=3","gravatar_id":"","url":"https://api.github.com/users/larrybradley","html_url":"https://github.com/larrybradley","followers_url":"https://api.github.com/users/larrybradley/followers","following_url":"https://api.github.com/users/larrybradley/following{/other_user}","gists_url":"https://api.github.com/users/larrybradley/gists{/gist_id}","starred_url":"https://api.github.com/users/larrybradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrybradley/subscriptions","organizations_url":"https://api.github.com/users/larrybradley/orgs","repos_url":"https://api.github.com/users/larrybradley/repos","events_url":"https://api.github.com/users/larrybradley/events{/privacy}","received_events_url":"https://api.github.com/users/larrybradley/received_events","type":"User","site_admin":false},"repo":{"id":38000316,"name":"photutils","full_name":"larrybradley/photutils","owner":{"login":"larrybradley","id":4992897,"avatar_url":"https://avatars.githubusercontent.com/u/4992897?v=3","gravatar_id":"","url":"https://api.github.com/users/larrybradley","html_url":"https://github.com/larrybradley","followers_url":"https://api.github.com/users/larrybradley/followers","following_url":"https://api.github.com/users/larrybradley/following{/other_user}","gists_url":"https://api.github.com/users/larrybradley/gists{/gist_id}","starred_url":"https://api.github.com/users/larrybradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrybradley/subscriptions","organizations_url":"https://api.github.com/users/larrybradley/orgs","repos_url":"https://api.github.com/users/larrybradley/repos","events_url":"https://api.github.com/users/larrybradley/events{/privacy}","received_events_url":"https://api.github.com/users/larrybradley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/larrybradley/photutils","description":"Affiliated package for image photometry utilities.","fork":true,"url":"https://api.github.com/repos/larrybradley/photutils","forks_url":"https://api.github.com/repos/larrybradley/photutils/forks","keys_url":"https://api.github.com/repos/larrybradley/photutils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/larrybradley/photutils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/larrybradley/photutils/teams","hooks_url":"https://api.github.com/repos/larrybradley/photutils/hooks","issue_events_url":"https://api.github.com/repos/larrybradley/photutils/issues/events{/number}","events_url":"https://api.github.com/repos/larrybradley/photutils/events","assignees_url":"https://api.github.com/repos/larrybradley/photutils/assignees{/user}","branches_url":"https://api.github.com/repos/larrybradley/photutils/branches{/branch}","tags_url":"https://api.github.com/repos/larrybradley/photutils/tags","blobs_url":"https://api.github.com/repos/larrybradley/photutils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/larrybradley/photutils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/larrybradley/photutils/git/refs{/sha}","trees_url":"https://api.github.com/repos/larrybradley/photutils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/larrybradley/photutils/statuses/{sha}","languages_url":"https://api.github.com/repos/larrybradley/photutils/languages","stargazers_url":"https://api.github.com/repos/larrybradley/photutils/stargazers","contributors_url":"https://api.github.com/repos/larrybradley/photutils/contributors","subscribers_url":"https://api.github.com/repos/larrybradley/photutils/subscribers","subscription_url":"https://api.github.com/repos/larrybradley/photutils/subscription","commits_url":"https://api.github.com/repos/larrybradley/photutils/commits{/sha}","git_commits_url":"https://api.github.com/repos/larrybradley/photutils/git/commits{/sha}","comments_url":"https://api.github.com/repos/larrybradley/photutils/comments{/number}","issue_comment_url":"https://api.github.com/repos/larrybradley/photutils/issues/comments{/number}","contents_url":"https://api.github.com/repos/larrybradley/photutils/contents/{+path}","compare_url":"https://api.github.com/repos/larrybradley/photutils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/larrybradley/photutils/merges","archive_url":"https://api.github.com/repos/larrybradley/photutils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/larrybradley/photutils/downloads","issues_url":"https://api.github.com/repos/larrybradley/photutils/issues{/number}","pulls_url":"https://api.github.com/repos/larrybradley/photutils/pulls{/number}","milestones_url":"https://api.github.com/repos/larrybradley/photutils/milestones{/number}","notifications_url":"https://api.github.com/repos/larrybradley/photutils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/larrybradley/photutils/labels{/name}","releases_url":"https://api.github.com/repos/larrybradley/photutils/releases{/id}","deployments_url":"https://api.github.com/repos/larrybradley/photutils/deployments","created_at":"2015-06-24T17:37:53Z","updated_at":"2016-06-14T03:44:34Z","pushed_at":"2016-06-17T03:03:52Z","git_url":"git://github.com/larrybradley/photutils.git","ssh_url":"git@github.com:larrybradley/photutils.git","clone_url":"https://github.com/larrybradley/photutils.git","svn_url":"https://github.com/larrybradley/photutils","homepage":"http://photutils.readthedocs.io","size":3352,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"astropy:master","ref":"master","sha":"7c81911ba75800c5bd26bb9701b319a515ad83ca","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":2640766,"name":"photutils","full_name":"astropy/photutils","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/photutils","description":"Affiliated package for image photometry utilities. Maintainers: @larrybradley and @bsipocz","fork":false,"url":"https://api.github.com/repos/astropy/photutils","forks_url":"https://api.github.com/repos/astropy/photutils/forks","keys_url":"https://api.github.com/repos/astropy/photutils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astropy/photutils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astropy/photutils/teams","hooks_url":"https://api.github.com/repos/astropy/photutils/hooks","issue_events_url":"https://api.github.com/repos/astropy/photutils/issues/events{/number}","events_url":"https://api.github.com/repos/astropy/photutils/events","assignees_url":"https://api.github.com/repos/astropy/photutils/assignees{/user}","branches_url":"https://api.github.com/repos/astropy/photutils/branches{/branch}","tags_url":"https://api.github.com/repos/astropy/photutils/tags","blobs_url":"https://api.github.com/repos/astropy/photutils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astropy/photutils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astropy/photutils/git/refs{/sha}","trees_url":"https://api.github.com/repos/astropy/photutils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astropy/photutils/statuses/{sha}","languages_url":"https://api.github.com/repos/astropy/photutils/languages","stargazers_url":"https://api.github.com/repos/astropy/photutils/stargazers","contributors_url":"https://api.github.com/repos/astropy/photutils/contributors","subscribers_url":"https://api.github.com/repos/astropy/photutils/subscribers","subscription_url":"https://api.github.com/repos/astropy/photutils/subscription","commits_url":"https://api.github.com/repos/astropy/photutils/commits{/sha}","git_commits_url":"https://api.github.com/repos/astropy/photutils/git/commits{/sha}","comments_url":"https://api.github.com/repos/astropy/photutils/comments{/number}","issue_comment_url":"https://api.github.com/repos/astropy/photutils/issues/comments{/number}","contents_url":"https://api.github.com/repos/astropy/photutils/contents/{+path}","compare_url":"https://api.github.com/repos/astropy/photutils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astropy/photutils/merges","archive_url":"https://api.github.com/repos/astropy/photutils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astropy/photutils/downloads","issues_url":"https://api.github.com/repos/astropy/photutils/issues{/number}","pulls_url":"https://api.github.com/repos/astropy/photutils/pulls{/number}","milestones_url":"https://api.github.com/repos/astropy/photutils/milestones{/number}","notifications_url":"https://api.github.com/repos/astropy/photutils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astropy/photutils/labels{/name}","releases_url":"https://api.github.com/repos/astropy/photutils/releases{/id}","deployments_url":"https://api.github.com/repos/astropy/photutils/deployments","created_at":"2011-10-25T02:39:28Z","updated_at":"2016-06-18T06:11:39Z","pushed_at":"2016-06-20T14:50:24Z","git_url":"git://github.com/astropy/photutils.git","ssh_url":"git@github.com:astropy/photutils.git","clone_url":"https://github.com/astropy/photutils.git","svn_url":"https://github.com/astropy/photutils","homepage":"http://photutils.readthedocs.io","size":7340,"stargazers_count":31,"watchers_count":31,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":35,"forks":51,"open_issues":35,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/photutils/pulls/370"},"html":{"href":"https://github.com/astropy/photutils/pull/370"},"issue":{"href":"https://api.github.com/repos/astropy/photutils/issues/370"},"comments":{"href":"https://api.github.com/repos/astropy/photutils/issues/370/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/photutils/pulls/370/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/photutils/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/astropy/photutils/pulls/370/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/photutils/statuses/425728449afbcee5d89d2d012983ea7f78a718b5"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"larrybradley","id":4992897,"avatar_url":"https://avatars.githubusercontent.com/u/4992897?v=3","gravatar_id":"","url":"https://api.github.com/users/larrybradley","html_url":"https://github.com/larrybradley","followers_url":"https://api.github.com/users/larrybradley/followers","following_url":"https://api.github.com/users/larrybradley/following{/other_user}","gists_url":"https://api.github.com/users/larrybradley/gists{/gist_id}","starred_url":"https://api.github.com/users/larrybradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrybradley/subscriptions","organizations_url":"https://api.github.com/users/larrybradley/orgs","repos_url":"https://api.github.com/users/larrybradley/repos","events_url":"https://api.github.com/users/larrybradley/events{/privacy}","received_events_url":"https://api.github.com/users/larrybradley/received_events","type":"User","site_admin":false},"comments":6,"review_comments":12,"commits":22,"additions":839,"deletions":97,"changed_files":11}}
{"actor":{"display_login":"larrybradley"}}