Comments (7)
Hi,
no, it's not a bug. The code actually works for different channel types.
The keys are meant to map different rejection criteria to channels (in one
epoch), and unless full_report is not set to False a list returned (this
for one particular epoch).
I hope I understood you correctly,
Denis
from mne-python.
Hey @t3on ,
If you look at epochs.py, you'll see that the _get_data_from_disk function calls _is_good_epoch, which in turn calls _is_good with full_report=True (as referenced by @dengemann). This should give all the offending channels. Is it not doing that in some situation? It's possible we missed one instance (or some instances), but I think _get_data_from_disk is the only place epochs.drop_log gets set...
from mne-python.
Oh, and I should mention that the _get_data_from_disk method is used by user-level method drop_bad_epochs() and whenever preloading epochs data, so either of these should populate drop_log in a meaningful way.
from mne-python.
Hey guys,
Thanks for your suggestions. I have taken a look at those methods and I have a question. From what I understand in this code is that you find the channel with the maximum value at a sample and subtract from it the channel with the minimum value at the same given sample for all the samples in your epoch.
e.g. deltas = np.max(e_idx, axis=1) - np.min(e_idx, axis=1)
From there, it looks like only one maximum channel is returned from these other other contenders.
e.g. idx_max_delta = np.argmax(deltas)
Then delta becomes a single value that is then tested against the threshold
e.g. delta = deltas[idx_max_delta]
e.g. if delta > thresh:
If idx_max_delta maximally has only one value, then its value would be the only one return for the channel rejection, even if there were other channels that exceeded threshold.
Is this the proper logic of this segment of code. If so, is that the overall intention because what I would think to do would be to see if any deltas > thresh and return those indices because those would be all the channels rejected by the threshold?
Thanks for reading.
from mne-python.
hi,
you're right. The current code can only log one bad channel per channel type.
would you consider sending us a pull-request?
from mne-python.
@t3on, I can also take a stab fixing it if you don't want to -- just let us know
from mne-python.
Hey @Eric89GXL ,
Thanks for the offer but I think I will try to do it. Just getting out of class.
Best
from mne-python.
Related Issues (20)
- Inconsistent behavior between `Epochs` and `Evoked` in `get_data()` method when picking EEG channels and bads are present HOT 7
- Add option to change default channel type HOT 4
- BUG: Inconsistent Welch results by API HOT 7
- Too many (duplicate) search results in API docs HOT 3
- How to build the documentation? HOT 3
- No `on_missing` in `mne.channels.combine_channels` HOT 1
- `mne.io.read_raw_fil` crashes if bad channels are specified prior to import HOT 3
- topoplots for OPM data HOT 1
- Cannot use `evoked.animate_topomap()` on CSD data HOT 1
- OverFlowError when calling : `SourceEstimate.plot(...)` HOT 3
- `mne.Brain` fails to set renderer when blocking HOT 1
- Add option to import BrainVision files without marker types HOT 5
- BUG: Incompatibility of `sample_weight` with sklearn 1.4+ HOT 2
- BUG: Wrong output for adjacency=False
- bad colormap behavior when brain vlim sliders crossover
- Eyelink: Accept blank recording dates? HOT 3
- Release workflow HOT 16
- The PyQt6 dependency HOT 14
- Logging issue in jupyter kernel when logs are issued in a Thread HOT 4
- Add an SSVEP classification algorithm as a new feature HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mne-python.