Skip to content
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

pandas #69

Open
annapasca opened this issue Nov 6, 2018 · 6 comments
Open

pandas #69

annapasca opened this issue Nov 6, 2018 · 6 comments

Comments

@annapasca
Copy link
Contributor

We use pandas in prepare_data and in _split_txt.

It seems the function format_electrodes_xls is not used. @davidmeunier79 can we remove it?

On the other side _split_txt is used by ImportBrainVisionAscii.

Is there a way to use numpy and not pandas to leave ephypype independent by pandas?

@davidmeunier79
Copy link
Contributor

format_electrodes_xls is just a specific example from an Excel file, maybe it is better to be removed. The version ImportBrainVisaAscii could be removed as well, but if we want the package to handle multiples modalities, it may be good to have as much import format as possible, thus implying multiple packages. Having said that, this particular fuction requires the user to use export ascii frile from BrainVision, there are other ways to handle BrainVision data, possibly with numpy but evn better would be with neo (hence another optional package). What about make a test if the package is installed to allow the use of particular optional function?

@jasmainak
Copy link
Contributor

+1 to remove any code that is not used.

@annapasca @davidmeunier79 you have to explain to me why you need different nodes for different files. In MNE, you should be able to import brainvision to raw object. Why do you need another class/function for that?

@davidmeunier79
Copy link
Contributor

davidmeunier79 commented Nov 6, 2018

@jasmainak unfortunately life is not that simple. BrainVision is full of bugs, and when I had to interfere with it, and the export of BrainVision would be quite different depending on what you would have to export (type of EEG signal and intraEEG for example) and on what kind of analysis (windows segmenting, artefact removal, etc.). So I am not sure what you mean by "raw object", but it appeared to be easier in many cases to export it as ASCII. Having said that it has been a while since I touched it ...

@jasmainak
Copy link
Contributor

this is an MNE raw object: https://martinos.org/mne/dev/generated/mne.io.Raw.html. It's basically how you represent the multivariate time series in MNE along with the metadata.

Here is the reader for brainvision in MNE: https://www.martinos.org/mne/stable/generated/mne.io.read_raw_brainvision.html.

If there are bugs there, they should be fixed via pull requests instead of reinventing the wheel ...

@davidmeunier79
Copy link
Contributor

davidmeunier79 commented Nov 6, 2018

we are talking about a piece of code that was written 2 years ago:
https://github.com/davidmeunier79/neuropype_ephy/commits/master/neuropype_ephy/nodes/import_data.py
I am not even sure the read_raw_brainvision of MNE-python was developed at the time (see history).
if you feel like rewriting these functions in the new framework, you are welcome

@jasmainak
Copy link
Contributor

The brainvision reader is from 2013. See here: mne-tools/mne-python#878.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants