Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 22:33
    codecov[bot] commented #5895
  • Jan 31 22:32
    larsoner synchronize #5895
  • Jan 31 21:16
    codecov[bot] commented #5895
  • Jan 31 21:16
    larsoner synchronize #5895
  • Jan 31 20:23
    agramfort commented #5768
  • Jan 31 18:31
    larsoner opened #5895
  • Jan 31 18:31
    larsoner milestoned #5895
  • Jan 31 17:58
    codecov[bot] commented #5822
  • Jan 31 17:16
    GuillaumeFavelier commented #5822
  • Jan 31 17:13
    codecov[bot] commented #5822
  • Jan 31 17:13
    GuillaumeFavelier synchronize #5822
  • Jan 31 17:01
    jshanna100 commented #5807
  • Jan 31 16:11
    larsoner commented #5807
  • Jan 31 15:36
    jshanna100 commented #5807
  • Jan 31 15:19
    codecov[bot] commented #5807
  • Jan 31 15:07
    GuillaumeFavelier commented #5822
  • Jan 31 14:18
    codecov[bot] commented #5768
  • Jan 31 14:01
    codecov[bot] commented #5807
  • Jan 31 14:01
    jshanna100 synchronize #5807
  • Jan 31 13:45
    GuillaumeFavelier synchronize #5822
Eric Larson
@larsoner

does anybody have a hint why this can happen?

Yes probably a HiDPI problem with the transformation matrices being used

feel free to open an MNE issue, preferably with a minimal example (based on plot_ecog.py as much as possible would be good) and we can take a look
Jussi Nurminen
@jjnurminen
Am I correct that mne does not do 3D topomaps (i.e. false-color visualization overlaid on 3D plot of sensor array, that the user could interactively rotate)? Maybe plot_alignment could be adapted to do this with relatively little work.
Alexandre Gramfort
@agramfort
Jussi Nurminen
@jjnurminen
@agramfort exactly that! It seems that I suffer from "wooden eye" (Finnish expression)
Jussi Nurminen
@jjnurminen

https://www.nmr.mgh.harvard.edu/mne/stable/auto_tutorials/source-modeling/plot_forward.html#compute-source-space says:

There are two types of source spaces:
source-based source space when the candidates are confined to a surface.
volumetric or discrete source space when the candidates are discrete, arbitrarily located source points bounded >by the surface.
Source-based source space is computed using [...]

Shouldn't it be "Surface-based source space" instead of "Source-based"?

agpcalcium
@agpcalcium
Hi all. I am preprocessing some EEG data prior to manually sleep scoring. My data was extracted from .edf format. I a couple of questions regarding re-referencing and filtering:
  1. I have managed to re-reference the 6 EEG channels using .set_eeg_reference. Is there a way to also re-reference the EOG and EMG channels? These channels will be re-referenced to those different from the EEG (i.e. I want to do a bipolar EMG derivation from my two EMG channels). I have tried using .set_bipolar_reference to do this but I get the Attribute error that " 'RawEDF' object has no attribute 'set_bipolar_reference'". Any suggestions?
  2. I also need to apply different filters to different channels. I have applied a bandpass filter of 0.3-35Hz specifically to my EEG channel. When I then apply a 10-100Hz filter onto my EMG channel, will the EEG channel filter remain applied to the data?
    Thankyou!
Eric Larson
@larsoner
for (1) use the function mne.set_bipolar_reference not a method of the class
for (2) use different picks values in raw.filter
@jjnurminen yes that looks like a typo, feel free to open a PR to fix it and any other errors you spot
agpcalcium
@agpcalcium
@larsoner Thanks for these suggestions!
agpcalcium
@agpcalcium
Screenshot 2019-09-16 at 15.37.50.png

@larsoner I am trying to do as suggested, with:

eegRR = mne.set_bipolar_reference(inst = eegRR, anode = 'ChinR', cathode = 'ChinL', ch_name = 'EMG')

but get the attached error. Am I calling the function wrong? Thanks!

Eric Larson
@larsoner
try supplying all as str or all as list of str, right now two are str and one is list of str
also that traceback is missing the actual error message
agpcalcium
@agpcalcium
Screenshot 2019-09-16 at 16.17.57.png
Screenshot 2019-09-16 at 16.18.13.png
@larsoner apologies- attached is the section of code and the error.
I do not understand what you mean by one being a list of str- are they not all str?
Eric Larson
@larsoner

I can't replicate with this simple self-contained snippet:

import numpy as np
from mne import create_info, set_bipolar_reference
from mne.io import RawArray
raw = RawArray(np.zeros((2, 1000)), create_info(2, 1000., 'eeg'))
set_bipolar_reference(inst=raw, anode='0', cathode='1', ch_name='EOG')

If you can make a similar self-contained snippet or upload your data somewhere and paste the code to run (not a screenshot, do it in a gist or use triple-backticks here) then someone can take a look

