Use pad_start and pad_stop in find_events
As find_events function uses the _find_stim_steps under the hood:
https://github.com/mne-tools/mne-python/blob/06afcc8166f9304d25a72ab159e954542f0cc177/mne/event.py#L447
I believe it should be interesting to use these two arguments as well. I recently started using the EEG Motor Movement/Imagery Dataset and they also have events to rest state, so their events are as follows:

As you can see, the events already start at a non-zero number, because the event 1 is the rest state. With the current find_events function, this first event will be skipped as the current behavior is to only use pad_stop. I believe setting pad_start=0 as default won't affect much, as in the vast majority of datasets, events start at 0.
My suggestions are:
- adding these two arguments (
pad_startandpad_stop) to thefind_eventsfunction - setting
pad_start=0as default behavior
If this new behavior is ok I can open a PR.
Can you see if #4756 (in latest master) fixes the first sample behavior?
will check that
>>> raw = mne.io.read_raw_edf(fpath, preload=True)
Extracting edf Parameters from /../eegmmidb/S001/S001R06.edf...
EDF file detected
Setting channel info structure...
Created Raw.info structure...
Reading 0 ... 19999 = 0.000 ... 124.994 secs...
Ready.
>>> events = find_events(raw, initia_event=False)
Trigger channel has a non-zero initial value of 1 (consider using initial_event=True to detect this event)
Removing orphaned offset at the beginning of the file.
29 events found
Event IDs: [1 2 3]
>>> events = find_events(raw, initia_event=True)
30 events found
Event IDs: [1 2 3]
(30, 3)
Works as expected @larsoner . Thanks.
Is this supposed to work in 0.16?
Is this supposed to work in 0.16?
Yes once it is released it should work in 0.16