algorithm/vol_tools.py
def mvpa_space_sph2sph(self, voxloc1, voxloc2, radius = [2,2,2]):
        """
        MVPA method for correlation between sphere to sphere
        ---------------------------------------------
        Parameters:
            voxloc1, voxloc2: voxel location, used for generate spheres
            radius: sphere radius
        Output:
            r: correlation coefficient of signals between two spheres
            p: significant level
        """
        assert np.ndim(self._imgdata) == 3, "Dimension of inputdata, imgdata, should be 3 in space mvpa"
        sphereroi1, _ = sphere_roi(voxloc1, radius, 1, datashape = self._imgshape)
        signals1 = get_signals(self._imgdata, sphereroi1, 'voxel')[0]
        sphereroi2, _ = sphere_roi(voxloc2, radius, 1, datashape = self._imgshape)
        signals2 = get_signals(self._imgdata, sphereroi2, 'voxel')[0]
        r, p = stats.pearsonr(signals1, signals2)        
        return r, p

        MVPA method for correlation between sphere to sphere
        ---------------------------------------------
        Parameters:
            voxloc1, voxloc2: voxel location, used for generate spheres
            radius: sphere radius
        Output:
            r: correlation coefficient of signals between two spheres
            p: significant level
        
MVPA method for correlation between sphere to sphere
MVPA method for correlation between sphere to sphere
def mvpa_space_sph2sph(self, voxloc1, voxloc2, radius = [2,2,2]):
        assert np.ndim(self._imgdata) == 3, "Dimension of inputdata, imgdata, should be 3 in space mvpa"
        sphereroi1, _ = sphere_roi(voxloc1, radius, 1, datashape = self._imgshape)
        signals1 = get_signals(self._imgdata, sphereroi1, 'voxel')[0]
        sphereroi2, _ = sphere_roi(voxloc2, radius, 1, datashape = self._imgshape)
        signals2 = get_signals(self._imgdata, sphereroi2, 'voxel')[0]
        r, p = stats.pearsonr(signals1, signals2)        
        return r, p
def mvpa_space_sph2sph ( self , voxloc1 , voxloc2 , radius = [ 2 , 2 , 2 ] ) : assert np . ndim ( self . _imgdata ) == 3 , "Dimension of inputdata, imgdata, should be 3 in space mvpa" sphereroi1 , _ = sphere_roi ( voxloc1 , radius , 1 , datashape = self . _imgshape ) signals1 = get_signals ( self . _imgdata , sphereroi1 , 'voxel' ) [ 0 ] sphereroi2 , _ = sphere_roi ( voxloc2 , radius , 1 , datashape = self . _imgshape ) signals2 = get_signals ( self . _imgdata , sphereroi2 , 'voxel' ) [ 0 ] r , p = stats . pearsonr ( signals1 , signals2 ) return r , p
MVPA method for correlation between sphere to sphere
MVPA method for correlation between sphere to sphere
"""
        MVPA method for correlation between sphere to sphere
        ---------------------------------------------
        Parameters:
            voxloc1, voxloc2: voxel location, used for generate spheres
            radius: sphere radius
        Output:
            r: correlation coefficient of signals between two spheres
            p: significant level
        """
self
voxloc1
voxloc2
radius
None
voxloc1, voxloc2
voxel location, used for generate spheres
voxel location used for generate spheres