ok, I changed the API and pushed the commits. The nested imports + tests
remain. It doesn't seem to matter whether you put rt_epochs.start() before
or after send_data(). I'm not sure why, but maybe @dengemann can explain
better. <https://github.com/dengemann>

On Wed, Jul 10, 2013 at 11:28 AM, Alexandre Gramfort <
notifications@github.com> wrote:

> In examples/realtime/compute_rt_decoder.py:
>
> > +buffer_size = 1000
> > +
> > +# start and stop times for iterating through buffers
> > +iter_times = zip(range(0, 50000, buffer_size),
> > +                 range(buffer_size + 1, 50000, buffer_size))
> > +
> > +# create the mock-client object
> > +rt_mock = MockRtClient(raw)
> > +
> > +# create the real-time epochs object
> > +rt_epochs = RtEpochs(rt_mock, event_id, tmin, tmax, total_trials,
> > +                     consume_epochs=False, picks=picks, decim=1,
> > +                     reject=dict(grad=4000e-13, eog=150e-6))
> > +
> > +# send raw buffers
> > +rt_mock.send_raw_buffers(rt_epochs, iter_times)
>
> can you detail the logic? To me the servers sends the data to connected
> clients. Then RtEpochs waits for databuffers and stalls until a new one
> comes. Shouldn't rt_epochs.start() be before the send_raw_buffers?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mne-tools/mne-python/pull/615/files#r5109974>
> .
>