Rsa-toolbox Searchlight

Hey everyone,

I’ve run searchlight using rsa-toolbox. Since it’s my first time with SL & rsa-toolbox, I try to stick to order in the demo recipe script included in the toolbox. I need a help of someone who knows the toolbox to help me establish what exactly the functions need.
I have the subject rMaps per model etc., however I want to concatenate across the subjects. Here is the part of the demo code where I get lost on what those two functions actually need:

  1. rsa.util.map2vol(anatVol) - Demo loads in here an array of anatomy file, but is this a template or normalised T1 file?
  2. *rsa.fmri.addBinaryMapToVol(brainVol,Mask.mask,[0 1 0]); - apparently it needs a statistical map as a 3D array of double-precision floats. But I’m not sure it’s that the mask searchlight output for each subject?

Any help will be greatly appreciated!
Best,
Izabela

Demo code (it’s called DEMO4 in the toolbox):

 % display the location where the effect was inserted (in green):
    brainVol = rsa.fmri.addRoiToVol(rsa.util.map2vol(anatVol),rsa.util.mask2roi(mask),[1 0 0],2);
    brainVol_effectLoc = rsa.fmri.addBinaryMapToVol(brainVol,Mask.*mask,[0 1 0]);
    rsa.fig.showVol(brainVol_effectLoc,'simulated effect [green]',2);
    rsa.fig.handleCurrentFigure([returnHere,filesep,'DEMO4',filesep,'results_DEMO4_simulatedEffectRegion'],userOptions);
    
    % display the FDR-thresholded maps on a sample anatomy (signed rank test) :
    brainVol = rsa.fmri.addRoiToVol(rsa.util.map2vol(anatVol),rsa.util.mask2roi(mask),[1 0 0],2);
    brainVol_sr = rsa.fmri.addBinaryMapToVol(brainVol,supraThreshMarked_sr.*mask,[1 1 0]);
    rsa.fig.showVol(brainVol_sr,'signrank, E(FDR) < .05',3)
    rsa.fig.handleCurrentFigure([returnHere,filesep,'DEMO4',filesep,'results_DEMO4_signRank'],userOptions);
    
    % display the FDR-thresholded maps on a sample anatomy (t-test) :
    brainVol = rsa.fmri.addRoiToVol(rsa.util.map2vol(anatVol),rsa.util.mask2roi(mask),[1 0 0],2);
    brainVol_t = rsa.fmri.addBinaryMapToVol(brainVol,supraThreshMarked_t.*mask,[1 1 0]);
    rsa.fig.showVol(brainVol_t,'t-test, E(FDR) < .05',4)
    rsa.fig.handleCurrentFigure([returnHere,filesep,'DEMO4',filesep,'results_DEMO4_tTest'],userOptions);