{"action":"created","comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/77001129","id":77001129,"diff_hunk":"@@ -885,3 +886,349 @@ def concatenate_events(events, first_samps, last_samps):\n         events_out = np.concatenate((events_out, e2), axis=0)\n \n     return events_out\n+\n+\n+class ElektaAverager(object):\n+    \"\"\"Handles events and averaging categories defined in DACQ\n+    (data acquisition) software of Elekta TRIUX/Vectorview systems.\n+\n+    Parameters\n+    ----------\n+    info : Info\n+        An instance of Info where the DACQ parameters will be taken from.\n+\n+    Attributes\n+    ----------\n+    categories : list\n+        List of averaging categories marked active in DACQ.\n+    events : list\n+        List of events that are in use (referenced by some averaging category).\n+    reject : dict\n+        Rejection criteria from DACQ that can be used with mne.Epochs.\n+        Note that mne does not support all DACQ rejection criteria\n+        (e.g. spike, slope)\n+    flat : dict\n+        Flatness criteria from DACQ that can be used with mne.Epochs.\n+    \"\"\"\n+\n+    # averager related DACQ variable names (without preceding 'ERF')\n+    vars = ['magMax', 'magMin', 'magNoise', 'magSlope', 'magSpike', 'megMax',\n+            'megMin', 'megNoise', 'megSlope', 'megSpike', 'eegMax', 'eegMin',\n+            'eegNoise', 'eegSlope', 'eegSpike', 'eogMax', 'ecgMax', 'ncateg',\n+            'nevent', 'stimSource', 'triggerMap', 'update', 'version',\n+            'artefIgnore', 'averUpdate']\n+\n+    # event-related variables\n+    event_vars = ['Name', 'Channel', 'NewBits', 'OldBits', 'NewMask',\n+                  'OldMask', 'Delay', 'Comment']\n+\n+    # category-related variables\n+    cat_vars = ['Comment', 'Display', 'Start', 'State', 'End', 'Event',\n+                'Nave', 'ReqEvent', 'ReqWhen', 'ReqWithin',  'SubAve']\n+\n+    def __init__(self, info):\n+        acq_pars = info['acq_pars']\n+        if not acq_pars:\n+            raise ValueError('No acquisition parameters')\n+        self.acq_dict = _acqpars_dict(acq_pars)\n+        if 'ERFversion' not in self.acq_dict:\n+            raise ValueError('Cannot parse version. The file may be from'\n+                             'DACQ <3.4 which is not supported yet')\n+        # set instance variables\n+        for var in ElektaAverager.vars:\n+            val = self.acq_dict['ERF' + var]\n+            if var[:3] in ['mag', 'meg', 'eeg', 'eog', 'ecg']:\n+                val = float(val)\n+            elif var in ['ncateg', 'nevent']:\n+                val = int(val)\n+            setattr(self, var.lower(), val)\n+        self.stimsource = (\n+            'Internal' if self.stimsource == '1' else 'External')\n+        # collect all events and categories\n+        self._events = self._events_from_acq_pars()\n+        self._categories = self._categories_from_acq_pars()\n+        # mark events that are used by some category\n+        for cat in self._categories.values():\n+            if cat['event']:\n+                self._events[cat['event']]['in_use'] = True\n+            if cat['reqevent']:\n+                self._events[cat['reqevent']]['in_use'] = True\n+        # collect categories and events that are actually in use\n+        self._categories_in_use = (\n+            {k: v for k, v in self._categories.iteritems() if v['state']})\n+        self._events_in_use = (\n+            {k: v for k, v in self._events.iteritems() if v['in_use']})\n+        # make mne rejection dicts based on the averager parameters\n+        self.reject = {'grad': self.megmax, 'mag': self.magmax,\n+                       'eeg': self.eegmax, 'eog': self.eogmax,\n+                       'ecg': self.ecgmax}\n+        self.reject = {k: float(v) for k, v in self.reject.iteritems()\n+                       if float(v) > 0}\n+        self.flat = {'grad': self.megmin, 'mag': self.magmin,\n+                     'eeg': self.eegmin}\n+        self.flat = {k: float(v) for k, v in self.flat.iteritems()\n+                     if float(v) > 0}\n+\n+    def __repr__(self):\n+        s = '<ElektaAverager | '\n+        s += 'categories: %d ' % self.ncateg\n+        cats_in_use = len(self._categories_in_use)\n+        s += '(%d in use), ' % cats_in_use\n+        s += 'events: %d ' % self.nevent\n+        evs_in_use = len(self._events_in_use)\n+        s += '(%d in use), ' % evs_in_use\n+        s += 'stim source: %s' % self.stimsource\n+        s += '\\nCategories:\\n'\n+        for cat in self.categories:\n+            s += '%d: \"%s\"\\n' % (cat['index'], cat['comment'])\n+        s += '>'\n+        return s\n+\n+    def __getitem__(self, items):\n+        return self._categories[items]\n+\n+    def _events_from_acq_pars(self):\n+        \"\"\" Collect DACQ defined events into a dict. Events are keyed by number\n+        starting from 1 (DACQ index of event). Each event is itself represented\n+        by a dict containing the event definitions. \"\"\"\n+        events = {}\n+        for evnum in range(1, self.ncateg + 1):\n+            evnum_s = str(evnum).zfill(2)  # '01', '02' etc.\n+            evdi = {}\n+            for var in self.event_vars:\n+                # name of DACQ variable, e.g. 'ERFeventNewBits01'\n+                acq_key = 'ERFevent' + var + evnum_s\n+                # corresponding dict key, e.g. 'newbits'\n+                dict_key = var.lower()\n+                val = self.acq_dict[acq_key]\n+                # type convert numeric values\n+                if dict_key in ['newbits', 'oldbits', 'newmask', 'oldmask']:\n+                    val = int(val)\n+                elif dict_key in ['delay']:\n+                    val = float(val)\n+                evdi[dict_key] = val\n+                evdi['in_use'] = False  # __init__() will set this\n+            evdi['index'] = evnum\n+            events[evnum] = evdi\n+        return events\n+\n+    def _categories_from_acq_pars(self):\n+        \"\"\" Collects DACQ averaging categories into a dict. Categories\n+        are keyed by the comment defined in DACQ. Each category is represented\n+        a dict containing the category definitions. \"\"\"\n+        cats = {}\n+        for catnum in [str(x).zfill(2) for x in range(1, self.nevent + 1)]:\n+            catdi = {}\n+            # read all category variables\n+            for var in self.cat_vars:\n+                acq_key = 'ERFcat' + var + catnum\n+                class_key = var.lower()\n+                val = self.acq_dict[acq_key]\n+                catdi[class_key] = val\n+            # some type conversions\n+            catdi['display'] = True if catdi['display'] == '1' else False\n+            catdi['state'] = True if catdi['state'] == '1' else False\n+            for key in ['start', 'end', 'reqwithin']:\n+                catdi[key] = float(catdi[key])\n+            for key in ['nave', 'event', 'reqevent', 'reqwhen', 'subave']:\n+                catdi[key] = int(catdi[key])\n+            # some convenient extra (non-DACQ) vars\n+            catdi['index'] = int(catnum)  # index of category in DACQ list\n+            catdi['parent'] = self  # owning class instance\n+            cats[catdi['comment']] = catdi\n+        return cats\n+\n+    def _events_mne_to_dacq(self, mne_events):\n+        \"\"\" Creates list of DACQ events based on mne trigger transitions list.\n+        mne_events is typically given by mne.find_events (use consecutive=True\n+        to get all transitions). Output consists of rows in the form\n+        [t, 0, event_codes] where t is time in samples and event_codes is all\n+        DACQ events compatible with the transition, bitwise ORed together:\n+        e.g. [t1, 0, 5] means that events 1 and 3 occurred at time t1,\n+        as 2**(1 - 1) + 2**(3 - 1) = 5. \"\"\"\n+        events_ = mne_events.copy()\n+        events_[:, 1:3] = 0\n+        for n, ev in self._events.iteritems():\n+            if ev['in_use']:\n+                pre_ok = (\n+                    np.bitwise_and(ev['oldmask'],\n+                                   mne_events[:, 1]) == ev['oldbits'])\n+                post_ok = (\n+                    np.bitwise_and(ev['newbits'],\n+                                   mne_events[:, 2]) == ev['newbits'])\n+                ok_ind = np.where(pre_ok & post_ok)\n+                events_[ok_ind, 2] |= 1 << (n - 1)\n+        return events_\n+\n+    def _mne_events_to_category_t0(self, cat, mne_events, sfreq):\n+        \"\"\" Translate mne_events to reference times (t0) for epochs in a given\n+        DACQ averaging category cat. \"\"\"\n+        cat_ev = cat['event']\n+        cat_reqev = cat['reqevent']\n+        # first convert mne events to dacq event list\n+        events = self._events_mne_to_dacq(mne_events)\n+        # next, take req. events and delays into account\n+        times = events[:, 0]\n+        # indices of times where ref. event occurs\n+        refEvents_inds = np.where(events[:, 2] & (1 << cat_ev - 1))[0]\n+        refEvents_t = times[refEvents_inds]\n+        if cat_reqev:\n+            # indices of times where req. event occurs\n+            reqEvents_inds = np.where(events[:, 2] & (\n+                1 << cat_reqev - 1))[0]\n+            reqEvents_t = times[reqEvents_inds]\n+            # relative (to refevent) time window where req. event\n+            # must occur (e.g. [0 .2])\n+            twin = [0, (-1)**(cat['reqwhen']) * cat['reqwithin']]\n+            win = np.round(np.array(sorted(twin)) * sfreq)  # to samples\n+            refEvents_wins = refEvents_t[:, None] + win\n+            req_acc = np.zeros(refEvents_inds.shape, dtype=bool)\n+            for t in reqEvents_t:\n+                # mark time windows where req. condition is satisfied\n+                reqEvent_in_win = np.logical_and(\n+                    t >= refEvents_wins[:, 0], t <= refEvents_wins[:, 1])\n+                req_acc |= reqEvent_in_win\n+            # drop ref. events where req. event condition is not satisfied\n+            refEvents_inds = refEvents_inds[np.where(req_acc)]\n+            refEvents_t = times[refEvents_inds]\n+        # adjust for trigger-stimulus delay by delaying the ref. event\n+        refEvents_t += int(np.round(self._events[cat_ev]['delay'] * sfreq))\n+        return refEvents_t\n+\n+    @property\n+    def categories(self):\n+        \"\"\" Return list of averaging categories in DACQ defined order. Only\n+        returns categories marked active in DACQ. \"\"\"\n+        cats = sorted(self._categories_in_use.values(),\n+                      key=lambda cat: cat['index'])\n+        return cats\n+\n+    @property\n+    def events(self):\n+        \"\"\" Return events in DACQ defined order. Only returns events\n+        that are in use (referred to by a category). \"\"\"\n+        evs = sorted(self._events_in_use.values(),\n+                     key=lambda ev: ev['index'])\n+        return evs\n+\n+    @property\n+    def event_names(self):\n+        return [event['comment'] for event in self.events]\n+\n+    def get_epochs(self, raw, category, picks=None, reject=None, flat=None,\n+                   baseline=(None, 0), detrend=None, stim_channel=None,\n+                   mask=None, uint_cast=None, mask_type=None):\n+        \"\"\" Get an mne.Epochs instance corresponding to the given DACQ\n+        (data acquisition) category.\n+\n+        Parameters\n+        ----------\n+        raw : Raw object\n+            An instance of Raw.\n+        category : string | dict\n+            The category to use. Can be a name (e.g. 'my_category) or\n+            category dict  (e.g. eav['my_category'], where eav is an instance","path":"mne/event.py","position":253,"original_position":253,"commit_id":"f75dd93b5ee787fe5ea43d7e92c402774a351f81","original_commit_id":"f75dd93b5ee787fe5ea43d7e92c402774a351f81","user":{"login":"kingjr","id":4881164,"avatar_url":"https://avatars.githubusercontent.com/u/4881164?v=3","gravatar_id":"","url":"https://api.github.com/users/kingjr","html_url":"https://github.com/kingjr","followers_url":"https://api.github.com/users/kingjr/followers","following_url":"https://api.github.com/users/kingjr/following{/other_user}","gists_url":"https://api.github.com/users/kingjr/gists{/gist_id}","starred_url":"https://api.github.com/users/kingjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kingjr/subscriptions","organizations_url":"https://api.github.com/users/kingjr/orgs","repos_url":"https://api.github.com/users/kingjr/repos","events_url":"https://api.github.com/users/kingjr/events{/privacy}","received_events_url":"https://api.github.com/users/kingjr/received_events","type":"User","site_admin":false},"body":"double space","created_at":"2016-08-31T14:45:30Z","updated_at":"2016-08-31T14:45:30Z","html_url":"https://github.com/mne-tools/mne-python/pull/3205#discussion_r77001129","pull_request_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/3205","_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/77001129"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/3205#discussion_r77001129"},"pull_request":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/3205"}}},"pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/3205","id":68703940,"html_url":"https://github.com/mne-tools/mne-python/pull/3205","diff_url":"https://github.com/mne-tools/mne-python/pull/3205.diff","patch_url":"https://github.com/mne-tools/mne-python/pull/3205.patch","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3205","number":3205,"state":"open","locked":false,"title":"WIP: Elekta averager ","user":{"login":"jjnurminen","id":8491321,"avatar_url":"https://avatars.githubusercontent.com/u/8491321?v=3","gravatar_id":"","url":"https://api.github.com/users/jjnurminen","html_url":"https://github.com/jjnurminen","followers_url":"https://api.github.com/users/jjnurminen/followers","following_url":"https://api.github.com/users/jjnurminen/following{/other_user}","gists_url":"https://api.github.com/users/jjnurminen/gists{/gist_id}","starred_url":"https://api.github.com/users/jjnurminen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjnurminen/subscriptions","organizations_url":"https://api.github.com/users/jjnurminen/orgs","repos_url":"https://api.github.com/users/jjnurminen/repos","events_url":"https://api.github.com/users/jjnurminen/events{/privacy}","received_events_url":"https://api.github.com/users/jjnurminen/received_events","type":"User","site_admin":false},"body":"Discussed in #3097 \r\n\r\nSummary: Elekta/Neuromag DACQ (data acquisition) supports rather flexible event and \r\naveraging logic that is currently not implemented in mne-python. It also stores all averaging \r\nparameters in the fiff file, so raw data can be easily reaveraged in postprocessing.\r\nThe purpose of this PR is \r\n1) extract the relevant info from the fiff file \r\n2) implement support for averaging according to Elekta categories.\r\n\r\nImplementation: an Elekta_averager class that takes all the relevant info from \r\n`raw.info['acq_pars']`. Also classes for events and categories.\r\n\r\nAPI methods:\r\n\r\nget_epochs() gives mne.Epochs corresponding to a given DACQ category. \r\n\r\nrejection_dict() translates DACQ params to a reject dict that can be used with mne.Epochs\r\n\r\nTechnical details: DACQ supports defining 32 different events which correspond to trigger \r\ntransitions. Events support pre- and post-transition bit masking. Based on the events, 32 averaging categories can be defined. Each category defines a reference event that is the zero-time point for collecting the corresponding epochs. Epoch length is defined by the start and end times (given relative to the reference event). A conditional ('required') event is also supported; if defined, it must appear in a specified time window (before or after the reference event) for the epoch to be valid.\r\n\r\nTODO:\r\n\r\n- examples\r\n- unit test\r\n- support for DACQ < 3.4?\r\n","created_at":"2016-05-03T13:18:42Z","updated_at":"2016-08-31T14:45:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1258a6a4f20444c6411890551cc72dea94a6c16a","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/mne-tools/mne-python/milestones/9","html_url":"https://github.com/mne-tools/mne-python/milestones/0.13","labels_url":"https://api.github.com/repos/mne-tools/mne-python/milestones/9/labels","id":1648503,"number":9,"title":"0.13","description":"","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":33,"closed_issues":91,"state":"open","created_at":"2016-03-16T17:14:08Z","updated_at":"2016-08-31T13:52:01Z","due_on":"2016-09-23T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/3205/commits","review_comments_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/3205/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/3205/comments","statuses_url":"https://api.github.com/repos/mne-tools/mne-python/statuses/f75dd93b5ee787fe5ea43d7e92c402774a351f81","head":{"label":"jjnurminen:elekta_avg","ref":"elekta_avg","sha":"f75dd93b5ee787fe5ea43d7e92c402774a351f81","user":{"login":"jjnurminen","id":8491321,"avatar_url":"https://avatars.githubusercontent.com/u/8491321?v=3","gravatar_id":"","url":"https://api.github.com/users/jjnurminen","html_url":"https://github.com/jjnurminen","followers_url":"https://api.github.com/users/jjnurminen/followers","following_url":"https://api.github.com/users/jjnurminen/following{/other_user}","gists_url":"https://api.github.com/users/jjnurminen/gists{/gist_id}","starred_url":"https://api.github.com/users/jjnurminen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjnurminen/subscriptions","organizations_url":"https://api.github.com/users/jjnurminen/orgs","repos_url":"https://api.github.com/users/jjnurminen/repos","events_url":"https://api.github.com/users/jjnurminen/events{/privacy}","received_events_url":"https://api.github.com/users/jjnurminen/received_events","type":"User","site_admin":false},"repo":{"id":55834470,"name":"mne-python","full_name":"jjnurminen/mne-python","owner":{"login":"jjnurminen","id":8491321,"avatar_url":"https://avatars.githubusercontent.com/u/8491321?v=3","gravatar_id":"","url":"https://api.github.com/users/jjnurminen","html_url":"https://github.com/jjnurminen","followers_url":"https://api.github.com/users/jjnurminen/followers","following_url":"https://api.github.com/users/jjnurminen/following{/other_user}","gists_url":"https://api.github.com/users/jjnurminen/gists{/gist_id}","starred_url":"https://api.github.com/users/jjnurminen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjnurminen/subscriptions","organizations_url":"https://api.github.com/users/jjnurminen/orgs","repos_url":"https://api.github.com/users/jjnurminen/repos","events_url":"https://api.github.com/users/jjnurminen/events{/privacy}","received_events_url":"https://api.github.com/users/jjnurminen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jjnurminen/mne-python","description":"MNE : Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python","fork":true,"url":"https://api.github.com/repos/jjnurminen/mne-python","forks_url":"https://api.github.com/repos/jjnurminen/mne-python/forks","keys_url":"https://api.github.com/repos/jjnurminen/mne-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jjnurminen/mne-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jjnurminen/mne-python/teams","hooks_url":"https://api.github.com/repos/jjnurminen/mne-python/hooks","issue_events_url":"https://api.github.com/repos/jjnurminen/mne-python/issues/events{/number}","events_url":"https://api.github.com/repos/jjnurminen/mne-python/events","assignees_url":"https://api.github.com/repos/jjnurminen/mne-python/assignees{/user}","branches_url":"https://api.github.com/repos/jjnurminen/mne-python/branches{/branch}","tags_url":"https://api.github.com/repos/jjnurminen/mne-python/tags","blobs_url":"https://api.github.com/repos/jjnurminen/mne-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jjnurminen/mne-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jjnurminen/mne-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/jjnurminen/mne-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jjnurminen/mne-python/statuses/{sha}","languages_url":"https://api.github.com/repos/jjnurminen/mne-python/languages","stargazers_url":"https://api.github.com/repos/jjnurminen/mne-python/stargazers","contributors_url":"https://api.github.com/repos/jjnurminen/mne-python/contributors","subscribers_url":"https://api.github.com/repos/jjnurminen/mne-python/subscribers","subscription_url":"https://api.github.com/repos/jjnurminen/mne-python/subscription","commits_url":"https://api.github.com/repos/jjnurminen/mne-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/jjnurminen/mne-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/jjnurminen/mne-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/jjnurminen/mne-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/jjnurminen/mne-python/contents/{+path}","compare_url":"https://api.github.com/repos/jjnurminen/mne-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jjnurminen/mne-python/merges","archive_url":"https://api.github.com/repos/jjnurminen/mne-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jjnurminen/mne-python/downloads","issues_url":"https://api.github.com/repos/jjnurminen/mne-python/issues{/number}","pulls_url":"https://api.github.com/repos/jjnurminen/mne-python/pulls{/number}","milestones_url":"https://api.github.com/repos/jjnurminen/mne-python/milestones{/number}","notifications_url":"https://api.github.com/repos/jjnurminen/mne-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jjnurminen/mne-python/labels{/name}","releases_url":"https://api.github.com/repos/jjnurminen/mne-python/releases{/id}","deployments_url":"https://api.github.com/repos/jjnurminen/mne-python/deployments","created_at":"2016-04-09T08:48:30Z","updated_at":"2016-04-09T08:48:34Z","pushed_at":"2016-08-31T14:06:17Z","git_url":"git://github.com/jjnurminen/mne-python.git","ssh_url":"git@github.com:jjnurminen/mne-python.git","clone_url":"https://github.com/jjnurminen/mne-python.git","svn_url":"https://github.com/jjnurminen/mne-python","homepage":"http://martinos.org/mne/","size":88654,"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":"1c11647a74fb604b6783dd92d89872c63c738348","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}","deployments_url":"https://api.github.com/repos/mne-tools/mne-python/deployments","created_at":"2011-01-28T03:31:13Z","updated_at":"2016-08-23T16:25:07Z","pushed_at":"2016-08-31T14:06:17Z","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":181164,"stargazers_count":224,"watchers_count":224,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":214,"mirror_url":null,"open_issues_count":196,"forks":214,"open_issues":196,"watchers":224,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/3205"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/3205"},"issue":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/3205"},"comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/3205/comments"},"review_comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/3205/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/3205/commits"},"statuses":{"href":"https://api.github.com/repos/mne-tools/mne-python/statuses/f75dd93b5ee787fe5ea43d7e92c402774a351f81"}}}}
{"actor":{"display_login":"kingjr"}}