Repository navigation
Conversation
|
See also discussion in #1930 |
|
I'd argue not to replace the existing @christianbrodbeck |
|
@teonbrooks already implemented something similar in our mne-bids repo. |
| from .eeglab import read_raw_eeglab | ||
|
|
||
|
|
||
| def read_raw(input_fname, **kwargs): |
There was a problem hiding this comment.
then how do you find out what parameters to pass? I find it clearer to be explicit by using the proper dedicated function
|
I think that there may be some value in exploring a generic just my 2c |
The irony! :) |
|
Yes, I agree. If we just pass |
|
I think I agree with @teonbrooks - if the args of the different readers are 95% the same, so that a generic wrapper would have 95% of the docstring for the specific functions, we could probably have a tiny bit of **kwargs at the end. We are, after all, doing this with montages already. |
| elif ext == '.data': | ||
| return read_raw_nicolet(input_fname, **kwargs) | ||
| elif ext == '.set': | ||
| return read_raw_eeglab(input_fname, **kwargs) |
There was a problem hiding this comment.
In principle, I'd use a dict for this.
|
I am still -1
it means testing twice many IO things. But I would be ok to have a private
helper if you need it in your GUI code.
|
|
I agree, this is probably not such a great idea. The GUI will abstract this away anyway, so there's no need for a (private) helper. |
Would it be useful to have a wrapper
read_rawfunction that calls specific readers based on the file extensions?