{"action":"created","issue":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/347","labels_url":"https://api.github.com/repos/mne-tools/mne-python/issues/347/labels{/name}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/347/comments","events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/347/events","html_url":"https://github.com/mne-tools/mne-python/issues/347","id":9717232,"number":347,"title":"Savitzky-Golay filter","user":{"login":"agramfort","id":161052,"avatar_url":"https://avatars.githubusercontent.com/u/161052?v=3","gravatar_id":"","url":"https://api.github.com/users/agramfort","html_url":"https://github.com/agramfort","followers_url":"https://api.github.com/users/agramfort/followers","following_url":"https://api.github.com/users/agramfort/following{/other_user}","gists_url":"https://api.github.com/users/agramfort/gists{/gist_id}","starred_url":"https://api.github.com/users/agramfort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agramfort/subscriptions","organizations_url":"https://api.github.com/users/agramfort/orgs","repos_url":"https://api.github.com/users/agramfort/repos","events_url":"https://api.github.com/users/agramfort/events{/privacy}","received_events_url":"https://api.github.com/users/agramfort/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mne-tools/mne-python/labels/ENH","name":"ENH","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mne-tools/mne-python/milestones/5","html_url":"https://github.com/mne-tools/mne-python/milestones/0.9","labels_url":"https://api.github.com/repos/mne-tools/mne-python/milestones/5/labels","id":1011721,"number":5,"title":"0.9","description":null,"creator":{"login":"Eric89GXL","id":2365790,"avatar_url":"https://avatars.githubusercontent.com/u/2365790?v=3","gravatar_id":"","url":"https://api.github.com/users/Eric89GXL","html_url":"https://github.com/Eric89GXL","followers_url":"https://api.github.com/users/Eric89GXL/followers","following_url":"https://api.github.com/users/Eric89GXL/following{/other_user}","gists_url":"https://api.github.com/users/Eric89GXL/gists{/gist_id}","starred_url":"https://api.github.com/users/Eric89GXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eric89GXL/subscriptions","organizations_url":"https://api.github.com/users/Eric89GXL/orgs","repos_url":"https://api.github.com/users/Eric89GXL/repos","events_url":"https://api.github.com/users/Eric89GXL/events{/privacy}","received_events_url":"https://api.github.com/users/Eric89GXL/received_events","type":"User","site_admin":false},"open_issues":32,"closed_issues":8,"state":"open","created_at":"2015-03-09T03:10:39Z","updated_at":"2015-03-12T21:42:10Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2013-01-06T15:36:34Z","updated_at":"2015-03-12T22:56:30Z","closed_at":null,"body":"add support of the Savitzky-Golay filter\r\n\r\nsee : https://github.com/scipy/scipy/pull/304\r\n\r\nand : \r\n\r\nhttp://inst.eecs.berkeley.edu/~ee123/fa12/docs/SGFilter.pdf\r\n\r\ncould be used to filter Evoked and Epochs."},"comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments/78675448","html_url":"https://github.com/mne-tools/mne-python/issues/347#issuecomment-78675448","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/347","id":78675448,"user":{"login":"Eric89GXL","id":2365790,"avatar_url":"https://avatars.githubusercontent.com/u/2365790?v=3","gravatar_id":"","url":"https://api.github.com/users/Eric89GXL","html_url":"https://github.com/Eric89GXL","followers_url":"https://api.github.com/users/Eric89GXL/followers","following_url":"https://api.github.com/users/Eric89GXL/following{/other_user}","gists_url":"https://api.github.com/users/Eric89GXL/gists{/gist_id}","starred_url":"https://api.github.com/users/Eric89GXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eric89GXL/subscriptions","organizations_url":"https://api.github.com/users/Eric89GXL/orgs","repos_url":"https://api.github.com/users/Eric89GXL/repos","events_url":"https://api.github.com/users/Eric89GXL/events{/privacy}","received_events_url":"https://api.github.com/users/Eric89GXL/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T22:56:30Z","updated_at":"2015-03-12T22:56:30Z","body":"I wrote a gist suggesting that using a 5th-order polynomial with a window length twice as large as the wavelength of the freq of interest should work okay:\r\n\r\nhttps://gist.github.com/Eric89GXL/bbac101d50176611136b\r\n\r\nPlotting the original spectra (yellow) and post-savgol spectra for different filter orders (left labels) and requested \"lowpass frequencies\" (bottom labels), with the -20 dB point in horizontal dashed line and requested freq in dotted vertical line:\r\n\r\n![figure_1](https://cloud.githubusercontent.com/assets/2365790/6629911/3ebfae9c-c8d0-11e4-9255-f6e34ec342bd.png)\r\n"}}