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

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

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

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

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

HTH
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170829/c894eef7/attachment.html

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

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

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

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