# morph to volume source after apply\_lcmv\_epochs

**URL:** <https://mne.discourse.group/t/morph-to-volume-source-after-apply-lcmv-epochs/1845>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [May 13, 2019, 9:38am UTC](https://mne.discourse.group/t/morph-to-volume-source-after-apply-lcmv-epochs/1845 "2019-05-13T09:38:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [May 13, 2019, 9:38am UTC](https://mne.discourse.group/t/morph-to-volume-source-after-apply-lcmv-epochs/1845/1 "2019-05-13T09:38:38Z")

</div>

External Email - Use Caution

Hi list,  
I am creating volume source space of whole brain and then obtain stcs per  
single trial using apply\_lcmv\_epochs, and then morphing to fsaverage.  
Following is the snippet,

stcs = apply\_lcmv\_epochs(epochs\_hilb, filters,max\_ori\_out='signed')  
morph = mne.compute\_source\_morph(fwd['src'],  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;subject\_from=subj, subject\_to='fsaverage',  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;subjects\_dir=subjects\_dir)  
stc\_fsaverage = morph.apply(stcs)

whenever i am trying to apply the morphing [for example:  
morph.apply(stcs)], the code lands up with a error:

AttributeError: 'list' object has no attribute 'subject'

What could be the possible solution without changing the pipeline?  
It will be really helpful if list can help me!  
Thanks

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [May 13, 2019, 2:12pm UTC](https://mne.discourse.group/t/morph-to-volume-source-after-apply-lcmv-epochs/1845/2 "2019-05-13T14:12:19Z")

</div>

External Email - Use Caution

`apply_lcmv_epochs` returns a list of STCs, not a single STC:

[https://martinos.org/mne/stable/generated/mne.beamformer.apply\_lcmv\_epochs.html](https://martinos.org/mne/stable/generated/mne.beamformer.apply_lcmv_epochs.html)

So you probably want to iterate over them and morph each one, e.g.:

stcs\_fsaverage = [morph.apply(stc) for stc in stcs]

Eric
