-
Notifications
You must be signed in to change notification settings - Fork 265
fix for v9 SON files #824
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
fix for v9 SON files #824
Conversation
|
Hi @MarinManuel. This is super cool and should help many users. |
|
I have push the file "Two-mice-bigfile-test000.smr" Could add it here in neo/test/rawiotest and here in neo/test/iotest and check that test are passing ? |
|
The tests are failing as
I would go for approach 2, since the |
|
@JuliaSprenger @samuelgarcia I've added a line to convert back the unicode strings to ascii for the time being. Hopefully that does not introduce any more problems. |
|
Hi all. @MarinManuel : I propose to fix this str vs unicode problem outside this PR very very soon. So you could rebase this PR with the offcial fix. is it OK ? |
|
@MarinManuel the format change is in master now, could you rebase and undo your changes in |
neo/core/channelindex.py
Outdated
|
|
||
| # Store recommended attributes | ||
| self.channel_names = np.array(channel_names) | ||
| self.channel_names = np.array(channel_names, dtype='S') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this. this is now fixed.
| # at this time ch_names are expected to be type 'S'. | ||
| # see https://github.com/NeuralEnsemble/python-neo/pull/824#issuecomment-644295081 | ||
| ch_names = [name.encode('ascii', errors='replace') for name in ch_names] | ||
| neo_channel_index = ChannelIndex(index=ind_within, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this. this is now fixed.
|
@JuliaSprenger :Could we first merge this PR before #775 which is also related to spike2io ? |
|
Sure, then we keep #775 in the queue. |
|
@samuelgarcia Hi, I have reverted the commit on files channelindex.py and basefromrawio.py, is that good enough? Bit of a git newbie here... |
|
Hi @MarinManuel, Please edit the files to include all the changes that are suggested by Neuralensemble master and additionally keep the ones you want to include in this PR. I hope this helps. Tell us if there's issues during the process. |
|
Hi @JuliaSprenger |
|
Hi @MarinManuel neo/test/rawiotest/test_spike2rawio.py class TestSpike2RawIO(BaseTestRawIO, unittest.TestCase, ):
rawioclass = Spike2RawIO
files_to_download = [
'File_spike2_1.smr',
'File_spike2_2.smr',
...
'Two-mice-bigfile-test000.smr', # <<<<<< new line
]
entities_to_test = files_to_downloadneo/test/iotest/test_spike2io.py class TestSpike2IO(BaseTestIO, unittest.TestCase, ):
ioclass = Spike2IO
files_to_test = [
'File_spike2_1.smr',
'File_spike2_2.smr',
...
'Two-mice-bigfile-test000.smr', # <<<<<< new lineAnd afte rthis I will be able to merge this PR. thanks again. |
|
|
thanks. |
In the CED documentation for the SON library, it says:
this PR fixes the offsets for v9 files, and fixes #818