-
Notifications
You must be signed in to change notification settings - Fork 7
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
ENH: Modify XML.from_file or other method to return category names #6
Comments
Per the e-mail from @pmolfese this morning, our goal here is to enhance |
@dhorkin - amending my statement above. I'm wondering if between the email @pmolfese sent and his description above, if we shouldn't expand It appears that the |
Having it in Reader directly would be better. I think the shortest path to most workflows is: 1) open file, 2) see what type of file it is (avg, continuous, epoched), 3) if avg/epoched, get category names, 4) get data for each category if asked - if epoched that would mean a multi-argument function with either epoch number, or epoch count + category name. |
@pmolfese - I have a potential start to this functionality committed up to the "category_list_fix6" branch. We'll be testing on our end, but if you want to give it a shot - you can let me know to what degree I have correctly interpreted your desired functionality. :) |
@ephathaway - how about you, @dhorkin and I toss some ideas around on how to test this feature in practice so the branch isn't floating out in the ether for too long. |
This is still on my list... this week is fairly condensed but happy to chime in soon. |
It's close... I'm not sure I get the entirety of the logic but building it into Reader makes sense. I want to do this:
And get the name of each epoch from the categories segmentation. |
Hi @pmolfese, my apologies that this issue has fallen through the cracks. We have had some shifting of responsibilities for the maintainers of this repository. We are still interested in getting this feature implemented and wanted to reach out to see if your use case is still the same. If I am understanding correctly, you would like the |
Yes. I could see two use cases - when data is averaged it would be nice to have it print names, but also retrieve epochs specific to the condition (weather data is averaged or not). We can do this in MNE:
We also have the ability to do things like: I could also see use cases for getting epochs by number. So fetch the first epoch or the first 10 epochs, etc. |
Being able to index epochs by condition for both segmented and averaged MFFs would be very useful. We will need to figure out a way to determine whether an MFF file is segmented or averaged. This info is contained in the Side note: I am actually working on adding read capability for averaged MFF files to MNE and I use mffpy as a dependency. Implementing indexing epochs by condition for averaged files would make this a lot easier. |
Glad to help! I'll go on a limb and say that I think MNE is the a good standard to try to emulate when necessary, but also of course importing mffpy into MNE to get the functionality would be great. Just within that (and this is probably a separate issue): read continuous, read segmented, read averaged, show history, etc would all be super useful. |
For sure. The ultimate goal is to be able to read and write all different flavors of MFF. Here is a link to the issue if you are interested. As far as getting categories into the |
@pmolfese I submitted a PR #33 to address this issue. I got around determining whether the MFF file is segmented or averaged by populating the Let me know if this satisfies your requirements. |
XML.from_file is limited use, can check for a category, exists with limited information. Need the following abilities:
Get list of all categories and print them:
cats = XML.from_file(myfile.xml) for aCat in cats: print(aCat)
get specific category via reader:
myFile = mffpy.Reader(someEEG.mff)
print(myFile.categories)
aCategoryOfInterest = myFile.categories[0]
The text was updated successfully, but these errors were encountered: