{"action":"created","comment":{"url":"https://api.github.com/repos/hyperspy/hyperspy/pulls/comments/35303181","id":35303181,"diff_hunk":"@@ -132,6 +132,18 @@ def test_also_aligns(self):\n         nose.tools.assert_equal(zlpc.data.mean(), 0)\n         nose.tools.assert_equal(zlpc.data.std(), 0)\n \n+    def test_align_zero_loss_peak_with_spike_signal_range(self):\n+        s = self.spectrum\n+        spike = np.zeros((10,100))\n+        spike_amplitude = 20\n+        spike[:,75] = spike_amplitude\n+        s.data += spike\n+        s.align_zero_loss_peak(print_stats=False, subpixel=False, signal_range=(98.,102.))\n+        zlp_max = s[...,-0.5:0.5].max(-1).data","path":"hyperspy/tests/signal/test_eels.py","position":11,"original_position":11,"commit_id":"909f5a382f670c9437e84155226785de5643631b","original_commit_id":"909f5a382f670c9437e84155226785de5643631b","user":{"login":"francisco-dlp","id":989719,"avatar_url":"https://avatars.githubusercontent.com/u/989719?v=3","gravatar_id":"","url":"https://api.github.com/users/francisco-dlp","html_url":"https://github.com/francisco-dlp","followers_url":"https://api.github.com/users/francisco-dlp/followers","following_url":"https://api.github.com/users/francisco-dlp/following{/other_user}","gists_url":"https://api.github.com/users/francisco-dlp/gists{/gist_id}","starred_url":"https://api.github.com/users/francisco-dlp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/francisco-dlp/subscriptions","organizations_url":"https://api.github.com/users/francisco-dlp/orgs","repos_url":"https://api.github.com/users/francisco-dlp/repos","events_url":"https://api.github.com/users/francisco-dlp/events{/privacy}","received_events_url":"https://api.github.com/users/francisco-dlp/received_events","type":"User","site_admin":false},"body":"And here.","created_at":"2015-07-23T09:14:46Z","updated_at":"2015-07-23T09:14:46Z","html_url":"https://github.com/hyperspy/hyperspy/pull/544#discussion_r35303181","pull_request_url":"https://api.github.com/repos/hyperspy/hyperspy/pulls/544","_links":{"self":{"href":"https://api.github.com/repos/hyperspy/hyperspy/pulls/comments/35303181"},"html":{"href":"https://github.com/hyperspy/hyperspy/pull/544#discussion_r35303181"},"pull_request":{"href":"https://api.github.com/repos/hyperspy/hyperspy/pulls/544"}}},"pull_request":{"url":"https://api.github.com/repos/hyperspy/hyperspy/pulls/544","id":35064408,"html_url":"https://github.com/hyperspy/hyperspy/pull/544","diff_url":"https://github.com/hyperspy/hyperspy/pull/544.diff","patch_url":"https://github.com/hyperspy/hyperspy/pull/544.patch","issue_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/544","number":544,"state":"open","locked":false,"title":"Enh align zero loss peak signal range","user":{"login":"magnunor","id":1690979,"avatar_url":"https://avatars.githubusercontent.com/u/1690979?v=3","gravatar_id":"","url":"https://api.github.com/users/magnunor","html_url":"https://github.com/magnunor","followers_url":"https://api.github.com/users/magnunor/followers","following_url":"https://api.github.com/users/magnunor/following{/other_user}","gists_url":"https://api.github.com/users/magnunor/gists{/gist_id}","starred_url":"https://api.github.com/users/magnunor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnunor/subscriptions","organizations_url":"https://api.github.com/users/magnunor/orgs","repos_url":"https://api.github.com/users/magnunor/repos","events_url":"https://api.github.com/users/magnunor/events{/privacy}","received_events_url":"https://api.github.com/users/magnunor/received_events","type":"User","site_admin":false},"body":"I added a `signal_range` argument for `eels_spectrum.align_zero_loss_peak`. As discussed in https://github.com/hyperspy/hyperspy/issues/533. \r\n\r\nCan potentially reduce the risk of random spikes being mistaken as the ZLP.","created_at":"2015-05-09T09:48:12Z","updated_at":"2015-07-23T09:14:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2331ac6892a8e6c5fa5ccbba80dcea541c5683a0","assignee":{"login":"magnunor","id":1690979,"avatar_url":"https://avatars.githubusercontent.com/u/1690979?v=3","gravatar_id":"","url":"https://api.github.com/users/magnunor","html_url":"https://github.com/magnunor","followers_url":"https://api.github.com/users/magnunor/followers","following_url":"https://api.github.com/users/magnunor/following{/other_user}","gists_url":"https://api.github.com/users/magnunor/gists{/gist_id}","starred_url":"https://api.github.com/users/magnunor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnunor/subscriptions","organizations_url":"https://api.github.com/users/magnunor/orgs","repos_url":"https://api.github.com/users/magnunor/repos","events_url":"https://api.github.com/users/magnunor/events{/privacy}","received_events_url":"https://api.github.com/users/magnunor/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/hyperspy/hyperspy/milestones/12","html_url":"https://github.com/hyperspy/hyperspy/milestones/0.8.1","labels_url":"https://api.github.com/repos/hyperspy/hyperspy/milestones/12/labels","id":1050058,"number":12,"title":"0.8.1","description":"","creator":{"login":"pburdet","id":3855190,"avatar_url":"https://avatars.githubusercontent.com/u/3855190?v=3","gravatar_id":"","url":"https://api.github.com/users/pburdet","html_url":"https://github.com/pburdet","followers_url":"https://api.github.com/users/pburdet/followers","following_url":"https://api.github.com/users/pburdet/following{/other_user}","gists_url":"https://api.github.com/users/pburdet/gists{/gist_id}","starred_url":"https://api.github.com/users/pburdet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pburdet/subscriptions","organizations_url":"https://api.github.com/users/pburdet/orgs","repos_url":"https://api.github.com/users/pburdet/repos","events_url":"https://api.github.com/users/pburdet/events{/privacy}","received_events_url":"https://api.github.com/users/pburdet/received_events","type":"User","site_admin":false},"open_issues":34,"closed_issues":22,"state":"open","created_at":"2015-04-02T09:39:20Z","updated_at":"2015-07-23T09:02:05Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/hyperspy/hyperspy/pulls/544/commits","review_comments_url":"https://api.github.com/repos/hyperspy/hyperspy/pulls/544/comments","review_comment_url":"https://api.github.com/repos/hyperspy/hyperspy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/544/comments","statuses_url":"https://api.github.com/repos/hyperspy/hyperspy/statuses/909f5a382f670c9437e84155226785de5643631b","head":{"label":"magnunor:ENH_align_zero_loss_peak_signal_range","ref":"ENH_align_zero_loss_peak_signal_range","sha":"909f5a382f670c9437e84155226785de5643631b","user":{"login":"magnunor","id":1690979,"avatar_url":"https://avatars.githubusercontent.com/u/1690979?v=3","gravatar_id":"","url":"https://api.github.com/users/magnunor","html_url":"https://github.com/magnunor","followers_url":"https://api.github.com/users/magnunor/followers","following_url":"https://api.github.com/users/magnunor/following{/other_user}","gists_url":"https://api.github.com/users/magnunor/gists{/gist_id}","starred_url":"https://api.github.com/users/magnunor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnunor/subscriptions","organizations_url":"https://api.github.com/users/magnunor/orgs","repos_url":"https://api.github.com/users/magnunor/repos","events_url":"https://api.github.com/users/magnunor/events{/privacy}","received_events_url":"https://api.github.com/users/magnunor/received_events","type":"User","site_admin":false},"repo":{"id":6036258,"name":"hyperspy","full_name":"magnunor/hyperspy","owner":{"login":"magnunor","id":1690979,"avatar_url":"https://avatars.githubusercontent.com/u/1690979?v=3","gravatar_id":"","url":"https://api.github.com/users/magnunor","html_url":"https://github.com/magnunor","followers_url":"https://api.github.com/users/magnunor/followers","following_url":"https://api.github.com/users/magnunor/following{/other_user}","gists_url":"https://api.github.com/users/magnunor/gists{/gist_id}","starred_url":"https://api.github.com/users/magnunor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnunor/subscriptions","organizations_url":"https://api.github.com/users/magnunor/orgs","repos_url":"https://api.github.com/users/magnunor/repos","events_url":"https://api.github.com/users/magnunor/events{/privacy}","received_events_url":"https://api.github.com/users/magnunor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/magnunor/hyperspy","description":"A toolbox for hyperspectra data analysis","fork":true,"url":"https://api.github.com/repos/magnunor/hyperspy","forks_url":"https://api.github.com/repos/magnunor/hyperspy/forks","keys_url":"https://api.github.com/repos/magnunor/hyperspy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magnunor/hyperspy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magnunor/hyperspy/teams","hooks_url":"https://api.github.com/repos/magnunor/hyperspy/hooks","issue_events_url":"https://api.github.com/repos/magnunor/hyperspy/issues/events{/number}","events_url":"https://api.github.com/repos/magnunor/hyperspy/events","assignees_url":"https://api.github.com/repos/magnunor/hyperspy/assignees{/user}","branches_url":"https://api.github.com/repos/magnunor/hyperspy/branches{/branch}","tags_url":"https://api.github.com/repos/magnunor/hyperspy/tags","blobs_url":"https://api.github.com/repos/magnunor/hyperspy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magnunor/hyperspy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magnunor/hyperspy/git/refs{/sha}","trees_url":"https://api.github.com/repos/magnunor/hyperspy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magnunor/hyperspy/statuses/{sha}","languages_url":"https://api.github.com/repos/magnunor/hyperspy/languages","stargazers_url":"https://api.github.com/repos/magnunor/hyperspy/stargazers","contributors_url":"https://api.github.com/repos/magnunor/hyperspy/contributors","subscribers_url":"https://api.github.com/repos/magnunor/hyperspy/subscribers","subscription_url":"https://api.github.com/repos/magnunor/hyperspy/subscription","commits_url":"https://api.github.com/repos/magnunor/hyperspy/commits{/sha}","git_commits_url":"https://api.github.com/repos/magnunor/hyperspy/git/commits{/sha}","comments_url":"https://api.github.com/repos/magnunor/hyperspy/comments{/number}","issue_comment_url":"https://api.github.com/repos/magnunor/hyperspy/issues/comments{/number}","contents_url":"https://api.github.com/repos/magnunor/hyperspy/contents/{+path}","compare_url":"https://api.github.com/repos/magnunor/hyperspy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magnunor/hyperspy/merges","archive_url":"https://api.github.com/repos/magnunor/hyperspy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magnunor/hyperspy/downloads","issues_url":"https://api.github.com/repos/magnunor/hyperspy/issues{/number}","pulls_url":"https://api.github.com/repos/magnunor/hyperspy/pulls{/number}","milestones_url":"https://api.github.com/repos/magnunor/hyperspy/milestones{/number}","notifications_url":"https://api.github.com/repos/magnunor/hyperspy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magnunor/hyperspy/labels{/name}","releases_url":"https://api.github.com/repos/magnunor/hyperspy/releases{/id}","created_at":"2012-10-01T21:01:13Z","updated_at":"2014-07-03T18:22:24Z","pushed_at":"2015-07-21T19:00:13Z","git_url":"git://github.com/magnunor/hyperspy.git","ssh_url":"git@github.com:magnunor/hyperspy.git","clone_url":"https://github.com/magnunor/hyperspy.git","svn_url":"https://github.com/magnunor/hyperspy","homepage":"http://www.hyperspy.org","size":72909,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"hyperspy:master","ref":"master","sha":"c415bca29a7d41b37f07be2ebacc1b5320c99fe8","user":{"login":"hyperspy","id":989756,"avatar_url":"https://avatars.githubusercontent.com/u/989756?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperspy","html_url":"https://github.com/hyperspy","followers_url":"https://api.github.com/users/hyperspy/followers","following_url":"https://api.github.com/users/hyperspy/following{/other_user}","gists_url":"https://api.github.com/users/hyperspy/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperspy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperspy/subscriptions","organizations_url":"https://api.github.com/users/hyperspy/orgs","repos_url":"https://api.github.com/users/hyperspy/repos","events_url":"https://api.github.com/users/hyperspy/events{/privacy}","received_events_url":"https://api.github.com/users/hyperspy/received_events","type":"Organization","site_admin":false},"repo":{"id":2233998,"name":"hyperspy","full_name":"hyperspy/hyperspy","owner":{"login":"hyperspy","id":989756,"avatar_url":"https://avatars.githubusercontent.com/u/989756?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperspy","html_url":"https://github.com/hyperspy","followers_url":"https://api.github.com/users/hyperspy/followers","following_url":"https://api.github.com/users/hyperspy/following{/other_user}","gists_url":"https://api.github.com/users/hyperspy/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperspy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperspy/subscriptions","organizations_url":"https://api.github.com/users/hyperspy/orgs","repos_url":"https://api.github.com/users/hyperspy/repos","events_url":"https://api.github.com/users/hyperspy/events{/privacy}","received_events_url":"https://api.github.com/users/hyperspy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyperspy/hyperspy","description":"Multidimensional data analysis","fork":false,"url":"https://api.github.com/repos/hyperspy/hyperspy","forks_url":"https://api.github.com/repos/hyperspy/hyperspy/forks","keys_url":"https://api.github.com/repos/hyperspy/hyperspy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperspy/hyperspy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperspy/hyperspy/teams","hooks_url":"https://api.github.com/repos/hyperspy/hyperspy/hooks","issue_events_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/events{/number}","events_url":"https://api.github.com/repos/hyperspy/hyperspy/events","assignees_url":"https://api.github.com/repos/hyperspy/hyperspy/assignees{/user}","branches_url":"https://api.github.com/repos/hyperspy/hyperspy/branches{/branch}","tags_url":"https://api.github.com/repos/hyperspy/hyperspy/tags","blobs_url":"https://api.github.com/repos/hyperspy/hyperspy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperspy/hyperspy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperspy/hyperspy/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperspy/hyperspy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperspy/hyperspy/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperspy/hyperspy/languages","stargazers_url":"https://api.github.com/repos/hyperspy/hyperspy/stargazers","contributors_url":"https://api.github.com/repos/hyperspy/hyperspy/contributors","subscribers_url":"https://api.github.com/repos/hyperspy/hyperspy/subscribers","subscription_url":"https://api.github.com/repos/hyperspy/hyperspy/subscription","commits_url":"https://api.github.com/repos/hyperspy/hyperspy/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperspy/hyperspy/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperspy/hyperspy/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperspy/hyperspy/contents/{+path}","compare_url":"https://api.github.com/repos/hyperspy/hyperspy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperspy/hyperspy/merges","archive_url":"https://api.github.com/repos/hyperspy/hyperspy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperspy/hyperspy/downloads","issues_url":"https://api.github.com/repos/hyperspy/hyperspy/issues{/number}","pulls_url":"https://api.github.com/repos/hyperspy/hyperspy/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperspy/hyperspy/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperspy/hyperspy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperspy/hyperspy/labels{/name}","releases_url":"https://api.github.com/repos/hyperspy/hyperspy/releases{/id}","created_at":"2011-08-19T13:14:36Z","updated_at":"2015-07-20T11:39:31Z","pushed_at":"2015-07-22T16:15:46Z","git_url":"git://github.com/hyperspy/hyperspy.git","ssh_url":"git@github.com:hyperspy/hyperspy.git","clone_url":"https://github.com/hyperspy/hyperspy.git","svn_url":"https://github.com/hyperspy/hyperspy","homepage":"http://www.hyperspy.org","size":75274,"stargazers_count":39,"watchers_count":39,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":134,"forks":25,"open_issues":134,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hyperspy/hyperspy/pulls/544"},"html":{"href":"https://github.com/hyperspy/hyperspy/pull/544"},"issue":{"href":"https://api.github.com/repos/hyperspy/hyperspy/issues/544"},"comments":{"href":"https://api.github.com/repos/hyperspy/hyperspy/issues/544/comments"},"review_comments":{"href":"https://api.github.com/repos/hyperspy/hyperspy/pulls/544/comments"},"review_comment":{"href":"https://api.github.com/repos/hyperspy/hyperspy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hyperspy/hyperspy/pulls/544/commits"},"statuses":{"href":"https://api.github.com/repos/hyperspy/hyperspy/statuses/909f5a382f670c9437e84155226785de5643631b"}}}}