agpcalcium
@agpcalcium
@larsoner I've posted my preprocessing code here: https://github.com/agpcalcium/agp141
I'm just figuring out how to trim an edf file down, so I will post a small edf file onto the repository when I have done that!
Thankyou for your help so far
Joan Massich
@massich
does anyone know how to do pick_types and keep the 'bads' ?
Eric Larson
@larsoner
@agpcalcium I don't have access to that repo. Make sure whatever code snippet you provide you have trimmed it to the minimal number of commands necessary to replicate. This should be ideally four or five lines (including imports) that one can copy-paste immediately to run and get the error if they have your data.
@massich pick_types(exclude=())
agpcalcium
@agpcalcium
@larsoner sorry- it is now public! Thanks for the guidance on making an easy-to-run code, I have included what I think is necessary but minimal. For the sake of time, here is a link to the EEG.edf data, which I have not managed to trim!: https://drive.google.com/open?id=1FOHqNHf5RVVdGYoauk9Q-WshyCNg-GiV
agpcalcium
@agpcalcium
@larsoner I think I have solved the issue! I was trying to apply my bipolar references onto the same variable one after another (as in the github repo). I have now sequentially renamed the variables and it works fine! Thanks for your help and guidance!
Gabriele Arnulfo
@gabri470
Dear all, I have a difficult case to handle. My stim channel only has one group of stimuli onset recorded (i.e. Go events), while the log-file containing all other events (i.e. NoGo and behavioural reponses) are not sent to stim channel by Presentation (we only have one trigger in channel available). Is there a way to import events from file (including latencies not just labels as it could be done with metadata?)
Alexandre Gramfort
@agramfort
@gabri470 have a look at the add_events method or set_annotation
Gabriele Arnulfo
@gabri470
Thanks @agramfort I'll take a look !!
Gabriele Arnulfo
@gabri470
image.png
Dear all, it looks like I partially achieved my goal in computing Evoked response using SEEG data (thanks @agramfort for the great talk and the suggestions). What I am now facing is that when plotting using evoked object, I bump into a ValueError. Data are fine in my opinion when plotted using numpy array in evoked.data (see above plot)
could it be something connected to the fact that I am using SEEG and don't have channel-scalp positions loaded?
Gabriele Arnulfo
@gabri470
ValueError: Some of the values to be plotted are NaN.
which are clearly not based on the plot above ...
Alexandre Gramfort
@agramfort
@gabri470 are you trying to plot with spatial colors that would require channel locations? channel positions are set to NaN if not available
Gabriele Arnulfo
@gabri470
I spotted the problem I was having. The issue rose from the fact that when building bipolar referencing in SEEG, some virtual channels was empty (my fault...). Now it's working perfectly. Thanks for your help and guidance.
Jon Houck
@jhouck
In a VolVectorSourceEstimate, what is it that normal returns? It looks like maybe +Z as in :point_up: March 29, 2019 10:03 AM
Alexandre Gramfort
@agramfort
Yes normal is z for vector source space. Actually I think that picking normal component with a vol source space should not be working / allowed
ossadtchi
@ossadtchi
Hey, guys!
ossadtchi
@ossadtchi

I faced the issue with raw.filter that I can not filter the instance of the raw that I created with pick_channels using names of MISC channels. It complains about not finding the channels to work with. Is it intended and you can filter only EEG or MEG? Is it the right place to ask such questions?

works:
raw_grad = raw.copy().pick_channels(names_grad);
raw_grad = raw_grad.filter(1, 45., h_trans_bandwidth='auto', filter_length ='auto', phase = 'zero');

does not work:
raw_acc = raw.copy().pick_channels(names_acc);
raw_acc = raw_acc.filter(0.5, 5., h_trans_bandwidth='auto', filter_length ='auto', phase = 'zero');

THANKS!!

Jon Houck
@jhouck
Thanks @agramfort Yes, sounds like it's one of those inherited methods that probably shouldn't be. @larsoner said something similar about pick_ori='normal' in the various apply_inverse functions.
ossadtchi
@ossadtchi

Thanks, guys. If I understood Alex correctly
neither

raw_misc.filter(0.5, 5., h_trans_bandwidth='auto', filter_length='auto',
                            phase = 'zero', picks = names_misc);

nor

raw_misc.filter(0.5, 5., h_trans_bandwidth='auto', filter_length='auto',
                            phase = 'zero', picks = np.array([0,1,2]));

work and give the same error. Sorry to bug you with this.

Alexandre Gramfort
@agramfort
@jhouck can you open an issue ?
Alexandre Gramfort
@agramfort
@drammock where is this information https://www.nmr.mgh.harvard.edu/mne/stable/manual/io.html in the new doc ?
I want to add something there about DigMontage et EEG channel locations
Jon Houck
@jhouck
Yes, done, see mne-tools/mne-python#6803
Daniel McCloy
@drammock
@agramfort the "cheatsheet" table is still reproduced here: https://mne.tools/dev/overview/implementation.html#supported-data-formats but I can't find the rest of the content from that page. @larsoner was that intentionally deleted in mne-tools/mne-python#6767 ?
(may have been, on the justification that the PDF of the MNE-C manual is now freely online). I've added a note about that page to #6792