# Why does stc.save() save two .stc files?

**URL:** <https://mne.discourse.group/t/why-does-stc-save-save-two-stc-files/1292>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [August 29, 2017, 2:57pm UTC](https://mne.discourse.group/t/why-does-stc-save-save-two-stc-files/1292 "2017-08-29T14:57:15Z")\
**Posts on this page:** 8\
**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:** [August 29, 2017, 2:57pm UTC](https://mne.discourse.group/t/why-does-stc-save-save-two-stc-files/1292/1 "2017-08-29T14:57:15Z")

</div>

Hi,

I'm wondering why saving a source estimate using stc.save(fname,...) saves  
both lh.stc and rh.stc files when each of these already contains both  
hemispheres' data. Is there a difference between the lh.stc and rh.stc  
files?

Thanks and Best,  
Gladia  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20170829/9746f0a2/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170829/9746f0a2/attachment.html)

---

<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:** [August 29, 2017, 4:09pm UTC](https://mne.discourse.group/t/why-does-stc-save-save-two-stc-files/1292/2 "2017-08-29T16:09:41Z")

</div>

lh.stc only contains values for left hemisphere and vice verse. So it's not  
redundant.

HTH  
Alex  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20170829/e53be01a/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170829/e53be01a/attachment.html)

---

<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:** [August 29, 2017, 5:33pm UTC](https://mne.discourse.group/t/why-does-stc-save-save-two-stc-files/1292/3 "2017-08-29T17:33:12Z")

</div>

Hi Alex,

When I read in either an lh.stc or an rh.stc file using  
mne.read\_source\_estimates, the stc object contains both stc.lh\_data and  
stc.rh\_data. Also, the stc object contains vertex lists for both  
hemispheres (lh\_vertno and rh\_vertno). Should I only use stc.lh\_data from  
the lh.stc file and stc.rh\_data from the rh.stc file?

Thanks and Best,  
Gladia

---

<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:** [August 29, 2017, 7:59pm UTC](https://mne.discourse.group/t/why-does-stc-save-save-two-stc-files/1292/4 "2017-08-29T19:59:42Z")

</div>

yes use lh\_data and rh\_data to select data from lh or rh

FYI we use internally this private function to read each file:

[https://github.com/mne-tools/mne-python/blob/master/mne/source\_estimate.py#L34](https://github.com/mne-tools/mne-python/blob/master/mne/source_estimate.py#L34)

HTH  
Alex  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20170829/c894eef7/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170829/c894eef7/attachment.html)

---

<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:** [September 6, 2017, 1:26pm UTC](https://mne.discourse.group/t/why-does-stc-save-save-two-stc-files/1292/5 "2017-09-06T13:26:09Z")

</div>

Hi Alex,

Sorry to ask again, but I still can't figure it out. Each time I do  
stc.save(), two files are saved: \<fname\>-lh.stc and \<fname\>-rh.stc. The  
lh.stc file contains both lh\_data and rh\_data. The rh.stc file also  
contains both lh\_data and rh\_data. I have verified that lh\_data from the  
lh.stc file is identical to lh\_data from the rh.stc file. Similarly,  
rh\_data from the lh.stc file is identical to rh\_data from the rh.stc file.  
Therefore I am unsure why two files were created by the stc.save()  
function.

Because I am morphing the data in the stc files, it would cut the  
computation time in half if I could morph only one set of files (eg. just  
the lh.stc files, which already contain both hemispheres' data). I'd like  
to make sure that it's ok to morph just one set of stc files (lh.stc)- that  
there's no extra information stored in the other set (rh.stc files).

Thanks and Best,  
Gladia

---

<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:** [September 6, 2017, 1:33pm UTC](https://mne.discourse.group/t/why-does-stc-save-save-two-stc-files/1292/6 "2017-09-06T13:33:15Z")

</div>

> Each time I do stc.save(), two files are saved: \<fname\>-lh.stc and  
> \<fname\>-rh.stc.

Yep, this is correct.

> The lh.stc file contains both lh\_data and rh\_data.

The -lh.stc file on disk only contains the left-hemisphere data. But in MNE  
if you tell it to load the -lh.stc file, it automatically loads both the  
-lh.stc \*and\* -rh.stc files to give you the SourceEstimate.

Eric  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20170906/70351d72/attachment-0001.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170906/70351d72/attachment-0001.html)

---

<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:** [September 6, 2017, 2:05pm UTC](https://mne.discourse.group/t/why-does-stc-save-save-two-stc-files/1292/7 "2017-09-06T14:05:56Z")

</div>

how come you can have the same values in lh\_data and rh\_data?

can you share the files?

Alex  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20170906/ae3356b6/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170906/ae3356b6/attachment.html)

---

<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:** [September 6, 2017, 3:50pm UTC](https://mne.discourse.group/t/why-does-stc-save-save-two-stc-files/1292/8 "2017-09-06T15:50:37Z")

</div>

Hi Eric,

I see, thank you!

Hi Alex,

I don't have the same values in rh\_data and lh\_data. I have two copies of  
lh\_data and rh\_data, one loaded from the lh.stc file and the other from the  
rh.stc file. However, Eric's explanation clarifies why I still need both  
lh.stc and rh.stc files.

Best,  
Gladia
