Event-related averaging using nitime (or pymvpa)


I’m trying to do something which should be quite simple - creating event-related averaging of a time-series - but having a hard time figuring out how to do it. I know I could easily implement it without using neuroimaging packages, but prefer to try and use them to start familiarising myself with them.

One option that seemed well suited for this is to use nitime. I found two examples of averaging, here:
and here:
The first example uses csv2rec which seems to be deprecated and the second seems to have a single event type. Does anyone perhaps have an example of code that initializes an Events class with multiple conditions and uses that as input for EventRelatedAnalyzer? I tried looking at the API, but am not really sure what the inputs are supposed to look like, especially if I want to provide labels for the events.

Another option seemed to be to use PyMVPA:
but the example uses the eventrelated_dataset() which is deprecated. Maybe extract_boxcar_event_samples() could be used instead, but I’m not sure.

In short - if anyone has suggestions / sample code / links to tutorials that would be great.