[pymvpa] eventrelated_dataset bug

Jörg Stadler Stadler at ifn-magdeburg.de
Fri Jun 22 11:14:15 UTC 2012

my problem is, that I am not able to get an eventrelated_dataset from my
full dataset. The wizzard claim for more volumes in my dataset than

My solution was to skip the last event. So the last event start
convolved with the box is shorter than the number of volumes.


> Hey,
> On Thu, Jun 21, 2012 at 08:52:32AM +0200, Jörg Stadler wrote:
>> I tried to create a eventrelated dataset from my experiment with
>> different block durations and run into a problem.
>> ds = dataset_wizard(np.ones((5,1)))
>> t=[1,2,2,3,4]
>> c=[1,1,1,1,1]
>> events=find_events(targets=t, chunks=c)
>> ev=eventrelated_dataset(ds,events=events)
>> will cause an error:
>> ValueError: Illegal box (start: 4, offset: 0, length: 2) with total
>> input sample being 5.
>> The boxlength is always the maximum value of all event blocks.
> The boxlength is always set to the max, because all samples go into a
> single matrix and there need to have identical shape.
> You can work around that with more complicated array (object-type), but
> dataset_wizard doesn't do that for you.
> Or am I not getting the problem?
> Cheers,
> Michael

More information about the Pkg-ExpPsy-PyMVPA mailing list