Saving time series data of virtual sensor during inverse modeling

Hi MNE users,

Is there a way that we can save the time series data- the response from sensor showing peak localization in inverse modeling or let’s say tor that matter the response from any virtual sensor we obtain during the source localization, so that I can only later look at the time frequency series for that virtual sensor?

@mmagnuski @agramfort

The stc object contains data for all source vertices, you have to first locate the vertex (or group of vertices) that you find interesting and then you can obtain the data from the object. The easiest way to obtain time courses is to get them for labels of interest, take a look at this example.
If anatomical labels are not interesting to you it is also possible to create a label based on activity, see this example.

@mmagnuski @agramfort Could you elaborate more on how I save the time series information, lets say for this location(in blue as shown in the figure)? Do I need the MNI Coordinates? How do I create a label for this location?

Note: the blue dot is not the location of peak activity but is my region of interest.

I think that in the new 3d plotters you can obtain the vertex id when clicking on the brain (I don’t remember how/what shortcut) and then use it to get the relevant row from you SourceEstimate object. @larsoner should be able to give you more details.
But once you know the vertex you can look for it in .vertices attribute and then use the obtained index to address the first dimension of .data array. This will give you a time series for that vertex.

Any mouse click (without drag) when using show_traces=True, time_viewer=True should work

1 Like