# Estimating ICA sources on concatenated raw objects using ica.get\_sources()

**URL:** https://mne.discourse.group/t/estimating-ica-sources-on-concatenated-raw-objects-using-ica-get-sources/7840
**Category:** Support & Discussions
**Tags:** eeg, ica
**Created:** [November 12, 2023, 11:06am UTC](https://mne.discourse.group/t/estimating-ica-sources-on-concatenated-raw-objects-using-ica-get-sources/7840 "2023-11-12T11:06:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![LuukNeervens](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@LuukNeervens](https://mne.discourse.group/u/LuukNeervens)
#### Post date: [November 12, 2023, 11:06am UTC](https://mne.discourse.group/t/estimating-ica-sources-on-concatenated-raw-objects-using-ica-get-sources/7840/1 "2023-11-12T11:06:18Z")

</div>

- MNE version: 1.5.1
- operating system: Windows 11

Hi all,

It seems like the `ica.get_sources(raw_concat)` method only estimates the sources of the first original `raw` where `raw_concat` is a concatenation of two `raw` objects (done using `mne.concatenate_raws([raw1,raw2])`).  
I however need to get the estimate sources of this whole concatenation. Does anyone have an idea on how to resolve this issue? Would it be an acceptable solution to estimate the sources on both individual raws and subsequently concatenate the estimated sources `raw` objects?

Thank you in advance.

---

<div class="post-metadata">

### Author: ![agramfort](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@agramfort](https://mne.discourse.group/u/agramfort)
#### Post date: [November 12, 2023, 12:23pm UTC](https://mne.discourse.group/t/estimating-ica-sources-on-concatenated-raw-objects-using-ica-get-sources/7840/2 "2023-11-12T12:23:13Z")

</div>

that’s very surprising. How did you reach this conclusion?

Alex

---

<div class="post-metadata">

### Author: ![LuukNeervens](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@LuukNeervens](https://mne.discourse.group/u/LuukNeervens)
#### Post date: [November 14, 2023, 2:40pm UTC](https://mne.discourse.group/t/estimating-ica-sources-on-concatenated-raw-objects-using-ica-get-sources/7840/3 "2023-11-14T14:40:36Z")

</div>

Hi Alex,

The raw concatenated data has a dimensionality of 31 channels x 29045 samples.  
The original raws that were concatenated had a shape of (31x14530) and (31x14515).  
When `ica.get_sources(raw_concat)` is executed, it gives me the estimated sources, which have a shape of (31x14530), exactly the shape of the first raw object in the concatenation.
