{"action":"created","issue":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/3205","repository_url":"https://api.github.com/repos/mne-tools/mne-python","labels_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3205/labels{/name}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3205/comments","events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3205/events","html_url":"https://github.com/mne-tools/mne-python/pull/3205","id":152771205,"number":3205,"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},"labels":[],"state":"open","locked":false,"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},"comments":80,"created_at":"2016-05-03T13:18:42Z","updated_at":"2016-08-31T14:21:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/3205","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"},"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"},"comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments/243779799","html_url":"https://github.com/mne-tools/mne-python/pull/3205#issuecomment-243779799","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3205","id":243779799,"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},"created_at":"2016-08-31T14:21:57Z","updated_at":"2016-08-31T14:21:57Z","body":"I'm basically ok with the code now, so enthusiastic reviewers can weigh in.\r\n"}}
{"actor":{"display_login":"jjnurminen"}}