{"action":"created","issue":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/2408","labels_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2408/labels{/name}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2408/comments","events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2408/events","html_url":"https://github.com/mne-tools/mne-python/issues/2408","id":101272476,"number":2408,"title":"BUG? Time after decimation & EpochsArray","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},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-16T14:52:23Z","updated_at":"2015-08-16T19:05:15Z","closed_at":"2015-08-16T16:05:32Z","body":"@Eric89GXL Decimating epochs and recreating new epochs with `EpochsArray`, don't generate identical `times`.\r\n\r\n```\r\n# prepare\r\nimport numpy as np\r\nfrom mne.io.meas_info import create_info\r\nfrom mne.epochs import EpochsArray\r\nsfreq = 250\r\nn_trial, n_chans, n_time = 100, 32, 63\r\ndata = np.random.randn(n_trial, n_chans, n_time)\r\nchan_names = ['eeg' + str(ii) for ii in range(32)]\r\nchan_types = ['eeg' for ii in range(32)]\r\ninfo = create_info(chan_names, sfreq, chan_types)\r\nevents = np.c_[np.cumsum(np.ones(n_trial)) * 5 * sfreq,\r\n               np.zeros(n_trial), np.zeros(n_trial)]\r\nepochs = EpochsArray(data, info, events=events, verbose=False)\r\n```\r\n```\r\nepochs.decimate(3)\r\nprint([epochs.times[ii] for ii in [0, 1, -1]])\r\n# different from\r\nepochs = EpochsArray(epochs._data, epochs.info, events=events, verbose=False)\r\nprint([epochs.times[ii] for ii in [0, 1, -1]])\r\n```\r\n\r\ngives\r\n\r\n```\r\n[0.0, 0.012, 0.23999999999999999]\r\n[0.0, 0.012, 0.24000000000000002]\r\n```"},"comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments/131603526","html_url":"https://github.com/mne-tools/mne-python/issues/2408#issuecomment-131603526","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2408","id":131603526,"user":{"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},"created_at":"2015-08-16T19:05:15Z","updated_at":"2015-08-16T19:05:15Z","body":"Yeah, decimation will keep the point `t=0` @ 0"}}