New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Epoch concatenation #120
Comments
I agree with all what you said. Basically you have 3 options:
wdyt? |
I like options 1 and 2 potentially better than option 3 (new object), because part of the motivation behind this is to continue to have access to all enhancements brought to the Epochs objects. That is, unless the new object (MultiEpochs or whatever) would inherit the Epochs class and just overload the average() and get_data() functions (and in this sense, be transparent to the user as otherwise being of the Epochs class)? |
yes that would work. I'd say I'd have to try to implement it and use do not hesitate to give it a try as you clearly understood the |
I'll probably give the overloading a shot first, as this should be the easiest way not to require people to preload all their data. |
+1 for this. 2012/9/26 Eric89GXL notifications@github.com
|
Well, I just spent an embarrassing amount of time on this today to figure out that there's a problem with creating a new class (e.g., MultiClass) that inherits and extends the Epoch class. We'd either need to use a bunch of deepcopy()'s, or warn users against using it in certain ways. In any case, I think it'll be cleaner to refactor the current Epochs class to use either 1) one raw input and one list of events (current behavior), or 2) a list of raws with a list of events (extended, new behavior). This will not only be easier to use than making a new class, but it easily retains backward compatibility, makes for a natural extension with a concatenate() call, and doesn't require people learning a new class. I'm going to work on that tomorrow. |
On 27.09.2012, at 01:31, Eric89GXL notifications@github.com wrote:
Ok, this does not sound ideal.. :-(
Sounds very good to me. And certainly getting into mixing classes and deepcopying nested structures is not exactly desirable.. (at least i don't like it)
|
that's what I was afraid of.
sounds very reasonable and cleaner. What I've been willing to do too is to A |
On 27.09.2012, at 09:24, Alexandre Gramfort notifications@github.com wrote:
... so one could search through all of them for events and instantiate an epochs object with more or less the existing code... Bu how would the raw object then look like, e.g. The info structure?
|
the info should be exactly the same. That's valid if it's actually the same run. |
Then maybe this should be the way to go. Maybe other use cases will emerge and then we're best off with a Raw object that handles multiple fif files if desired. On 27.09.2012, at 09:51, Alexandre Gramfort notifications@github.com wrote:
|
I think we need both as the multiple fif input to raw should assume |
Let me know if this is implemented and I already missed it, but I'd like to implement a method for concatenating Epoch objects. We typically use 6-9 runs for our experiments, and it's useful to be able to treat these as being equal at some point. To concatenate epochs, I think all I'd need to do is check to make sure these properties were equal across epochs before concatenating data:
If any of these were not equal across epoch objects, an error would be thrown stating that only objects with equivalent values could be concatenated.
Then the following would need to be concatenated appropriately:
One tricky part is what to do with data preloading. An easy (lazy) solution is to require preloading, so that the above concatenation of _data will work. The other option is to implement multiple-source-file support in _get_data_from_disk(), but maybe as a first pass this could be disabled and left to a future improvement?
The text was updated successfully, but these errors were encountered: