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

Probe appears to be missing when interpolating 'bad channels' in recording #3593

Open
Sietse-k opened this issue Dec 20, 2024 · 1 comment
Open
Labels
preprocessing Related to preprocessing module

Comments

@Sietse-k
Copy link

Hi,

I am trying to identify and interpolate 'bad' channels in my recording. Whenever I try to save the newly obtained preprocessed interpolated recording, I get the following warning:

"UserWarning: There is no Probe attached to this recording. Creating a dummy one with contact positions
warn("There is no Probe attached to this recording. Creating a dummy one with contact positions")"

There seems to be a probe attached to the recording (The statement recording.has_probe() returns "True"). Whenever I try to save the recording without this interpolation step, I don't get this warning.

Roughly the steps I take:

recording = se.read_openephys(self.oe_path)
recording = recording.set_probe(probe, in_place=False)

bad_channel_ids, channel_labels = spre.detect_bad_channels(recording=recording, method='coherence+psd')
recording = spre.interpolate_bad_channels(recording=recording, bad_channel_ids=bad_channel_ids)

recording.has_probe()
recording_saved = recording.save(folder=session.preprocessed_folder, format='binary')

In a similar issue I read that it is potentially not a problem, since the relevant information (channels locations, groups) are still passed (#2895).

Possibly someone knows why I get this specific warning in this case (and whether it is a problem at all).

Much appreciated,

Sietse

@samuelgarcia
Copy link
Member

Hi thanks for the report we need to check this.
We do not use so much interpolate_bad_channels() so it can be a bit buggy.

@alejoe91 alejoe91 added the preprocessing Related to preprocessing module label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preprocessing Related to preprocessing module
Projects
None yet
Development

No branches or pull requests

3 participants