{"action":"created","issue":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/5191","repository_url":"https://api.github.com/repos/mne-tools/mne-python","labels_url":"https://api.github.com/repos/mne-tools/mne-python/issues/5191/labels{/name}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/5191/comments","events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/5191/events","html_url":"https://github.com/mne-tools/mne-python/issues/5191","id":320721939,"number":5191,"title":"Saving RtEpochs","user":{"login":"hekolk","id":9091941,"avatar_url":"https://avatars2.githubusercontent.com/u/9091941?v=4","gravatar_id":"","url":"https://api.github.com/users/hekolk","html_url":"https://github.com/hekolk","followers_url":"https://api.github.com/users/hekolk/followers","following_url":"https://api.github.com/users/hekolk/following{/other_user}","gists_url":"https://api.github.com/users/hekolk/gists{/gist_id}","starred_url":"https://api.github.com/users/hekolk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hekolk/subscriptions","organizations_url":"https://api.github.com/users/hekolk/orgs","repos_url":"https://api.github.com/users/hekolk/repos","events_url":"https://api.github.com/users/hekolk/events{/privacy}","received_events_url":"https://api.github.com/users/hekolk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-07T08:42:03Z","updated_at":"2018-05-07T23:47:33Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"TL;DR RtEpochs do not support all of the inherited ``BaseEpochs`` methods. It would be nice to have an efficient conversion-method to an ``EpochsArray``.\r\n\r\nWhile ``RtEpochs`` are useful for gathering and processing individual  epochs, it would be helpful to be able to make them completely compatible with an \"offline\" ``Epochs`` object. For example,   currently it is not possible to save a ``RtEpochs`` object due to  (at least) the following issues:\r\n     - missing parameters (``out`` and ``verbose``) in ``_get_data``\r\n     - ``drop_log`` is missing or incorrect\r\n     \r\nAs a workaround, I exported the data to an EpochsArray [1], but noticed that data needs to be copied multiple times:\r\n  1. a single numpy array into which all ``_epoch_queue`` items are copied\r\n  2. the Epochs constructor again copies the data in its call to ``decimate`` (which does not make sense to me anyway, since I would expect a ``decimate(1)`` call to not have any side-effects)\r\n\r\nHaving three (temporary) copies of the epochs of a full experiment in memory leads frequently to out-of-memory situations on typical workstations.\r\n\r\nI would propose to \r\n  - remove the mandatory call to ``decimate`` or omit the copying when creating data from an existing array (although there is probably a reason the call is currently implemented?)\r\n  - either ensure that ``RtEpochs`` *is a* ``BaseEpochs`` object supporting all the methods or alternatively provide a conversion method to an ``EpochsArray`` etc.\r\n\r\nIt would be great to hear your thoughts on this. I'm willing to contribute."},"comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments/387240390","html_url":"https://github.com/mne-tools/mne-python/issues/5191#issuecomment-387240390","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/5191","id":387240390,"user":{"login":"jasmainak","id":15852194,"avatar_url":"https://avatars3.githubusercontent.com/u/15852194?v=4","gravatar_id":"","url":"https://api.github.com/users/jasmainak","html_url":"https://github.com/jasmainak","followers_url":"https://api.github.com/users/jasmainak/followers","following_url":"https://api.github.com/users/jasmainak/following{/other_user}","gists_url":"https://api.github.com/users/jasmainak/gists{/gist_id}","starred_url":"https://api.github.com/users/jasmainak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasmainak/subscriptions","organizations_url":"https://api.github.com/users/jasmainak/orgs","repos_url":"https://api.github.com/users/jasmainak/repos","events_url":"https://api.github.com/users/jasmainak/events{/privacy}","received_events_url":"https://api.github.com/users/jasmainak/received_events","type":"User","site_admin":false},"created_at":"2018-05-07T23:47:33Z","updated_at":"2018-05-07T23:47:33Z","author_association":"MEMBER","body":"+1 for fixes to `RtEpochs` and would love to see a PR. "}}
{"actor":{"display_login":"jasmainak"}}