# Format of MATLAB mne\_read\_stc\_file output

**URL:** <https://mne.discourse.group/t/format-of-matlab-mne-read-stc-file-output/606>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [August 10, 2013, 8:50pm UTC](https://mne.discourse.group/t/format-of-matlab-mne-read-stc-file-output/606 "2013-08-10T20:50:39Z")\
**Posts on this page:** 3\
**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 10, 2013, 8:50pm UTC](https://mne.discourse.group/t/format-of-matlab-mne-read-stc-file-output/606/1 "2013-08-10T20:50:39Z")

</div>

Hello,

I am looking for some clarification on the format of the output of  
mne\_read\_stc\_file.m . For example, when I run it on one of my files (a left  
hemisphere .stc file which was computed morphed to an average brain), I get  
a file with 10242 vertices:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tmin: -0.8000  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tstep: 0.0017  
&nbsp;&nbsp;&nbsp;&nbsp;vertices: [10242x1 uint32]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data: [10242x780 double]

However, when I read the source space that corresponds to this .stc file (a  
source space that was made using --ico 4), it only has 2562 source vertices  
per hemisphere (from src(1).vertno):

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id: 101  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;np: 163842  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ntri: 327680  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;coord\_frame: 5  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rr: [163842x3 double]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nn: [163842x3 double]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tris: [327680x3 int32]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nuse: 2562  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inuse: [1x163842 int32]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vertno: [1x2562 int32]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nuse\_tri: 5120  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;use\_tris: [5120x3 int32]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nearest: []  
&nbsp;&nbsp;&nbsp;&nbsp;nearest\_dist: []  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pinfo: []  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dist: []  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dist\_limit: []

So basically I am just not sure what the 10242 vertices read from my .stc  
file correspond to, as that number doesn't correspond to anything I see in  
the source space. Based on my reading of lines 40-45 of  
mne\_label\_time\_courses.m, it looks to me like the first 2562 vertices in  
the stc file correspond to the actual vertices from my source space,  
whereas the rest are ignored --- is that true? (The reason I am interested  
in this is because rather than reading in label time courses, I want to try  
reading in just the time courses that correspond to the used vertices in  
the source space, and then use the triangle information from src.use\_tris  
and src.tris to identify source vertices that are adjacent to each other  
for the purpose of spatio-temporal clustering. In that case, would  
stc.data( source(1).vertno, : ) be the way to get just the timecourses  
corresponding to source vertices?)

Thank you,  
Steve

Stephen Politzer-Ahles  
New York University, Abu Dhabi  
Psychology Department  
[http://files.nyu.edu/spa268/public](http://files.nyu.edu/spa268/public)  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20130811/2b8766b9/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20130811/2b8766b9/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 10, 2013, 8:57pm UTC](https://mne.discourse.group/t/format-of-matlab-mne-read-stc-file-output/606/2 "2013-08-10T20:57:17Z")

</div>

Hey Steve,

Once you morph the individual subject's data to the average brain  
"fsaverage", the source space points in the STC will correspond to those in  
fsaverage's source space, which is usually the standard grade-5 decimation  
with 10242 vertices per hemisphere. The vertices used in fsaverage are  
conveniently just the first 10242 vertices in each hemisphere (1:10242 in  
1-based indexing). Read fsaverage's source space and it should make sense.  
If on the other hand you morphed to some other average brain (not  
fsaverage), the vertices might correspond to some other set of indices, but  
they probably still correspond to a grade-5 decimation.

Cheers,  
Eric

---

<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 10, 2013, 9:00pm UTC](https://mne.discourse.group/t/format-of-matlab-mne-read-stc-file-output/606/3 "2013-08-10T21:00:01Z")

</div>

Hi Steve,  
&nbsp;&nbsp;&nbsp;The standard fsaverage surface that is included has 10242 vertices per  
hemisphere. The stc files do not retain any information about the  
original source-space to which those time-courses belong (since they  
are just overlays and you could overlay many different things). They  
only have vertex numbers and the corresponding time courses (i.e data).  
It is upto to the user to pair the right stc file with the right  
surface.

HTH,  
Hari
