wonambi
wonambi copied to clipboard
EDF New Channel - ValueError: could not broadcast input array from shape (400) into shape (500)
When loading an EDF sleep file, the dataset seems to load correctly. However, when I click Apply after creating a new Channel, I get the following error:
(base) C:\Users\Matthew\Documents\Sleep>wonambi 16:13:32 WONAMBI v5.62 16:13:41 Reading dataset: C:/Users/Matthew/Documents/Sleep/06000656-A5BS04864[EXPORT].edf Traceback (most recent call last): File "c:\users\matthew\anaconda3\lib\site-packages\wonambi\widgets\channels.py", line 434, in apply self.parent.overview.update_position() File "c:\users\matthew\anaconda3\lib\site-packages\wonambi\widgets\overview.py", line 239, in update_position self.parent.traces.read_data() File "c:\users\matthew\anaconda3\lib\site-packages\wonambi\widgets\traces.py", line 344, in read_data endtime=window_end) File "c:\users\matthew\anaconda3\lib\site-packages\wonambi\dataset.py", line 367, in read_data dat = dataset.return_dat(idx_chan, one_begsam, one_endsam) File "c:\users\matthew\anaconda3\lib\site-packages\wonambi\ioeeg\edf.py", line 201, in return_dat dat_in_rec = self._read_record(f, blk, chan) File "c:\users\matthew\anaconda3\lib\site-packages\wonambi\ioeeg\edf.py", line 237, in _read_record dat_in_rec[i_ch_in_dat, :] = repeat(x, ratio) ValueError: could not broadcast input array from shape (400) into shape (500)
Interestingly, the same dataset loads correctly using the following python project, which appears to be based on an earlier release (2017?) of wonambi: https://pypi.org/project/sleepytimes/
Sorry for not getting back to you. Could you share a small example of the dataset?
Test.edf https://drive.google.com/a/grecsek.com/file/d/1diT1D4Ho6OEeQyQ6Kmiz4WKknfjZEzRF/view?usp=drive_web Sample dataset attached. The data loads without errors. When I attempt to create a new channel, selecting EEG-C3, C4, EOG-L, R, and EMG and then click Apply, the exception is thrown.
On Wed, Mar 13, 2019 at 11:50 AM Gio Piantoni [email protected] wrote:
Sorry for not getting back to you. Could you share a small example of the dataset?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wonambi-python/wonambi/issues/12#issuecomment-472482498, or mute the thread https://github.com/notifications/unsubscribe-auth/ACKCB4xJ1TaI5zG4w62tFEJgGkveGjFVks5vWR5egaJpZM4aB2DU .