Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

what is nch in eeg.py ? #77

Closed
myagmur01 opened this issue Apr 3, 2021 · 2 comments
Closed

what is nch in eeg.py ? #77

myagmur01 opened this issue Apr 3, 2021 · 2 comments

Comments

@myagmur01
Copy link

myagmur01 commented Apr 3, 2021

Hi ,

could you explain what is nch in eeg.py?
I have a single signal with a shape of (3000, 1) . When I input it to get plf plot, it throws an error as below:

    233     # ensure numpy
    234     signal = np.array(signal)
--> 235     nch = signal.shape[1]
    236 
    237     sampling_rate = float(sampling_rate)

IndexError: tuple index out of range
@anascacais
Copy link

Hi,

nch is the number of channels in your signal and as such it should correspond to the number of columns in your signal (i.e. signal.shape[1]).

I managed to reproduce that issue if signal was either a list or a numpy array with shape (3000,). Please try to reshape your signal before using it as input to eeg(), that should do the trick: signal = np.reshape(np.array(signal), (-1,1))

@afonsocraposo
Copy link
Contributor

Closing this due to no further responses. Feel free to comment if something is unclear.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants