MEG and fMRI code from STF