{"action":"created","comment":{"url":"https://api.github.com/repos/NeuralEnsemble/elephant/pulls/comments/25932799","id":25932799,"diff_hunk":"@@ -0,0 +1,96 @@\n+# -*- coding: utf-8 -*-\n+\"\"\"\n+docstring goes here.\n+\n+:copyright: Copyright 2015 by the Elephant team, see AUTHORS.txt.\n+:license: Modified BSD, see LICENSE.txt for details.\n+\"\"\"\n+\n+import numpy as np\n+import scipy.signal\n+import quantities as pq\n+import neo\n+\n+\n+def butter(anasig, highpassfreq=None, lowpassfreq=None, order=4,\n+           filtfunc='filtfilt'):\n+    \"\"\"\n+    Butterworth filtering function for AnalogSignal objects. Filter type is\n+    determined according to how values of highpassfreq and lowpassfreq are\n+    given (see Parameters for details).\n+\n+    Parameters\n+    ----------\n+    anasig: AnalogSignal\n+        time series data to be filtered\n+    highpassfreq, lowpassfreq: Quantity or None\n+        high-pass and low-pass cut-off frequencies, respectively.\n+        Filter type is determined depending on values of these arguments:\n+            highpassfreq only (lowpassfreq = None):    highpass filter\n+            lowpassfreq only (highpassfreq = None):    lowpass filter\n+            highpassfreq < lowpassfreq:    bandpass filter\n+            highpassfreq > lowpassfreq:    bandstop filter\n+    order: int\n+        Order of Butterworth filter. Default is 4.\n+    filtfunc: string\n+        Filtering function to be used. Either 'filtfilt'\n+        (scipy.signal.filtfilt) or 'lfilter' (scipy.signal.lfilter). In most\n+        applications 'filtfilt' should be used, because it doesn't bring about\n+        phase shift. Default is 'filtfilt'.\n+\n+    Returns\n+    -------\n+    anasig_out: AnalogSignal\n+        Filtered signal\n+    \"\"\"\n+\n+    def apply_filter(signal, Fs, highpassfreq=None, lowpassfreq=None, order=4,","path":"elephant/signal_processing.py","position":47,"original_position":47,"commit_id":"3d77829664d544ec4218ab8d745b002f97a598f0","original_commit_id":"3d77829664d544ec4218ab8d745b002f97a598f0","user":{"login":"apdavison","id":260552,"avatar_url":"https://avatars.githubusercontent.com/u/260552?v=3","gravatar_id":"","url":"https://api.github.com/users/apdavison","html_url":"https://github.com/apdavison","followers_url":"https://api.github.com/users/apdavison/followers","following_url":"https://api.github.com/users/apdavison/following{/other_user}","gists_url":"https://api.github.com/users/apdavison/gists{/gist_id}","starred_url":"https://api.github.com/users/apdavison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apdavison/subscriptions","organizations_url":"https://api.github.com/users/apdavison/orgs","repos_url":"https://api.github.com/users/apdavison/repos","events_url":"https://api.github.com/users/apdavison/events{/privacy}","received_events_url":"https://api.github.com/users/apdavison/received_events","type":"User","site_admin":false},"body":"Is this a public function? If so it needs a docstring (docstring would be good anyway). If it is an internal function, the name should start with an underscore.","created_at":"2015-03-06T09:11:05Z","updated_at":"2015-03-06T09:11:05Z","html_url":"https://github.com/NeuralEnsemble/elephant/pull/19#discussion_r25932799","pull_request_url":"https://api.github.com/repos/NeuralEnsemble/elephant/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/NeuralEnsemble/elephant/pulls/comments/25932799"},"html":{"href":"https://github.com/NeuralEnsemble/elephant/pull/19#discussion_r25932799"},"pull_request":{"href":"https://api.github.com/repos/NeuralEnsemble/elephant/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/NeuralEnsemble/elephant/pulls/19","id":29988259,"html_url":"https://github.com/NeuralEnsemble/elephant/pull/19","diff_url":"https://github.com/NeuralEnsemble/elephant/pull/19.diff","patch_url":"https://github.com/NeuralEnsemble/elephant/pull/19.patch","issue_url":"https://api.github.com/repos/NeuralEnsemble/elephant/issues/19","number":19,"state":"open","locked":false,"title":"Butterworth filtering function for AnalogSignal","user":{"login":"Junji110","id":1890709,"avatar_url":"https://avatars.githubusercontent.com/u/1890709?v=3","gravatar_id":"","url":"https://api.github.com/users/Junji110","html_url":"https://github.com/Junji110","followers_url":"https://api.github.com/users/Junji110/followers","following_url":"https://api.github.com/users/Junji110/following{/other_user}","gists_url":"https://api.github.com/users/Junji110/gists{/gist_id}","starred_url":"https://api.github.com/users/Junji110/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Junji110/subscriptions","organizations_url":"https://api.github.com/users/Junji110/orgs","repos_url":"https://api.github.com/users/Junji110/repos","events_url":"https://api.github.com/users/Junji110/events{/privacy}","received_events_url":"https://api.github.com/users/Junji110/received_events","type":"User","site_admin":false},"body":"Added a Butterworth filtering function `butter()` in a newly created module `signal`","created_at":"2015-02-25T13:55:06Z","updated_at":"2015-03-06T09:11:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e79193196808d8407de860aaf05416af1fd73e60","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NeuralEnsemble/elephant/pulls/19/commits","review_comments_url":"https://api.github.com/repos/NeuralEnsemble/elephant/pulls/19/comments","review_comment_url":"https://api.github.com/repos/NeuralEnsemble/elephant/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NeuralEnsemble/elephant/issues/19/comments","statuses_url":"https://api.github.com/repos/NeuralEnsemble/elephant/statuses/3d77829664d544ec4218ab8d745b002f97a598f0","head":{"label":"Junji110:butter","ref":"butter","sha":"3d77829664d544ec4218ab8d745b002f97a598f0","user":{"login":"Junji110","id":1890709,"avatar_url":"https://avatars.githubusercontent.com/u/1890709?v=3","gravatar_id":"","url":"https://api.github.com/users/Junji110","html_url":"https://github.com/Junji110","followers_url":"https://api.github.com/users/Junji110/followers","following_url":"https://api.github.com/users/Junji110/following{/other_user}","gists_url":"https://api.github.com/users/Junji110/gists{/gist_id}","starred_url":"https://api.github.com/users/Junji110/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Junji110/subscriptions","organizations_url":"https://api.github.com/users/Junji110/orgs","repos_url":"https://api.github.com/users/Junji110/repos","events_url":"https://api.github.com/users/Junji110/events{/privacy}","received_events_url":"https://api.github.com/users/Junji110/received_events","type":"User","site_admin":false},"repo":{"id":31012930,"name":"elephant","full_name":"Junji110/elephant","owner":{"login":"Junji110","id":1890709,"avatar_url":"https://avatars.githubusercontent.com/u/1890709?v=3","gravatar_id":"","url":"https://api.github.com/users/Junji110","html_url":"https://github.com/Junji110","followers_url":"https://api.github.com/users/Junji110/followers","following_url":"https://api.github.com/users/Junji110/following{/other_user}","gists_url":"https://api.github.com/users/Junji110/gists{/gist_id}","starred_url":"https://api.github.com/users/Junji110/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Junji110/subscriptions","organizations_url":"https://api.github.com/users/Junji110/orgs","repos_url":"https://api.github.com/users/Junji110/repos","events_url":"https://api.github.com/users/Junji110/events{/privacy}","received_events_url":"https://api.github.com/users/Junji110/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Junji110/elephant","description":"ElePhAnT is the ElectroPhysiology Analysis Toolkit","fork":true,"url":"https://api.github.com/repos/Junji110/elephant","forks_url":"https://api.github.com/repos/Junji110/elephant/forks","keys_url":"https://api.github.com/repos/Junji110/elephant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Junji110/elephant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Junji110/elephant/teams","hooks_url":"https://api.github.com/repos/Junji110/elephant/hooks","issue_events_url":"https://api.github.com/repos/Junji110/elephant/issues/events{/number}","events_url":"https://api.github.com/repos/Junji110/elephant/events","assignees_url":"https://api.github.com/repos/Junji110/elephant/assignees{/user}","branches_url":"https://api.github.com/repos/Junji110/elephant/branches{/branch}","tags_url":"https://api.github.com/repos/Junji110/elephant/tags","blobs_url":"https://api.github.com/repos/Junji110/elephant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Junji110/elephant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Junji110/elephant/git/refs{/sha}","trees_url":"https://api.github.com/repos/Junji110/elephant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Junji110/elephant/statuses/{sha}","languages_url":"https://api.github.com/repos/Junji110/elephant/languages","stargazers_url":"https://api.github.com/repos/Junji110/elephant/stargazers","contributors_url":"https://api.github.com/repos/Junji110/elephant/contributors","subscribers_url":"https://api.github.com/repos/Junji110/elephant/subscribers","subscription_url":"https://api.github.com/repos/Junji110/elephant/subscription","commits_url":"https://api.github.com/repos/Junji110/elephant/commits{/sha}","git_commits_url":"https://api.github.com/repos/Junji110/elephant/git/commits{/sha}","comments_url":"https://api.github.com/repos/Junji110/elephant/comments{/number}","issue_comment_url":"https://api.github.com/repos/Junji110/elephant/issues/comments{/number}","contents_url":"https://api.github.com/repos/Junji110/elephant/contents/{+path}","compare_url":"https://api.github.com/repos/Junji110/elephant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Junji110/elephant/merges","archive_url":"https://api.github.com/repos/Junji110/elephant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Junji110/elephant/downloads","issues_url":"https://api.github.com/repos/Junji110/elephant/issues{/number}","pulls_url":"https://api.github.com/repos/Junji110/elephant/pulls{/number}","milestones_url":"https://api.github.com/repos/Junji110/elephant/milestones{/number}","notifications_url":"https://api.github.com/repos/Junji110/elephant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Junji110/elephant/labels{/name}","releases_url":"https://api.github.com/repos/Junji110/elephant/releases{/id}","created_at":"2015-02-19T11:46:02Z","updated_at":"2015-02-19T11:46:02Z","pushed_at":"2015-03-05T12:49:09Z","git_url":"git://github.com/Junji110/elephant.git","ssh_url":"git@github.com:Junji110/elephant.git","clone_url":"https://github.com/Junji110/elephant.git","svn_url":"https://github.com/Junji110/elephant","homepage":"","size":155,"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":"NeuralEnsemble:master","ref":"master","sha":"37946e29566210dce1d0b9dd972e23da631f7a21","user":{"login":"NeuralEnsemble","id":1540309,"avatar_url":"https://avatars.githubusercontent.com/u/1540309?v=3","gravatar_id":"","url":"https://api.github.com/users/NeuralEnsemble","html_url":"https://github.com/NeuralEnsemble","followers_url":"https://api.github.com/users/NeuralEnsemble/followers","following_url":"https://api.github.com/users/NeuralEnsemble/following{/other_user}","gists_url":"https://api.github.com/users/NeuralEnsemble/gists{/gist_id}","starred_url":"https://api.github.com/users/NeuralEnsemble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeuralEnsemble/subscriptions","organizations_url":"https://api.github.com/users/NeuralEnsemble/orgs","repos_url":"https://api.github.com/users/NeuralEnsemble/repos","events_url":"https://api.github.com/users/NeuralEnsemble/events{/privacy}","received_events_url":"https://api.github.com/users/NeuralEnsemble/received_events","type":"Organization","site_admin":false},"repo":{"id":10311278,"name":"elephant","full_name":"NeuralEnsemble/elephant","owner":{"login":"NeuralEnsemble","id":1540309,"avatar_url":"https://avatars.githubusercontent.com/u/1540309?v=3","gravatar_id":"","url":"https://api.github.com/users/NeuralEnsemble","html_url":"https://github.com/NeuralEnsemble","followers_url":"https://api.github.com/users/NeuralEnsemble/followers","following_url":"https://api.github.com/users/NeuralEnsemble/following{/other_user}","gists_url":"https://api.github.com/users/NeuralEnsemble/gists{/gist_id}","starred_url":"https://api.github.com/users/NeuralEnsemble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeuralEnsemble/subscriptions","organizations_url":"https://api.github.com/users/NeuralEnsemble/orgs","repos_url":"https://api.github.com/users/NeuralEnsemble/repos","events_url":"https://api.github.com/users/NeuralEnsemble/events{/privacy}","received_events_url":"https://api.github.com/users/NeuralEnsemble/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NeuralEnsemble/elephant","description":"ElePhAnT is the ElectroPhysiology Analysis Toolkit","fork":false,"url":"https://api.github.com/repos/NeuralEnsemble/elephant","forks_url":"https://api.github.com/repos/NeuralEnsemble/elephant/forks","keys_url":"https://api.github.com/repos/NeuralEnsemble/elephant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NeuralEnsemble/elephant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NeuralEnsemble/elephant/teams","hooks_url":"https://api.github.com/repos/NeuralEnsemble/elephant/hooks","issue_events_url":"https://api.github.com/repos/NeuralEnsemble/elephant/issues/events{/number}","events_url":"https://api.github.com/repos/NeuralEnsemble/elephant/events","assignees_url":"https://api.github.com/repos/NeuralEnsemble/elephant/assignees{/user}","branches_url":"https://api.github.com/repos/NeuralEnsemble/elephant/branches{/branch}","tags_url":"https://api.github.com/repos/NeuralEnsemble/elephant/tags","blobs_url":"https://api.github.com/repos/NeuralEnsemble/elephant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NeuralEnsemble/elephant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NeuralEnsemble/elephant/git/refs{/sha}","trees_url":"https://api.github.com/repos/NeuralEnsemble/elephant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NeuralEnsemble/elephant/statuses/{sha}","languages_url":"https://api.github.com/repos/NeuralEnsemble/elephant/languages","stargazers_url":"https://api.github.com/repos/NeuralEnsemble/elephant/stargazers","contributors_url":"https://api.github.com/repos/NeuralEnsemble/elephant/contributors","subscribers_url":"https://api.github.com/repos/NeuralEnsemble/elephant/subscribers","subscription_url":"https://api.github.com/repos/NeuralEnsemble/elephant/subscription","commits_url":"https://api.github.com/repos/NeuralEnsemble/elephant/commits{/sha}","git_commits_url":"https://api.github.com/repos/NeuralEnsemble/elephant/git/commits{/sha}","comments_url":"https://api.github.com/repos/NeuralEnsemble/elephant/comments{/number}","issue_comment_url":"https://api.github.com/repos/NeuralEnsemble/elephant/issues/comments{/number}","contents_url":"https://api.github.com/repos/NeuralEnsemble/elephant/contents/{+path}","compare_url":"https://api.github.com/repos/NeuralEnsemble/elephant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NeuralEnsemble/elephant/merges","archive_url":"https://api.github.com/repos/NeuralEnsemble/elephant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NeuralEnsemble/elephant/downloads","issues_url":"https://api.github.com/repos/NeuralEnsemble/elephant/issues{/number}","pulls_url":"https://api.github.com/repos/NeuralEnsemble/elephant/pulls{/number}","milestones_url":"https://api.github.com/repos/NeuralEnsemble/elephant/milestones{/number}","notifications_url":"https://api.github.com/repos/NeuralEnsemble/elephant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NeuralEnsemble/elephant/labels{/name}","releases_url":"https://api.github.com/repos/NeuralEnsemble/elephant/releases{/id}","created_at":"2013-05-27T08:59:34Z","updated_at":"2015-03-05T22:02:54Z","pushed_at":"2015-03-05T22:02:54Z","git_url":"git://github.com/NeuralEnsemble/elephant.git","ssh_url":"git@github.com:NeuralEnsemble/elephant.git","clone_url":"https://github.com/NeuralEnsemble/elephant.git","svn_url":"https://github.com/NeuralEnsemble/elephant","homepage":"","size":436,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":10,"forks":17,"open_issues":10,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NeuralEnsemble/elephant/pulls/19"},"html":{"href":"https://github.com/NeuralEnsemble/elephant/pull/19"},"issue":{"href":"https://api.github.com/repos/NeuralEnsemble/elephant/issues/19"},"comments":{"href":"https://api.github.com/repos/NeuralEnsemble/elephant/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/NeuralEnsemble/elephant/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/NeuralEnsemble/elephant/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NeuralEnsemble/elephant/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/NeuralEnsemble/elephant/statuses/3d77829664d544ec4218ab8d745b002f97a598f0"}}}}