# Question about ICA template matching with different number of channels

**URL:** <https://mne.discourse.group/t/question-about-ica-template-matching-with-different-number-of-channels/11252>\
**Category:** Support & Discussions\
**Tags:** meg, eeg, ica\
**Created:** [June 4, 2025, 2:41pm UTC](https://mne.discourse.group/t/question-about-ica-template-matching-with-different-number-of-channels/11252 "2025-06-04T14:41:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yaqing](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/yaqing/32/2503_2.png) [@yaqing](https://mne.discourse.group/u/yaqing)\
**Post date:** [June 4, 2025, 2:41pm UTC](https://mne.discourse.group/t/question-about-ica-template-matching-with-different-number-of-channels/11252/1 "2025-06-04T14:41:40Z")

</div>

Dear List,

I’m looking into removing ICA components in real time, and found that one way to do so is to store a numpy array of template IC derived from existing data, and use the `corrmap()` function to find components in the current ICs that best correlate with this template.

However, I noticed that the IC array has the length of number of good channels. Given that different acquisition runs often have different bad channels identified, I wonder what would be the best practice to overcome the channel mismatch between the stored template and running data. Should I:

- Interpolate both the data used to generate IC templates and the running data so that both include all channels?
- Interpolate both the template IC and ICs from the running data?
- Interpolate template IC or the data, then remove entries that correspond to bad channels in the running data?
- Something else?

There was a similar question from the archive but seems still open:

> [@corrmap / plot\_topomap / layout question](https://mne.discourse.group/t/corrmap-plot-topomap-layout-question/1071):
>
> Hello, &nbsp;&nbsp;&nbsp;I have a very large dataset where unfortunately we did not have an EOG or ECG channel. Thus, I am interested in using template matching using corrmap. I have a small dataset with lots of robust artifacts I'd like to use to derive the templates. So, I performed an ICA on those, and identified some candidate IC's for templates. Since I'd really rather not load ALL the IC's from my small dataset just to get a handful of template IC's, I'm using the option of giving an array as the te…

Thanks in advance,  
Yaqing
