wmvanvliet/mne-rsa

Question about setting the spatial radius

anapesquita opened this issue · 1 comments

Hello,

Thank you for developing this library. I am considering using it to analyze MEG data (recorded using the MEGIN system).

I see in the API that the spatial radius should be set in meters.
"spatial_radius floats | None
The spatial radius of the searchlight patch in meters. All sensors within this radius will belong to the searchlight patch. Set to None to only perform the searchlight over time, flattening across sensors. Defaults to 0.04."

But later in one the example Plot 'sensor-level DSMs' the spatial radius is set to 45 (I am guessing this is not 45 meters)
"# This will create a generator for the DSMs
dsms = mne_rsa.dsm_epochs(
epochs, # The EEG data
dist_metric='correlation', # Metric to compute the EEG DSMs
spatial_radius=45, # Spatial radius of the searchlight patch
temporal_radius=None, # Perform only spatial searchlight
tmin=0.15, tmax=0.25, # To save time, only analyze this time interval
)"

I am not sure how to set the spatial radius for the MEGIN system. Is there a way to see which sensors are included within each searchlight?

Many thanks in advance for any information and tips in using the library!

Ana P

the spatial radius is indeed given in meters. The reason that in the example, the value is given in centimeters is that in the example EEG dataset they recorded the sensor positions wrong in the datafile. I have added some clarifying text to the example. If you are using the MEGIN system, sensor positions should be stored correctly as meters in the
.info portion of the datafile, and hence the spatial radius should be given in meters.

You can check the indices of the channels included in the searchlight patches by directly using the searchlight() function:
https://users.aalto.fi/~vanvlm1/mne-rsa/functions/mne_rsa.searchlight.html. This function returns a generator of searchlight patches. Each searchlight patch is a tuple indicating the channels and times included in the searchlight patch. Channels are typically a list of channel indices, whereas times are a slice object.