{"action":"created","comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/38364176","id":38364176,"diff_hunk":"@@ -0,0 +1,393 @@\n+\"\"\" Cross frequency coupling functions. \"\"\"\n+# Authors: Praveen Sripad <praveen.sripad@rwth-aachen.de>\n+#          Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n+#          Christopher Holdgraf <choldgraf@berkeley.edu>\n+#\n+# License: BSD (3-clause)\n+\n+import numpy as np\n+from numpy.random import shuffle\n+\n+from ..stats import fdr_correction\n+from ..time_frequency import morlet\n+from ..time_frequency.tfr import cwt\n+from ..preprocessing.peak_finder import peak_finder\n+from ..filter import band_pass_filter\n+from ..parallel import parallel_func\n+from ..utils import check_random_state, ProgressBar\n+\n+\n+def _abs_cwt(x, W):\n+    \"\"\" Aux function \"\"\"\n+    return np.abs(cwt(x, [W], use_fft=False).ravel()).astype(np.float)\n+\n+\n+def shuffle_data(data):","path":"mne/connectivity/cfc.py","position":25,"original_position":25,"commit_id":"241e6e688765275738f68cf7ff1076de1582f122","original_commit_id":"241e6e688765275738f68cf7ff1076de1582f122","user":{"login":"choldgraf","id":1839645,"avatar_url":"https://avatars.githubusercontent.com/u/1839645?v=3","gravatar_id":"","url":"https://api.github.com/users/choldgraf","html_url":"https://github.com/choldgraf","followers_url":"https://api.github.com/users/choldgraf/followers","following_url":"https://api.github.com/users/choldgraf/following{/other_user}","gists_url":"https://api.github.com/users/choldgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/choldgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choldgraf/subscriptions","organizations_url":"https://api.github.com/users/choldgraf/orgs","repos_url":"https://api.github.com/users/choldgraf/repos","events_url":"https://api.github.com/users/choldgraf/events{/privacy}","received_events_url":"https://api.github.com/users/choldgraf/received_events","type":"User","site_admin":false},"body":"good call","created_at":"2015-08-31T21:52:32Z","updated_at":"2015-08-31T21:52:32Z","html_url":"https://github.com/mne-tools/mne-python/pull/2306#discussion_r38364176","pull_request_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2306","_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/38364176"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/2306#discussion_r38364176"},"pull_request":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2306"}}},"pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2306","id":40149782,"html_url":"https://github.com/mne-tools/mne-python/pull/2306","diff_url":"https://github.com/mne-tools/mne-python/pull/2306.diff","patch_url":"https://github.com/mne-tools/mne-python/pull/2306.patch","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2306","number":2306,"state":"open","locked":false,"title":"Add support for cross-frequency coupling and circular stats","user":{"login":"choldgraf","id":1839645,"avatar_url":"https://avatars.githubusercontent.com/u/1839645?v=3","gravatar_id":"","url":"https://api.github.com/users/choldgraf","html_url":"https://github.com/choldgraf","followers_url":"https://api.github.com/users/choldgraf/followers","following_url":"https://api.github.com/users/choldgraf/following{/other_user}","gists_url":"https://api.github.com/users/choldgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/choldgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choldgraf/subscriptions","organizations_url":"https://api.github.com/users/choldgraf/orgs","repos_url":"https://api.github.com/users/choldgraf/repos","events_url":"https://api.github.com/users/choldgraf/events{/privacy}","received_events_url":"https://api.github.com/users/choldgraf/received_events","type":"User","site_admin":false},"body":"This is a clone of #1388, also discussed in #182 \r\n\r\nNext up is to decide whether to keep the basic functionality the same, or to include ability to compute CFC between multiple signals (so it would behave similarly to the `spectral_connectivity` function)","created_at":"2015-07-16T16:41:10Z","updated_at":"2015-08-31T21:52:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"397ab0c9f6dbb14cfaab42d01bc992d968f7369d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2306/commits","review_comments_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2306/comments","review_comment_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2306/comments","statuses_url":"https://api.github.com/repos/mne-tools/mne-python/statuses/241e6e688765275738f68cf7ff1076de1582f122","head":{"label":"choldgraf:add_cfc","ref":"add_cfc","sha":"241e6e688765275738f68cf7ff1076de1582f122","user":{"login":"choldgraf","id":1839645,"avatar_url":"https://avatars.githubusercontent.com/u/1839645?v=3","gravatar_id":"","url":"https://api.github.com/users/choldgraf","html_url":"https://github.com/choldgraf","followers_url":"https://api.github.com/users/choldgraf/followers","following_url":"https://api.github.com/users/choldgraf/following{/other_user}","gists_url":"https://api.github.com/users/choldgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/choldgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choldgraf/subscriptions","organizations_url":"https://api.github.com/users/choldgraf/orgs","repos_url":"https://api.github.com/users/choldgraf/repos","events_url":"https://api.github.com/users/choldgraf/events{/privacy}","received_events_url":"https://api.github.com/users/choldgraf/received_events","type":"User","site_admin":false},"repo":{"id":29602471,"name":"mne-python","full_name":"choldgraf/mne-python","owner":{"login":"choldgraf","id":1839645,"avatar_url":"https://avatars.githubusercontent.com/u/1839645?v=3","gravatar_id":"","url":"https://api.github.com/users/choldgraf","html_url":"https://github.com/choldgraf","followers_url":"https://api.github.com/users/choldgraf/followers","following_url":"https://api.github.com/users/choldgraf/following{/other_user}","gists_url":"https://api.github.com/users/choldgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/choldgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choldgraf/subscriptions","organizations_url":"https://api.github.com/users/choldgraf/orgs","repos_url":"https://api.github.com/users/choldgraf/repos","events_url":"https://api.github.com/users/choldgraf/events{/privacy}","received_events_url":"https://api.github.com/users/choldgraf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/choldgraf/mne-python","description":"MNE : Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python","fork":true,"url":"https://api.github.com/repos/choldgraf/mne-python","forks_url":"https://api.github.com/repos/choldgraf/mne-python/forks","keys_url":"https://api.github.com/repos/choldgraf/mne-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/choldgraf/mne-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/choldgraf/mne-python/teams","hooks_url":"https://api.github.com/repos/choldgraf/mne-python/hooks","issue_events_url":"https://api.github.com/repos/choldgraf/mne-python/issues/events{/number}","events_url":"https://api.github.com/repos/choldgraf/mne-python/events","assignees_url":"https://api.github.com/repos/choldgraf/mne-python/assignees{/user}","branches_url":"https://api.github.com/repos/choldgraf/mne-python/branches{/branch}","tags_url":"https://api.github.com/repos/choldgraf/mne-python/tags","blobs_url":"https://api.github.com/repos/choldgraf/mne-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/choldgraf/mne-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/choldgraf/mne-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/choldgraf/mne-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/choldgraf/mne-python/statuses/{sha}","languages_url":"https://api.github.com/repos/choldgraf/mne-python/languages","stargazers_url":"https://api.github.com/repos/choldgraf/mne-python/stargazers","contributors_url":"https://api.github.com/repos/choldgraf/mne-python/contributors","subscribers_url":"https://api.github.com/repos/choldgraf/mne-python/subscribers","subscription_url":"https://api.github.com/repos/choldgraf/mne-python/subscription","commits_url":"https://api.github.com/repos/choldgraf/mne-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/choldgraf/mne-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/choldgraf/mne-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/choldgraf/mne-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/choldgraf/mne-python/contents/{+path}","compare_url":"https://api.github.com/repos/choldgraf/mne-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/choldgraf/mne-python/merges","archive_url":"https://api.github.com/repos/choldgraf/mne-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/choldgraf/mne-python/downloads","issues_url":"https://api.github.com/repos/choldgraf/mne-python/issues{/number}","pulls_url":"https://api.github.com/repos/choldgraf/mne-python/pulls{/number}","milestones_url":"https://api.github.com/repos/choldgraf/mne-python/milestones{/number}","notifications_url":"https://api.github.com/repos/choldgraf/mne-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/choldgraf/mne-python/labels{/name}","releases_url":"https://api.github.com/repos/choldgraf/mne-python/releases{/id}","created_at":"2015-01-21T17:41:37Z","updated_at":"2015-01-21T17:41:40Z","pushed_at":"2015-08-30T15:35:12Z","git_url":"git://github.com/choldgraf/mne-python.git","ssh_url":"git@github.com:choldgraf/mne-python.git","clone_url":"https://github.com/choldgraf/mne-python.git","svn_url":"https://github.com/choldgraf/mne-python","homepage":"http://martinos.org/mne/","size":81128,"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":"mne-tools:master","ref":"master","sha":"0cce5ae2be916a8cd25d9cf78e2ebda7c3cb6271","user":{"login":"mne-tools","id":583875,"avatar_url":"https://avatars.githubusercontent.com/u/583875?v=3","gravatar_id":"","url":"https://api.github.com/users/mne-tools","html_url":"https://github.com/mne-tools","followers_url":"https://api.github.com/users/mne-tools/followers","following_url":"https://api.github.com/users/mne-tools/following{/other_user}","gists_url":"https://api.github.com/users/mne-tools/gists{/gist_id}","starred_url":"https://api.github.com/users/mne-tools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mne-tools/subscriptions","organizations_url":"https://api.github.com/users/mne-tools/orgs","repos_url":"https://api.github.com/users/mne-tools/repos","events_url":"https://api.github.com/users/mne-tools/events{/privacy}","received_events_url":"https://api.github.com/users/mne-tools/received_events","type":"Organization","site_admin":false},"repo":{"id":1301584,"name":"mne-python","full_name":"mne-tools/mne-python","owner":{"login":"mne-tools","id":583875,"avatar_url":"https://avatars.githubusercontent.com/u/583875?v=3","gravatar_id":"","url":"https://api.github.com/users/mne-tools","html_url":"https://github.com/mne-tools","followers_url":"https://api.github.com/users/mne-tools/followers","following_url":"https://api.github.com/users/mne-tools/following{/other_user}","gists_url":"https://api.github.com/users/mne-tools/gists{/gist_id}","starred_url":"https://api.github.com/users/mne-tools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mne-tools/subscriptions","organizations_url":"https://api.github.com/users/mne-tools/orgs","repos_url":"https://api.github.com/users/mne-tools/repos","events_url":"https://api.github.com/users/mne-tools/events{/privacy}","received_events_url":"https://api.github.com/users/mne-tools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mne-tools/mne-python","description":"MNE : Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python","fork":false,"url":"https://api.github.com/repos/mne-tools/mne-python","forks_url":"https://api.github.com/repos/mne-tools/mne-python/forks","keys_url":"https://api.github.com/repos/mne-tools/mne-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mne-tools/mne-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mne-tools/mne-python/teams","hooks_url":"https://api.github.com/repos/mne-tools/mne-python/hooks","issue_events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/events{/number}","events_url":"https://api.github.com/repos/mne-tools/mne-python/events","assignees_url":"https://api.github.com/repos/mne-tools/mne-python/assignees{/user}","branches_url":"https://api.github.com/repos/mne-tools/mne-python/branches{/branch}","tags_url":"https://api.github.com/repos/mne-tools/mne-python/tags","blobs_url":"https://api.github.com/repos/mne-tools/mne-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mne-tools/mne-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mne-tools/mne-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/mne-tools/mne-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mne-tools/mne-python/statuses/{sha}","languages_url":"https://api.github.com/repos/mne-tools/mne-python/languages","stargazers_url":"https://api.github.com/repos/mne-tools/mne-python/stargazers","contributors_url":"https://api.github.com/repos/mne-tools/mne-python/contributors","subscribers_url":"https://api.github.com/repos/mne-tools/mne-python/subscribers","subscription_url":"https://api.github.com/repos/mne-tools/mne-python/subscription","commits_url":"https://api.github.com/repos/mne-tools/mne-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/mne-tools/mne-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/mne-tools/mne-python/contents/{+path}","compare_url":"https://api.github.com/repos/mne-tools/mne-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mne-tools/mne-python/merges","archive_url":"https://api.github.com/repos/mne-tools/mne-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mne-tools/mne-python/downloads","issues_url":"https://api.github.com/repos/mne-tools/mne-python/issues{/number}","pulls_url":"https://api.github.com/repos/mne-tools/mne-python/pulls{/number}","milestones_url":"https://api.github.com/repos/mne-tools/mne-python/milestones{/number}","notifications_url":"https://api.github.com/repos/mne-tools/mne-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mne-tools/mne-python/labels{/name}","releases_url":"https://api.github.com/repos/mne-tools/mne-python/releases{/id}","created_at":"2011-01-28T03:31:13Z","updated_at":"2015-08-23T12:38:45Z","pushed_at":"2015-08-31T13:28:12Z","git_url":"git://github.com/mne-tools/mne-python.git","ssh_url":"git@github.com:mne-tools/mne-python.git","clone_url":"https://github.com/mne-tools/mne-python.git","svn_url":"https://github.com/mne-tools/mne-python","homepage":"http://martinos.org/mne/","size":181968,"stargazers_count":145,"watchers_count":145,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":140,"mirror_url":null,"open_issues_count":194,"forks":140,"open_issues":194,"watchers":145,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2306"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/2306"},"issue":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/2306"},"comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/2306/comments"},"review_comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2306/comments"},"review_comment":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2306/commits"},"statuses":{"href":"https://api.github.com/repos/mne-tools/mne-python/statuses/241e6e688765275738f68cf7ff1076de1582f122"}}}}