Dear all,<div><br></div><div>I have had a strange problem building a simple eventrelated_dataset. I've loaded my dataset and then I've tried to build up an event related one.</div><div><br></div><div>>> events =  find_events(chunks = ds.sa.chunks, targets = ds.sa.targets)</div>
<div>>> evds = eventrelated_dataset(ds, events=events)</div><div><br></div><div>ValueError: Illegal box (start: 656, offset: 0, length: 7) with total input sample being 660.</div><div><br></div><div>but the last events are:</div>
<div><br></div><div><div> {'chunks': 5.0, 'duration': 7, 'onset': 638, 'targets': 'condition1'},</div><div> {'chunks': 5.0, 'duration': 4, 'onset': 645, 'targets': 'fixation'},</div>
<div> {'chunks': 5.0, 'duration': 7, 'onset': 649, 'targets': 'condition2'},</div><div> {'chunks': 5.0, 'duration': 4, 'onset': 656, 'targets': 'fixation'}</div>
</div><div><br></div><div>Trying to build the dataset with events[:-1] it works, so it is indipendent from the durations, I mean that the events duration could be not equal.</div><div><br></div><div>Thank you</div><div>Roberto</div>
<div><br></div>