-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add CellExplorerRecordingInterface #465
Conversation
Weird, since that's the same one used in the tests: https://github.com/catalystneuro/neuroconv/blob/main/tests/test_on_data/test_recording_interfaces.py#L93C15-L93C15 Pinging @h-mayorquin since he put that interface together |
@h-mayorquin any ideas on this one? |
It seems like a scipy version thing? Which environment is used to run those tests? |
@h-mayorquin It varies by platform, for the most part is the same as NeuroConv, but in this case I assume it's the one from the following config file https://github.com/NeurodataWithoutBorders/nwb-guide/blob/main/environments/environment-MAC.yml |
I encountered this error locally. It seems to be a datalad / gin related thing. I just re-installed the gin data and it went away. If you are using a similar structure for the tests as the ones in neuroconv I suggesty you renew your data from datalad. Following the instructions from the neuroconv documentation failed so I had to sort of do it manually: (base) @h-laptop$ rm -rf ephy_testing_data/
(base) @h-laptop$ ls
behavior_testing_data ophys_testing_data
(base) @h-laptop$ datalad clone https://gin.g-node.org/NeuralEnsemble/ephy_testing_data ephy_testing_data
CommandError: 'git -c diff.ignoreSubmodules=none cat-file blob git-annex:remote.log' failed with exitcode 128 under /home/heberto/neuroconv_testing_data/ephy_testing_data
fatal: path 'remote.log' does not exist in 'git-annex'
(base) @h-laptop$ cd ephy_testing_data/
(base) @h-laptop$ datalad get . |
@CodyCBakerPhD Just tested this and updating with datalad allows me to move forward. Looks like this'll be good then! |
This PR attempts to add the CellExplorerRecordingInterface. However, an error on the standard test files blocks us from going further than the Source Data page:
Full Error
[main-process]: [2023-10-17 14:30:42,691] ERROR in app: Exception on /neuroconv/metadata [POST]
Traceback (most recent call last):
File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/flask_restx/api.py", line 404, in wrapper
resp = resource(*args, **kwargs)
File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/flask/views.py", line 109, in view
return current_app.ensure_sync(self.dispatch_request)(**kwargs)
File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/flask_restx/resource.py", line 46, in dispatch_request
resp = meth(*args, **kwargs)
File "/Users/garrettflynn/Documents/Github/nwb-guide/pyflask/apis/neuroconv.py", line 77, in post
return get_metadata_schema(neuroconv_api.payload.get("source_data"), neuroconv_api.payload.get("interfaces"))
File "/Users/garrettflynn/Documents/Github/nwb-guide/pyflask/manageNeuroconv/manage_neuroconv.py", line 205, in get_metadata_schema
converter = instantiate_custom_converter(source_data, interfaces)
File "/Users/garrettflynn/Documents/Github/nwb-guide/pyflask/manageNeuroconv/manage_neuroconv.py", line 168, in instantiate_custom_converter
return CustomNWBConverter(source_data)
File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/neuroconv/nwbconverter.py", line 65, in init
self.data_interface_objects = {
File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/neuroconv/nwbconverter.py", line 66, in
name: data_interface(**source_data[name])
File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/neuroconv/datainterfaces/ecephys/cellexplorer/cellexplorerdatainterface.py", line 304, in init
session_data = read_mat(filename=session_data_file_path, ignore_fields=ignore_fields)["session"]
File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/pymatreader/pymatreader.py", line 87, in read_mat
mjv, _ = matfile_version(fid)
File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/scipy/io/matlab/_miobase.py", line 221, in matfile_version
return _get_matfile_version(fileobj)
File "/opt/anaconda3/envs/nwb-guide/lib/python3.9/site-packages/scipy/io/matlab/_miobase.py", line 243, in _get_matfile_version
maj_ind = int(tst_str[2] == b'I'[0])
IndexError: index out of range