How can I obtain the device independent signal from SSS as desribed in Presentation of electromagnetic multichannel data: The signal space separation method - Section V Applications of SSS - Subsection B. Virtual signals and movement correction.
To be clear, I am not interested in movement correction, since the subjects head position is not monitored over time. (Head position and size is only roughly given by NAS, LPA, RPA and 2 points at the forehead.)
What I am interested in is the question: How can I compute equation 39 in the paper:
\phi_v = S_{v,in}\hat{x}_{in}
If I understand the documentation for maxwell_filter correctly then the method returns device dependent signals as given by eq. 38
\hat{\phi}_{in} = S_{in} \hat{x}_{in}
Background: I want to classify subjects into 3 classes. MEG data was recorded on 2 sites. One class (lets call it y3) was almost completly recorded on one site and the feature extraction/ classifier (CNN) is able to perfectly distinguish the recording sites which means that the classifier might not learn the typcial features for class y3.
Any reason you don’t want to operate on \hat{x}_{in} directly?
Either way, S_{in} (and its pseudoinverse, which is used to estimate \hat{x}_{in}) can be obtained with the use of some private functions in mne.preprocessing.maxwell, but it would be good to perhaps make a version public so you could actually have a stable API.
Theoretically \hat{x}_{in} has same information as \hat{\phi}_{in} but the current classifier was developed for sensor signals and I don’t know how it will perform on multipole moments.
In order to have a comparison my supervisor recommended to look for other methods which allow the transformation of MEG data from one device to another. I found Knösche 2002 but that was before SSS was published. Does MNE provide any methods for transforming data between similar MEG devices?
Fieldtrip has a method called ft_apply_montage for synthetic gradients – whatever that is.
For future readers this is the algorithm without respecting bad channels:
I’m not sure if it’s the same algorithm (can’t remember the details and don’t know that 2002 paper) but you can use _map_meg_or_eeg_channelsbut keep in mind the API is not stable or guaranteed because it’s currently private:
If you want to use this code for example in a publication we should come up with some public API for it.