-
Notifications
You must be signed in to change notification settings - Fork 21
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
[Bug]: ROI extractor returns error "tuple index out of range" #1109
Comments
It seems that the trace for that example does not have two dimensions, maybe only one roi? I think that @weiglszonja is the one that worked with that code base, could you take a look? |
That would be my first guess too. @laurelrr can you check the shape of the traces in the extractor? from tye_lab_to_nwb.ast_ophys.extractors.cnmfe_matlab_segmentationextractor import CnmfeMatlabSegmentationExtractor
extractor = CnmfeMatlabSegmentationExtractor(file_path="path/to/problematic_file.mat")
# Check the original trace shape, should be [num_rois x num_frames]
print(extractor._dataset_file["C"].shape)
print(len(extractor._dataset_file["C"].shape)) If this returns a one dimensional array then we have to fix the code in the custom extractor . Let me know if this is the case and I'll help to fix it. |
I ran into the same error at the extractor line:
Not sure if this is helpful or not but I loaded the file into Matlab and here is what is in it:
|
Thank you @laurelrr, this is helpful indeed. I opened catalystneuro/tye-lab-to-nwb#57 to fix this, can you check if this works for your data? Feel free to comment on the pull request if you have any questions. I can also test it if you share this file with me. |
What happened?
I am working with this code base to convert 6 subjects:
https://github.com/catalystneuro/tye-lab-to-nwb/tree/main/src/tye_lab_to_nwb/ast_ophys
I created individual convert_session.py files for each subject. Three of them are working correctly and convert my data as expected.
However, one subject returned an error, and I am not sure what to look for in my data in order to correct it.
Steps to Reproduce
Traceback
Operating System
Linux
Python Executable
Conda
Python Version
3.8
Package Versions
environment_for_issue.txt
Code of Conduct
The text was updated successfully, but these errors were encountered: