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

Difficulty in working on MNI in SEEG file #3

Open
datsu28 opened this issue Jun 26, 2024 · 4 comments
Open

Difficulty in working on MNI in SEEG file #3

datsu28 opened this issue Jun 26, 2024 · 4 comments

Comments

@datsu28
Copy link

datsu28 commented Jun 26, 2024

Hi, when I run MNI with a default setting in windows ver. pyHFO in my SEEG files, I get the following errors.
Do you think anyone could fix this?

Thank you very much for your consideration.

Loading recording: C:/Users/ADaida/Box/[email protected]/atsuro_spindle/data/Th_proj_Pt1_spindle.edf

100%|##########| 79.0/79.0 [00:04<00:00, 18.8it/s]

100%|##########| 79.0/79.0 [00:30<00:00, 2.55it/s]

100%|##########| 79.0/79.0 [00:04<00:00, 19.3it/s]

Filtering COMPLETE!
Detecting HFOs...

Traceback (most recent call last):

File "src\utils\utils_gui.py", line 63, in run result = self.fn(*self.args, **self.kwargs)

File "main.py", line 583, in _detect

File "src\hfo_app.py", line 247, in detect_HFO self.channel_names, self.HFOs = self.detector.detect_multi_channels(self.filter_data, self.channel_names, filtered=True)

File "HFODetector\mni.py", line 119, in detect_multi_channels

File "HFODetector\utils.py", line 31, in parallel_process

File "HFODetector\utils.py", line 31, in

File "HFODetector\mni.py", line 157, in detect

File "HFODetector\mni.py", line 248, in _compute_thrd

ValueError: baseline_window contain only 0 and 1

@zyp5511
Copy link
Contributor

zyp5511 commented Jul 3, 2024

Please check if this is fixed on the main branch

@datsu28
Copy link
Author

datsu28 commented Jul 4, 2024

Thanks. But unfortunately, I am still encountering the same issue, even after Gitpulling the latest version.

@zyp5511
Copy link
Contributor

zyp5511 commented Jul 4, 2024

try
pip install --upgrade HFODetector==0.0.22

@datsu28
Copy link
Author

datsu28 commented Jul 4, 2024

Thanks, MNI detection finally worked.

Unfortunately, after saving to npz, I got two errors.

  1. I could not reload the error due to the following error.

  2. I could not annotate

  3. Error to reload npz
    Loading from npz...
    Traceback (most recent call last):

File "c:\Users\ADaida\Documents\GitHub\pyHFO\src\utils\utils_gui.py", line 63, in run result = self.fn(*self.args, **self.kwargs)

File "c:\Users\ADaida\Documents\GitHub\pyHFO\main.py", line 716, in _load_from_npz self.hfo_app = self.hfo_app.import_app(fname)

File "c:\Users\ADaida\Documents\GitHub\pyHFO\src\hfo_app.py", line 435, in import_app app.hfo_features.artifact_predictions = checkpoint["artifact_predictions"].item()

ValueError: can only convert an array of size 1 to a Python scalar

Traceback (most recent call last):
File "c:\Users\ADaida\Documents\GitHub\pyHFO\main.py", line 363, in scroll_time_waveform_plot

self.waveform_plot.plot(t_start)

File "c:\Users\ADaida\Documents\GitHub\pyHFO\src\ui\plot_waveform.py", line 180, in plot

eeg_data_to_display,_=self.backend.get_eeg_data(int(t_startself.sample_freq),int(t_endself.sample_freq), self.filtered)

File "c:\Users\ADaida\Documents\GitHub\pyHFO\src\hfo_app.py", line 111, in get_eeg_data

return data[:, start:end], self.channel_names

TypeError
:
'NoneType' object is not subscriptable

Loading from npz...
Traceback (most recent call last):

File "c:\Users\ADaida\Documents\GitHub\pyHFO\src\utils\utils_gui.py", line 63, in run result = self.fn(*self.args, **self.kwargs)

File "c:\Users\ADaida\Documents\GitHub\pyHFO\main.py", line 716, in _load_from_npz self.hfo_app = self.hfo_app.import_app(fname)

File "c:\Users\ADaida\Documents\GitHub\pyHFO\src\hfo_app.py", line 435, in import_app app.hfo_features.artifact_predictions = checkpoint["artifact_predictions"].item()

ValueError: can only convert an array of size 1 to a Python scalar

  1. error to annotation

initializing HFOAnnotation

Traceback (most recent call last):
File "c:\Users\ADaida\Documents\GitHub\pyHFO\main.py", line 840, in open_annotation

annotation = HFOAnnotation(self.hfo_app, self, self.close_signal)

File "c:\Users\ADaida\Documents\GitHub\pyHFO\src\ui\annotation.py", line 73, in init

self.waveform_plot.plot(start, end, channel, interval=1.0) # Default interval

File "c:\Users\ADaida\Documents\GitHub\pyHFO\src\ui\annotation_plot.py", line 91, in plot

unfiltered_eeg_data_to_display_one = unfiltered_eeg_data[self.channel_names == channel_name,:][0]

IndexError
:
boolean index did not match indexed array along dimension 0; dimension is 81 but corresponding boolean dimension is 76

Thank you very much for your help!

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

2 participants