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

Error when using BinaryRecordingExtractor #172

Open
lfrank opened this issue May 2, 2022 · 0 comments
Open

Error when using BinaryRecordingExtractor #172

lfrank opened this issue May 2, 2022 · 0 comments

Comments

@lfrank
Copy link

lfrank commented May 2, 2022

Trying out the viewer from a saved Recording I get:

AttributeError                            Traceback (most recent call last)
/Users/loren/Src/NWB/notebooks/spyglass_sorting_devel.ipynb Cell 12' in <cell line: 2>()
      [1](vscode-notebook-cell:/Users/loren/Src/NWB/notebooks/spyglass_sorting_devel.ipynb#ch0000016?line=0) #plot the Recording
----> [2](vscode-notebook-cell:/Users/loren/Src/NWB/notebooks/spyglass_sorting_devel.ipynb#ch0000016?line=1) SpikeSortingRecording.view(recording_key)

File ~/Src/NWB/spyglass/src/spyglass/spikesorting/spikesorting_recording.py:495, in SpikeSortingRecording.view(key)
    [492](file:///Users/loren/Src/NWB/spyglass/src/spyglass/spikesorting/spikesorting_recording.py?line=491) app = ephyviewer.mkQApp()
    [493](file:///Users/loren/Src/NWB/spyglass/src/spyglass/spikesorting/spikesorting_recording.py?line=492) win = ephyviewer.MainViewer(debug=True, show_auto_scale=True)
--> [495](file:///Users/loren/Src/NWB/spyglass/src/spyglass/spikesorting/spikesorting_recording.py?line=494) view = ephyviewer.TraceViewer(source=recording, name=recording_name)
    [496](file:///Users/loren/Src/NWB/spyglass/src/spyglass/spikesorting/spikesorting_recording.py?line=495) win.add_view(view)
    [498](file:///Users/loren/Src/NWB/spyglass/src/spyglass/spikesorting/spikesorting_recording.py?line=497) win.show()

File ~/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/traceviewer.py:431, in TraceViewer.__init__(self, useOpenGL, **kargs)
    [428](file:///Users/loren/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/traceviewer.py?line=427) def __init__(self, useOpenGL=None, **kargs):
    [429](file:///Users/loren/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/traceviewer.py?line=428)     BaseMultiChannelViewer.__init__(self, **kargs)
--> [431](file:///Users/loren/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/traceviewer.py?line=430)     self.make_params()
    [433](file:///Users/loren/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/traceviewer.py?line=432)     # useOpenGL=True eliminates the extremely poor performance associated
    [434](file:///Users/loren/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/traceviewer.py?line=433)     # with TraceViewer's line_width > 1.0, but it also degrades overall
    [435](file:///Users/loren/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/traceviewer.py?line=434)     # performance somewhat and is reportedly unstable
    [436](file:///Users/loren/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/traceviewer.py?line=435)     self.set_layout(useOpenGL=useOpenGL)

File ~/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/base.py:89, in BaseMultiChannelViewer.make_params(self)
     [86](file:///Users/loren/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/base.py?line=85) def make_params(self):
     [87](file:///Users/loren/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/base.py?line=86)     # Create parameters
     [88](file:///Users/loren/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/base.py?line=87)     all = []
---> [89](file:///Users/loren/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/base.py?line=88)     for i in range(self.source.nb_channel):
     [90](file:///Users/loren/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/base.py?line=89)         #TODO add name, hadrware index, id
     [91](file:///Users/loren/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/base.py?line=90)         name = 'ch{}'.format(i)
     [92](file:///Users/loren/opt/anaconda3/envs/spyglass/lib/python3.8/site-packages/ephyviewer/base.py?line=91)         children =[{'name': 'name', 'type': 'str', 'value': self.source.get_channel_name(i), 'readonly':True}]

AttributeError: 'BinaryRecordingExtractor' object has no attribute 'nb_channel'```
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

1 participant