{"action":"created","comment":{"url":"https://api.github.com/repos/mne-tools/mne-sandbox/pulls/comments/65223218","id":65223218,"diff_hunk":"@@ -0,0 +1,623 @@\n+import numpy as np\n+from mne.time_frequency import cwt_morlet\n+from mne.preprocessing import peak_finder\n+from mne.utils import ProgressBar, logger\n+from itertools import product\n+import mne\n+import warnings\n+\n+\n+# Supported PAC functions\n+_pac_funcs = ['plv', 'glm', 'mi_tort', 'mi_canolty', 'ozkurt', 'otc']\n+# Calculate the phase of the amplitude signal for these PAC funcs\n+_hi_phase_funcs = ['plv']\n+\n+\n+def phase_amplitude_coupling(inst, f_phase, f_amp, ixs, pac_func='ozkurt',\n+                             events=None, tmin=None, tmax=None, n_cycles=3,\n+                             scale_amp_func=None,  return_data=False,\n+                             concat_epochs=False, n_jobs=1, verbose=None):\n+    \"\"\" Compute phase-amplitude coupling between pairs of signals using pacpy.\n+\n+    Parameters\n+    ----------\n+    inst : an instance of Raw or Epochs\n+        The data used to calculate PAC.\n+    f_phase : array, dtype float, shape (n_bands, 2,)\n+        The frequency range to use for low-frequency phase carrier.\n+    f_amp : array, dtype float, shape (n_bands, 2,)\n+        The frequency range to use for high-frequency amplitude modulation.\n+    ixs : array-like, shape (n_pairs x 2)\n+        The indices for low/high frequency channels. PAC will be estimated\n+        between n_pairs of channels. Indices correspond to rows of `data`.\n+    pac_func : {'plv', 'glm', 'mi_canolty', 'mi_tort', 'ozkurt'} |\n+               list of strings\n+        The function for estimating PAC. Corresponds to functions in\n+        `pacpy.pac`. Defaults to 'ozkurt'.\n+    events : array, shape (n_events, 3) | array, shape (n_events,) | None\n+        MNE events array. To be supplied if data is 2D and output should be\n+        split by events. In this case, `tmin` and `tmax` must be provided. If\n+        `ndim == 1`, it is assumed to be event indices, and all events will be\n+        grouped together.\n+    tmin : float | list of floats, shape (n_pac_windows,) | None\n+        If `events` is not provided, it is the start time to use in `inst`.\n+        If `events` is provided, it is the time (in seconds) to include before\n+        each event index. If a list of floats is given, then PAC is calculated\n+        for each pair of `tmin` and `tmax`. Defaults to `min(inst.times)`.\n+    tmax : float | list of floats, shape (n_pac_windows,) | None\n+        If `events` is not provided, it is the stop time to use in `inst`.\n+        If `events` is provided, it is the time (in seconds) to include after\n+        each event index. If a list of floats is given, then PAC is calculated\n+        for each pair of `tmin` and `tmax`. Defaults to `max(inst.n_times)`.\n+    n_cycles : int | None\n+        The number of cycles to be included in the window for each band-pass\n+        filter. Defaults to 3.\n+    scale_amp_func : None | function\n+        If not None, will be called on each amplitude signal in order to scale\n+        the values. Function must accept an N-D input and will operate on the\n+        last dimension. E.g., `sklearn.preprocessing.scale`.\n+        Defaults to no scaling.\n+    return_data : bool\n+        If False, output will be `[pac_out]`. If True, output will be,\n+        `[pac_out, low_freq_phase, hi_freq_amplitude]`.\n+    concat_epochs : bool\n+        If True, epochs will be concatenated before calculating PAC values. If\n+        epochs are relatively short, this is a good idea in order to improve\n+        stability of the PAC metric.\n+    n_jobs : int\n+        Number of jobs to run in parallel. Defaults to 1.\n+    verbose : bool, str, int, or None\n+        If not None, override default verbose level (see `mne.verbose`).\n+\n+    Returns\n+    -------\n+    pac_out : array, list of arrays, dtype float, shape (n_epochs, n_pairs,\n+              n_times)\n+        The computed phase-amplitude coupling between\n+        each pair of data sources given in ixs. If multiple pac metrics are\n+        specified, there will be one array per metric in the output list.\n+    [phase_signal] : array, shape (n_phase_signals, n_times,)\n+        Only returned if `return_data` is True. The phase timeseries of the\n+        phase signals (first column of `ixs`).\n+    [amp_signal] : array, shape (n_amp_signals, n_times,)\n+        Only returned if `return_data` is True. The amplitude timeseries of the\n+        amplitude signals (second column of `ixs`).\n+\n+    References\n+    ----------\n+    [1] This function uses the PacPy module developed by the Voytek lab.\n+        https://github.com/voytekresearch/pacpy\n+    \"\"\"\n+    from mne.io.base import _BaseRaw\n+    if not isinstance(inst, _BaseRaw):\n+        raise ValueError('Must supply Raw as input')\n+    sfreq = inst.info['sfreq']\n+    data = inst[:][0]\n+    pac = _phase_amplitude_coupling(data, sfreq, f_phase, f_amp, ixs,\n+                                    pac_func=pac_func, events=events,\n+                                    tmin=tmin, tmax=tmax, n_cycles=n_cycles,\n+                                    scale_amp_func=scale_amp_func,\n+                                    return_data=return_data,\n+                                    concat_epochs=concat_epochs,\n+                                    n_jobs=n_jobs, verbose=verbose)\n+    # Collect the data properly\n+    if return_data is True:\n+        pac, freq_pac, data_ph, data_am = pac\n+        return pac, freq_pac, data_ph, data_am\n+    else:\n+        pac, freq_pac = pac\n+        return pac, freq_pac\n+\n+\n+def _phase_amplitude_coupling(data, sfreq, f_phase, f_amp, ixs,\n+                              pac_func='ozkurt', events=None,\n+                              tmin=None, tmax=None, n_cycles=3,\n+                              scale_amp_func=None, return_data=False,\n+                              concat_epochs=False, n_jobs=1,\n+                              verbose=None):\n+    \"\"\" Compute phase-amplitude coupling using pacpy.\n+\n+    Parameters\n+    ----------\n+    data : array, shape ([n_epochs], n_channels, n_times)\n+        The data used to calculate PAC\n+    sfreq : float\n+        The sampling frequency of the data.\n+    f_phase : array, dtype float, shape (n_bands, 2,)\n+        The frequency range to use for low-frequency phase carrier.\n+    f_amp : array, dtype float, shape (n_bands, 2,)\n+        The frequency range to use for high-frequency amplitude modulation.\n+    ixs : array-like, shape (n_pairs x 2)\n+        The indices for low/high frequency channels. PAC will be estimated\n+        between n_pairs of channels. Indices correspond to rows of `data`.\n+    pac_func : {'plv', 'glm', 'mi_canolty', 'mi_tort', 'ozkurt'} |\n+               list of strings\n+        The function for estimating PAC. Corresponds to functions in\n+        `pacpy.pac`. Defaults to 'ozkurt'.\n+    events : array, shape (n_events, 3) | array, shape (n_events,) | None\n+        MNE events array. To be supplied if data is 2D and output should be\n+        split by events. In this case, `tmin` and `tmax` must be provided. If\n+        `ndim == 1`, it is assumed to be event indices, and all events will be\n+        grouped together.\n+    tmin : float | list of floats, shape (n_pac_windows,) | None\n+        If `events` is not provided, it is the start time to use in `inst`.\n+        If `events` is provided, it is the time (in seconds) to include before\n+        each event index. If a list of floats is given, then PAC is calculated\n+        for each pair of `tmin` and `tmax`. Defaults to `min(inst.times)`.\n+    tmax : float | list of floats, shape (n_pac_windows,) | None\n+        If `events` is not provided, it is the stop time to use in `inst`.\n+        If `events` is provided, it is the time (in seconds) to include after\n+        each event index. If a list of floats is given, then PAC is calculated\n+        for each pair of `tmin` and `tmax`. Defaults to `max(inst.n_times)`.\n+    n_cycles : int | None\n+        The number of cycles to be included in the window for each band-pass\n+        filter. Defaults to 3.\n+    scale_amp_func : None | function\n+        If not None, will be called on each amplitude signal in order to scale\n+        the values. Function must accept an N-D input and will operate on the\n+        last dimension. E.g., `sklearn.preprocessing.scale`.\n+        Defaults to no scaling.\n+    return_data : bool\n+        If False, output will be `[pac_out]`. If True, output will be,\n+        `[pac_out, low_freq_phase, hi_freq_amplitude]`.\n+    concat_epochs : bool\n+        If True, epochs will be concatenated before calculating PAC values. If\n+        epochs are relatively short, this is a good idea in order to improve\n+        stability of the PAC metric.\n+    n_jobs : int\n+        Number of jobs to run in parallel. Defaults to 1.\n+    verbose : bool, str, int, or None\n+        If not None, override default verbose level (see `mne.verbose`).\n+\n+    Returns\n+    -------\n+    pac_out : array, list of arrays, dtype float, shape (n_epochs, n_pairs,\n+              n_times)\n+        The computed phase-amplitude coupling between\n+        each pair of data sources given in ixs. If multiple pac metrics are\n+        specified, there will be one array per metric in the output list.\n+    [phase_signal] : array, shape (n_phase_signals, n_times,)\n+        Only returned if `return_data` is True. The phase timeseries of the\n+        phase signals (first column of `ixs`).\n+    [amp_signal] : array, shape (n_amp_signals, n_times,)\n+        Only returned if `return_data` is True. The amplitude timeseries of the\n+        amplitude signals (second column of `ixs`).\n+    \"\"\"\n+    from ..externals.pacpy import pac as ppac\n+    pac_func = np.atleast_1d(pac_func)\n+    for i_func in pac_func:\n+        if i_func not in _pac_funcs:\n+            raise ValueError(\"PAC function %s is not supported\" % i_func)\n+    n_pac_funcs = pac_func.shape[0]\n+    ixs = np.array(ixs, ndmin=2)\n+    tmin = 0 if tmin is None else tmin\n+    tmin = np.atleast_1d(tmin)\n+    n_times = len(tmin)\n+    tmax = (data.shape[-1] - 1) / float(sfreq) if tmax is None else tmax\n+    tmax = np.atleast_1d(tmax)\n+    f_phase = np.atleast_2d(f_phase)\n+    f_amp = np.atleast_2d(f_amp)\n+\n+    if data.ndim != 2:\n+        raise ValueError('Data must be shape (n_channels, n_times)')\n+    if ixs.shape[1] != 2:\n+        raise ValueError('Indices must have have a 2nd dimension of length 2')\n+    if f_phase.shape[-1] != 2 or f_amp.shape[-1] != 2:\n+        raise ValueError('Frequencies must be specified w/ a low/hi tuple')\n+    if len(tmin) != len(tmax):\n+        raise ValueError('tmin and tmax have differing lengths')\n+    if any(i_f.shape[0] > 1 and 'plv' in pac_func for i_f in (f_amp, f_phase)):\n+        raise ValueError('If calculating PLV, must use a single pair of freqs')\n+\n+    logger.info('Pre-filtering data and extracting phase/amplitude...')\n+    hi_phase = np.unique([i_func in _hi_phase_funcs for i_func in pac_func])\n+    if len(hi_phase) != 1:\n+        raise ValueError(\"Can't mix pac funcs that use both hi-freq phase/amp\")\n+    hi_phase = bool(hi_phase[0])\n+    data_ph, data_am, ix_map_ph, ix_map_am = _pre_filter_ph_am(\n+        data, sfreq, ixs, f_phase, f_amp, hi_phase=hi_phase,\n+        scale_amp_func=scale_amp_func, n_cycles=n_cycles)\n+\n+    # So we know how big the PAC output will be\n+    if events is None:\n+        n_ep = 1\n+    elif concat_epochs is True:\n+        if events.ndim == 1:\n+            n_ep = 1\n+        else:\n+            n_ep = np.unique(events[:, -1]).shape[0]\n+    else:\n+        n_ep = events.shape[0]\n+\n+    # Iterate through each pair of frequencies\n+    ixs_freqs = product(range(data_ph.shape[1]), range(data_am.shape[1]))\n+    ixs_freqs = np.atleast_2d(list(ixs_freqs))\n+\n+    freq_pac = np.array([[f_phase[ii], f_amp[jj]] for ii, jj in ixs_freqs])\n+    n_f_pairs = len(ixs_freqs)\n+    pac = np.zeros([n_pac_funcs, n_ep, ixs.shape[0], n_f_pairs, n_times])\n+    for i_f_pair, (ix_f_ph, ix_f_am) in enumerate(ixs_freqs):\n+        # Second dimension is frequency\n+        i_f_data_ph = data_ph[:, ix_f_ph, ...]\n+        i_f_data_am = data_am[:, ix_f_am, ...]\n+\n+        # Redefine indices to match the new data arrays\n+        ixs_new = [(ix_map_ph[i], ix_map_am[j]) for i, j in ixs]\n+        i_f_data_ph = mne.io.RawArray(\n+            i_f_data_ph, mne.create_info(i_f_data_ph.shape[0], sfreq))\n+        i_f_data_am = mne.io.RawArray(\n+            i_f_data_am, mne.create_info(i_f_data_am.shape[0], sfreq))\n+\n+        # Turn into Epochs if we have defined events\n+        if events is not None:\n+            i_f_data_ph = _raw_to_epochs_mne(i_f_data_ph, events, tmin, tmax)\n+            i_f_data_am = _raw_to_epochs_mne(i_f_data_am, events, tmin, tmax)\n+\n+        # Data is either Raw or Epochs\n+        pbar = ProgressBar(n_ep)\n+        for itime, (i_tmin, i_tmax) in enumerate(zip(tmin, tmax)):\n+            # Pull times of interest\n+            with warnings.catch_warnings():  # To suppress a depracation\n+                warnings.simplefilter(\"ignore\")\n+                # Not sure how to do this w/o copying\n+                i_t_data_am = i_f_data_am.copy().crop(i_tmin, i_tmax)\n+                i_t_data_ph = i_f_data_ph.copy().crop(i_tmin, i_tmax)\n+\n+            if concat_epochs is True:\n+                # Iterate through each event type and hstack\n+                con_data_ph = []\n+                con_data_am = []\n+                for i_ev in i_t_data_am.event_id.keys():\n+                    con_data_ph.append(np.hstack(i_t_data_ph[i_ev]._data))\n+                    con_data_am.append(np.hstack(i_t_data_am[i_ev]._data))\n+                i_t_data_ph = np.vstack(con_data_ph)\n+                i_t_data_am = np.vstack(con_data_am)\n+            else:\n+                # Just pull all epochs separately\n+                i_t_data_ph = i_t_data_ph._data\n+                i_t_data_am = i_t_data_am._data\n+            # Now make sure that inputs to the loop are ep x chan x time\n+            if i_t_data_am.ndim == 2:\n+                i_t_data_ph = i_t_data_ph[np.newaxis, ...]\n+                i_t_data_am = i_t_data_am[np.newaxis, ...]\n+            # Loop through epochs (or epoch grps), each index pair, and funcs\n+            data_iter = zip(i_t_data_ph, i_t_data_am)\n+            for iep, (ep_ph, ep_am) in enumerate(data_iter):\n+                for iix, (i_ix_ph, i_ix_am) in enumerate(ixs_new):\n+                    for ix_func, i_pac_func in enumerate(pac_func):\n+                        func = getattr(ppac, i_pac_func)\n+                        pac[ix_func, iep, iix, i_f_pair, itime] = func(\n+                            ep_ph[i_ix_ph], ep_am[i_ix_am],\n+                            f_phase, f_amp, filterfn=False)\n+            pbar.update_with_increment_value(1)\n+    if pac.shape[0] == 1:\n+        pac = pac[0]\n+    if return_data:\n+        return pac, freq_pac, data_ph, data_am\n+    else:\n+        return pac, freq_pac\n+\n+\n+def _raw_to_epochs_mne(raw, events, tmin, tmax):\n+    \"\"\"Convert Raw data to Epochs w/ some time checks.\"\"\"\n+    events = np.atleast_1d(events)\n+    if events.ndim == 1:\n+        events = np.vstack([events, np.zeros_like(events),\n+                            np.ones_like(events)]).T\n+    if events.ndim != 2:\n+        raise ValueError('events have incorrect number of dimensions')\n+    if events.shape[-1] != 3:\n+        raise ValueError('events have incorrect number of columns')\n+    # Convert to Epochs using the event times\n+    tmin_all = np.min(tmin)\n+    tmax_all = np.max(tmax) + (1. / raw.info['sfreq'])\n+    return mne.Epochs(raw, events, tmin=tmin_all, tmax=tmax_all, preload=True,\n+                      baseline=None)\n+\n+\n+def _pre_filter_ph_am(data, sfreq, ixs, f_ph, f_am, n_cycles=3,","path":"mne_sandbox/connectivity/cfc.py","position":318,"original_position":318,"commit_id":"b445843ba54db68b59da26de8ed1a1921f019d04","original_commit_id":"b445843ba54db68b59da26de8ed1a1921f019d04","user":{"login":"TomDLT","id":11065596,"avatar_url":"https://avatars.githubusercontent.com/u/11065596?v=3","gravatar_id":"","url":"https://api.github.com/users/TomDLT","html_url":"https://github.com/TomDLT","followers_url":"https://api.github.com/users/TomDLT/followers","following_url":"https://api.github.com/users/TomDLT/following{/other_user}","gists_url":"https://api.github.com/users/TomDLT/gists{/gist_id}","starred_url":"https://api.github.com/users/TomDLT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomDLT/subscriptions","organizations_url":"https://api.github.com/users/TomDLT/orgs","repos_url":"https://api.github.com/users/TomDLT/repos","events_url":"https://api.github.com/users/TomDLT/events{/privacy}","received_events_url":"https://api.github.com/users/TomDLT/received_events","type":"User","site_admin":false},"body":"what about submitting this to pacpy to speed up comodulogram's computation?","created_at":"2016-05-31T17:08:02Z","updated_at":"2016-05-31T17:08:02Z","html_url":"https://github.com/mne-tools/mne-sandbox/pull/7#discussion_r65223218","pull_request_url":"https://api.github.com/repos/mne-tools/mne-sandbox/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-sandbox/pulls/comments/65223218"},"html":{"href":"https://github.com/mne-tools/mne-sandbox/pull/7#discussion_r65223218"},"pull_request":{"href":"https://api.github.com/repos/mne-tools/mne-sandbox/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-sandbox/pulls/7","id":66236100,"html_url":"https://github.com/mne-tools/mne-sandbox/pull/7","diff_url":"https://github.com/mne-tools/mne-sandbox/pull/7.diff","patch_url":"https://github.com/mne-tools/mne-sandbox/pull/7.patch","issue_url":"https://api.github.com/repos/mne-tools/mne-sandbox/issues/7","number":7,"state":"open","locked":false,"title":"adding CFC code, first commit","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 modified port of the CFC code in the PR here: https://github.com/mne-tools/mne-python/pull/2306\r\n\r\nThe code has been cleaned up a bit and some new features have been added (e.g., ability to concatenate epochs before calculating CFC vs. calculating CFC individually for each epoch). It still has a ways to go and I'm unsure of the specific features to include, so all comments are welcome. I've also included a couple of visualization features. Some thoughts on next steps:\r\n\r\n1. Create a good example, preferably with some data that shows clear CFC\r\n2. Determine the scope of functionality for this\r\n3. Freeze and API\r\n4. Think of some good benchmarks for CFC\r\n\r\nLMKWYT","created_at":"2016-04-12T22:05:58Z","updated_at":"2016-05-31T17:08:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8fb00d3d23371df5619c6e7216426aea5fe1c89","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mne-tools/mne-sandbox/pulls/7/commits","review_comments_url":"https://api.github.com/repos/mne-tools/mne-sandbox/pulls/7/comments","review_comment_url":"https://api.github.com/repos/mne-tools/mne-sandbox/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mne-tools/mne-sandbox/issues/7/comments","statuses_url":"https://api.github.com/repos/mne-tools/mne-sandbox/statuses/b445843ba54db68b59da26de8ed1a1921f019d04","head":{"label":"choldgraf:add_cfc","ref":"add_cfc","sha":"b445843ba54db68b59da26de8ed1a1921f019d04","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":56100249,"name":"mne-sandbox","full_name":"choldgraf/mne-sandbox","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-sandbox","description":"experimental mne-python code","fork":true,"url":"https://api.github.com/repos/choldgraf/mne-sandbox","forks_url":"https://api.github.com/repos/choldgraf/mne-sandbox/forks","keys_url":"https://api.github.com/repos/choldgraf/mne-sandbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/choldgraf/mne-sandbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/choldgraf/mne-sandbox/teams","hooks_url":"https://api.github.com/repos/choldgraf/mne-sandbox/hooks","issue_events_url":"https://api.github.com/repos/choldgraf/mne-sandbox/issues/events{/number}","events_url":"https://api.github.com/repos/choldgraf/mne-sandbox/events","assignees_url":"https://api.github.com/repos/choldgraf/mne-sandbox/assignees{/user}","branches_url":"https://api.github.com/repos/choldgraf/mne-sandbox/branches{/branch}","tags_url":"https://api.github.com/repos/choldgraf/mne-sandbox/tags","blobs_url":"https://api.github.com/repos/choldgraf/mne-sandbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/choldgraf/mne-sandbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/choldgraf/mne-sandbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/choldgraf/mne-sandbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/choldgraf/mne-sandbox/statuses/{sha}","languages_url":"https://api.github.com/repos/choldgraf/mne-sandbox/languages","stargazers_url":"https://api.github.com/repos/choldgraf/mne-sandbox/stargazers","contributors_url":"https://api.github.com/repos/choldgraf/mne-sandbox/contributors","subscribers_url":"https://api.github.com/repos/choldgraf/mne-sandbox/subscribers","subscription_url":"https://api.github.com/repos/choldgraf/mne-sandbox/subscription","commits_url":"https://api.github.com/repos/choldgraf/mne-sandbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/choldgraf/mne-sandbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/choldgraf/mne-sandbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/choldgraf/mne-sandbox/issues/comments{/number}","contents_url":"https://api.github.com/repos/choldgraf/mne-sandbox/contents/{+path}","compare_url":"https://api.github.com/repos/choldgraf/mne-sandbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/choldgraf/mne-sandbox/merges","archive_url":"https://api.github.com/repos/choldgraf/mne-sandbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/choldgraf/mne-sandbox/downloads","issues_url":"https://api.github.com/repos/choldgraf/mne-sandbox/issues{/number}","pulls_url":"https://api.github.com/repos/choldgraf/mne-sandbox/pulls{/number}","milestones_url":"https://api.github.com/repos/choldgraf/mne-sandbox/milestones{/number}","notifications_url":"https://api.github.com/repos/choldgraf/mne-sandbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/choldgraf/mne-sandbox/labels{/name}","releases_url":"https://api.github.com/repos/choldgraf/mne-sandbox/releases{/id}","deployments_url":"https://api.github.com/repos/choldgraf/mne-sandbox/deployments","created_at":"2016-04-12T21:48:53Z","updated_at":"2016-04-12T21:48:54Z","pushed_at":"2016-05-25T20:06:12Z","git_url":"git://github.com/choldgraf/mne-sandbox.git","ssh_url":"git@github.com:choldgraf/mne-sandbox.git","clone_url":"https://github.com/choldgraf/mne-sandbox.git","svn_url":"https://github.com/choldgraf/mne-sandbox","homepage":null,"size":60,"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":"91626fb23518be4262f6435836bed5c1512afcdc","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":53668965,"name":"mne-sandbox","full_name":"mne-tools/mne-sandbox","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-sandbox","description":"experimental mne-python code","fork":false,"url":"https://api.github.com/repos/mne-tools/mne-sandbox","forks_url":"https://api.github.com/repos/mne-tools/mne-sandbox/forks","keys_url":"https://api.github.com/repos/mne-tools/mne-sandbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mne-tools/mne-sandbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mne-tools/mne-sandbox/teams","hooks_url":"https://api.github.com/repos/mne-tools/mne-sandbox/hooks","issue_events_url":"https://api.github.com/repos/mne-tools/mne-sandbox/issues/events{/number}","events_url":"https://api.github.com/repos/mne-tools/mne-sandbox/events","assignees_url":"https://api.github.com/repos/mne-tools/mne-sandbox/assignees{/user}","branches_url":"https://api.github.com/repos/mne-tools/mne-sandbox/branches{/branch}","tags_url":"https://api.github.com/repos/mne-tools/mne-sandbox/tags","blobs_url":"https://api.github.com/repos/mne-tools/mne-sandbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mne-tools/mne-sandbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mne-tools/mne-sandbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/mne-tools/mne-sandbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mne-tools/mne-sandbox/statuses/{sha}","languages_url":"https://api.github.com/repos/mne-tools/mne-sandbox/languages","stargazers_url":"https://api.github.com/repos/mne-tools/mne-sandbox/stargazers","contributors_url":"https://api.github.com/repos/mne-tools/mne-sandbox/contributors","subscribers_url":"https://api.github.com/repos/mne-tools/mne-sandbox/subscribers","subscription_url":"https://api.github.com/repos/mne-tools/mne-sandbox/subscription","commits_url":"https://api.github.com/repos/mne-tools/mne-sandbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/mne-tools/mne-sandbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/mne-tools/mne-sandbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/mne-tools/mne-sandbox/issues/comments{/number}","contents_url":"https://api.github.com/repos/mne-tools/mne-sandbox/contents/{+path}","compare_url":"https://api.github.com/repos/mne-tools/mne-sandbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mne-tools/mne-sandbox/merges","archive_url":"https://api.github.com/repos/mne-tools/mne-sandbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mne-tools/mne-sandbox/downloads","issues_url":"https://api.github.com/repos/mne-tools/mne-sandbox/issues{/number}","pulls_url":"https://api.github.com/repos/mne-tools/mne-sandbox/pulls{/number}","milestones_url":"https://api.github.com/repos/mne-tools/mne-sandbox/milestones{/number}","notifications_url":"https://api.github.com/repos/mne-tools/mne-sandbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mne-tools/mne-sandbox/labels{/name}","releases_url":"https://api.github.com/repos/mne-tools/mne-sandbox/releases{/id}","deployments_url":"https://api.github.com/repos/mne-tools/mne-sandbox/deployments","created_at":"2016-03-11T13:30:09Z","updated_at":"2016-05-13T01:48:32Z","pushed_at":"2016-05-25T20:06:12Z","git_url":"git://github.com/mne-tools/mne-sandbox.git","ssh_url":"git@github.com:mne-tools/mne-sandbox.git","clone_url":"https://github.com/mne-tools/mne-sandbox.git","svn_url":"https://github.com/mne-tools/mne-sandbox","homepage":null,"size":153,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":6,"forks":8,"open_issues":6,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-sandbox/pulls/7"},"html":{"href":"https://github.com/mne-tools/mne-sandbox/pull/7"},"issue":{"href":"https://api.github.com/repos/mne-tools/mne-sandbox/issues/7"},"comments":{"href":"https://api.github.com/repos/mne-tools/mne-sandbox/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/mne-tools/mne-sandbox/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/mne-tools/mne-sandbox/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mne-tools/mne-sandbox/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/mne-tools/mne-sandbox/statuses/b445843ba54db68b59da26de8ed1a1921f019d04"}}}}
{"actor":{"display_login":"TomDLT"}}