Can't Plot Non-Standard Channels in MNE-Python EEG Dataset

Scenario:

The dataset consists of four files (.ceo , .dap , .dat , .rs3 ) and includes six non-standard channels alongside standard channels. When loaded as an MNE Raw object, the non-standard channels have sensor locations stored as entirely NaN (Not a Number) values in a NumPy array. This prevents proper visualization of these channels in sensor plots, channel amplitude plots, and other MNE functionalities.

Objective:

The goal is to investigate why the non-standard channels are not plotting and determine if adding their known locations will resolve the issue.

Current Behavior:

  • Standard channels load correctly and have valid sensor locations.
  • Non-standard channels have fully-NaN locations, preventing visualization.

Uncertain Cause:

While the NaN locations likely contribute to the plotting issue, it’s unclear if this is the sole reason. There might be additional factors specific to the non-standard channel format or the file type causing the problem.

Desired Outcome:

  • Understand why the non-standard channels are not plotting.
  • If adding known locations resolves the issue, visualize all channels (standard and non-standard) in sensor plots, channel amplitude plots, etc.

Additional Information:

  • I have the actual x, y, and z coordinates for each non-standard channel but updating non-standard channels locations does not affect their display and they are still not displayed

Request for Assistance:

I seek guidance on:

Identifying the potential reasons why the non-standard channels are not plotting, while I update their locations with actual position.

My 10 non-standard channels info :

  'unit_mul': 0 (FIFF_UNITM_NONE),
  'range': 1.0,
  'cal': 1e-06,
  'kind': 502 (FIFFV_MISC_CH),
  'coil_type': 0 (FIFFV_COIL_NONE),
  'unit': 107 (FIFF_UNIT_V),
  'coord_frame': 0 (FIFFV_COORD_UNKNOWN),
  'ch_name': '10',
  'scanno': 123,
  'logno': 123},
 {'loc': array([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan]),
  'unit_mul': 0 (FIFF_UNITM_NONE),
  'range': 1.0,
  'cal': 1e-06,
  'kind': 502 (FIFFV_MISC_CH),
  'coil_type': 0 (FIFFV_COIL_NONE),
  'unit': 107 (FIFF_UNIT_V),
  'coord_frame': 0 (FIFFV_COORD_UNKNOWN),
  'ch_name': 'LF',
  'scanno': 124,
  'logno': 124},
 {'loc': array([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan]),
  'unit_mul': 0 (FIFF_UNITM_NONE),
  'range': 1.0,
  'cal': 1e-06,
  'kind': 502 (FIFFV_MISC_CH),
  'coil_type': 0 (FIFFV_COIL_NONE),
  'unit': 107 (FIFF_UNIT_V),
  'coord_frame': 0 (FIFFV_COORD_UNKNOWN),
  'ch_name': 'LB',
  'scanno': 125,
  'logno': 125},
 {'loc': array([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan]),
  'unit_mul': 0 (FIFF_UNITM_NONE),
  'range': 1.0,
  'cal': 1e-06,
  'kind': 502 (FIFFV_MISC_CH),
  'coil_type': 0 (FIFFV_COIL_NONE),
  'unit': 107 (FIFF_UNIT_V),
  'coord_frame': 0 (FIFFV_COORD_UNKNOWN),
  'ch_name': 'LOU',
  'scanno': 126,
  'logno': 126},
 {'loc': array([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan]),
  'unit_mul': 0 (FIFF_UNITM_NONE),
  'range': 1.0,
  'cal': 1e-06,
  'kind': 502 (FIFFV_MISC_CH),
  'coil_type': 0 (FIFFV_COIL_NONE),
  'unit': 107 (FIFF_UNIT_V),
  'coord_frame': 0 (FIFFV_COORD_UNKNOWN),
  'ch_name': 'LOD',
  'scanno': 127,
  'logno': 127},
 {'loc': array([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan]),
  'unit_mul': 0 (FIFF_UNITM_NONE),
  'range': 1.0,
  'cal': 1e-06,
  'kind': 502 (FIFFV_MISC_CH),
  'coil_type': 0 (FIFFV_COIL_NONE),
  'unit': 107 (FIFF_UNIT_V),
  'coord_frame': 0 (FIFFV_COORD_UNKNOWN),
  'ch_name': 'RF',
  'scanno': 128,
  'logno': 128},
 {'loc': array([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan]),
  'unit_mul': 0 (FIFF_UNITM_NONE),
  'range': 1.0,
  'cal': 1e-06,
  'kind': 502 (FIFFV_MISC_CH),
  'coil_type': 0 (FIFFV_COIL_NONE),
  'unit': 107 (FIFF_UNIT_V),
  'coord_frame': 0 (FIFFV_COORD_UNKNOWN),
  'ch_name': 'RB',
  'scanno': 129,
  'logno': 129},
 {'loc': array([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan]),
  'unit_mul': 0 (FIFF_UNITM_NONE),
  'range': 1.0,
  'cal': 1e-06,
  'kind': 502 (FIFFV_MISC_CH),
  'coil_type': 0 (FIFFV_COIL_NONE),
  'unit': 107 (FIFF_UNIT_V),
  'coord_frame': 0 (FIFFV_COORD_UNKNOWN),
  'ch_name': 'ROU',
  'scanno': 130,
  'logno': 130},
 {'loc': array([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan]),
  'unit_mul': 0 (FIFF_UNITM_NONE),
  'range': 1.0,
  'cal': 1e-06,
  'kind': 502 (FIFFV_MISC_CH),
  'coil_type': 0 (FIFFV_COIL_NONE),
  'unit': 107 (FIFF_UNIT_V),
  'coord_frame': 0 (FIFFV_COORD_UNKNOWN),
  'ch_name': 'ROD',
  'scanno': 131,
  'logno': 131},
 {'loc': array([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan]),
  'unit_mul': 0 (FIFF_UNITM_NONE),
  'range': 1.0,
  'cal': 1e-06,
  'kind': 502 (FIFFV_MISC_CH),
  'coil_type': 0 (FIFFV_COIL_NONE),
  'unit': 107 (FIFF_UNIT_V),
  'coord_frame': 0 (FIFFV_COORD_UNKNOWN),
  'ch_name': 'Trigger',
  'scanno': 132,
  'logno': 132}```
type or paste code here

a standard channel info :

{'loc': array([-0.08     ,  0.0315439,  0.0489794,  0.       ,  0.       ,
          0.       ,  0.       ,  0.       ,  0.       ,  0.       ,
          0.       ,  0.       ]),
  'unit_mul': 0 (FIFF_UNITM_NONE),
  'range': 1.0,
  'cal': 1e-06,
  'kind': 2 (FIFFV_EEG_CH),
  'coil_type': 1 (FIFFV_COIL_EEG),
  'unit': 107 (FIFF_UNIT_V),
  'coord_frame': 4 (FIFFV_COORD_HEAD),
  'ch_name': 'TP8',
  'scanno': 122,
  'logno': 122}

The channels should show up in all plots that do not show the sensors on the head. For example, raw.plot() should display all sensors.

If that’s not the case, something else must be wrong.

And looking at the output you provided, that’s probably what’s happening:

You need to set the channel type to “eeg”. See
https://mne.tools/stable/generated/mne.io.Raw.html#mne.io.Raw.set_channel_types

Best wishes
Richard

1 Like

Spot on !
Thanks Richard

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.