Implement trials
It's common practice to perform some sort of averaging across or within trials. The concept of trials could be implemented with a dictionary of EpochArray's demarcating the trial boundaries?
I agree that we need trials, but not that they should go in a dictionary. Trials should be smarter than that. We need to come up with a custom container, in my opinion. We can't easily get a subset of trials if it's a dictionary, or total time spent across trials, or whatever else.
I haven't thought about what trial-people want carefully enough, so would definitely welcome lots of discussion. But I feel strongly about it needing to be some kind of custom-built glue or container.
We can already (albeit hackily) have trial demarcations simply in an epoch array, with which we can then at least do something like
for tt, trial in enumerate(trial_epochs):
print('this is trial number {}'.format(tt))
do_func(asa[trial])
whereas this would be much less readable if we had used a dictionary, which also doesn't store trial order.
Is there an elaboration on how this would work? I'd like to work on this one
I think the idea is that a Trial would inherit from EpochArray but add some sort of metadata so that trials with different characteristics. How would having a Trial structure help you? Is there a particular use case?
Yes, my epoch has different trials A to B to C walks that I want to be able to differentiate among as A to B & B to C. These have some blackout period in between which I need to get rid off too. I thought the trial structure would help, else I'll maybe have to create an EpochArray for each of those segments