Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
6d018fc
Initial gitignore to prevent tracking of autosaves and OSX .DS_Store …
caiw Mar 2, 2015
5ce3d21
Move Engine and Module files to +rsa/ directory.
caiw Mar 3, 2015
7a6d4cd
Add import rsa.* to module functions.
caiw Mar 3, 2015
fa13425
Add "import rsa.*" to all Engine functions inside the toolbox.
caiw Mar 3, 2015
816d329
End all functions.
caiw Mar 3, 2015
dcc4904
Move files to +core/ since matlab packages don't support subdirectori…
caiw Mar 3, 2015
a63446f
Also import rsa.core.*.
caiw Mar 3, 2015
df20a27
Address rsa toolbox functions.
caiw Mar 3, 2015
93e7f05
Move and re-address bundled spm functions.
caiw Mar 3, 2015
39cd908
Address rsa toolbox functions.
caiw Mar 3, 2015
4a6f68e
Figures are now classes, so they don't auto-cast to ints or logicals.…
caiw Mar 3, 2015
397f5a0
The command `opengl software` doesn't work on the Mac version. In ea…
caiw Mar 3, 2015
51f7e6f
Sub-package structure.
caiw Mar 3, 2015
9da52d0
Update necessary sub-package includes.
caiw Mar 3, 2015
d922a0b
Update addresses to subpackages.
caiw Mar 3, 2015
d5f62c6
I missed some import and addressing changes... somehow?
caiw Mar 3, 2015
1842bbf
Ignore `*.bak` backup files created by WinMerge.
caiw Mar 5, 2015
3329661
Merge branch 'develop' into move-to-package-structure
caiw Mar 5, 2015
8b4034d
Merge pull request #4 from rsagroup/move-to-package-structure
caiw Mar 16, 2015
ff13222
Merge branch 'develop' into matlab-r2104a-compatibility
caiw Mar 16, 2015
7d42e13
Utility function to deal with User Options flexibily
jdiedrichsen Jun 18, 2015
5b938de
Merge branch 'dealWithuserOptions' into develop
jdiedrichsen Jun 21, 2015
4b0a279
Merge pull request #5 from rsagroup/dealWithuserOptions
caiw Jun 24, 2015
2d0e260
Alternative to figureRDM command - input argument handling is
jdiedrichsen Jul 10, 2015
35f6377
Basic component models
jdiedrichsen Jul 31, 2015
90019bd
Merge branch 'modelFitting' into develop
jdiedrichsen Jul 31, 2015
268edf4
Merge remote-tracking branch 'origin/develop' into develop
jdiedrichsen Jul 31, 2015
749a27e
Searchlight toolbox
Aug 30, 2015
ecad731
imageRDM data structures
jdiedrichsen Oct 2, 2015
8c5c701
Merge pull request #6 from rsagroup/searchlights
nejaz1 Oct 23, 2015
fe2cb46
Small changes to fitting OLS
jdiedrichsen Oct 12, 2015
2199c42
The value of `y` was not being set in case there were no significant …
caiw Oct 26, 2015
f36789b
Prewhitening improvements
jdiedrichsen Nov 20, 2015
93ac455
Extended functionality of distanceLDC
jdiedrichsen Dec 3, 2015
7454639
Searchlight code updated
jdiedrichsen Jan 11, 2016
893e7a6
Smaller bug fixes and faster pairMatrix
jdiedrichsen Mar 18, 2016
a3e1efa
small compatibility changes
jdiedrichsen May 24, 2016
ff5c51c
pure date change on files
jdiedrichsen Jul 9, 2016
c8d2d09
Implementation of variance of LDC prediction (see Diedrichsen el al..…
jdiedrichsen Jul 10, 2016
b8f46f5
crossvalidated estimate of IPM
jdiedrichsen Jul 11, 2016
b67d4df
runSearchlightLDC
jdiedrichsen Jul 26, 2016
f71f749
Merge pull request #3 from rsagroup/matlab-r2104a-compatibility
iancharest Mar 14, 2017
445e8c6
Merge pull request #8 from rsagroup/issue7-comparison-bar-bug
iancharest Mar 14, 2017
1b9917d
Include missing exhaustivePermutations file.
caiw May 14, 2017
e33338f
Merge pull request #19 from rsagroup/exhaustivePermutations
caiw Sep 11, 2017
98da237
minor searchight bug-fixes
nejaz1 Oct 11, 2017
786d8f2
Added markdown documentation for RSA toolbox 2.0
nejaz1 Nov 17, 2017
c6a7bec
Fixed bootstrap tests, smoothed out a few minor bugs in compareRefRDM…
mmbannert Jan 28, 2018
c1b800b
Whoops! Forgot to add ...
mmbannert Jan 28, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Engines/RDMcolormap.m → +rsa/+fig/RDMcolormap.m
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
%__________________________________________________________________________
% Copyright (C) 2012 Medical Research Council

import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*

nCols = 256;
%% blue-cyan-gray-red-yellow with increasing V (BCGRYincV)
anchorCols=[0 0 1
Expand All @@ -26,4 +35,6 @@
% figure(1); colormap(cols);
% cm=colormap; hsvcm=rgb2hsv(cm);
% subplot(3,1,3); cla; plot(brightness(colormap),'r'); hold on; plot(hsvcm(:,3),'k'); axis tight; legend({'brightness','V'});
% th=addHeading('blue-cyan-gray-red-yellow with increasing V');
% th=addHeading('blue-cyan-gray-red-yellow with increasing V');

end%function
52 changes: 52 additions & 0 deletions +rsa/+fig/addComparisonBars.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
% this function adds the pairwise copmparison bars to a figure; the 'hold on'
% should have been set before executing this function

% pairWisePs: an nxn pairwise comparison matrix. This is supposed to be
% sorted in descending order of average values (large to small heights)
% a horizontal bar would be displayed whenever the (one-sided) comparison
% reaches a threshold.
% HN, May 2013
%__________________________________________________________________________
% Copyright (C) 2012 Medical Research Council

function y = addComparisonBars(pairwisePs,cYMax,threshold)

import rsa.*
import rsa.fig.*
import rsa.rdm.*
import rsa.stat.*
import rsa.util.*


nTestRDMs = size(pairwisePs,1);
eachLineHeight = 0.03;

padding = 2;

% Set `y` here in case no comparisons are significant.
y = cYMax;


nSignificantComparison = 0;
pairwiseI = 0;
for i = 1:nTestRDMs
for j = i+1:nTestRDMs

% The p value for i (the lower bar) being significantly smaller than j (the higher bar) is the p value for j being significantly higher than i. This is pairwisePs(j,i) (the lt?)
thisPairwiseP = pairwisePs(i,j);

if thisPairwiseP <= threshold
y = cYMax;
pairwiseI = pairwiseI + 1;
xx = [i j];

y = y + (cYMax * eachLineHeight * padding / 2); %padding
y = y + (pairwiseI * eachLineHeight * cYMax); %line separation
yy = [y y];
line(xx, yy, 'LineStyle', '-', 'LineWidth', 2, 'Marker', 'none', 'Color', [0 0 0]);
nSignificantComparison = nSignificantComparison + 1;

end%if
end%for:j
end%for:i
end%function
16 changes: 15 additions & 1 deletion Engines/addHeading.m → +rsa/+fig/addHeading.m
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ function addHeading(heading,figI,x,y)
% adds a heading to a figure. The user also has the option of specifying
% the location of the inserted heading text.

import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*

% replace underscores
if iscell(heading)
for lineI=1:numel(heading)
Expand All @@ -13,7 +22,10 @@ function addHeading(heading,figI,x,y)
heading(heading==95)='-';
end

if ~exist('figI','var'), figI=gcf; end
if ~exist('figI','var')
newFigure = gcf;
figI=newFigure.Number;
end
pageFigure(figI);

if ~exist('x','var'), x=1.11; end
Expand All @@ -25,3 +37,5 @@ function addHeading(heading,figI,x,y)

% add heading(s)
text(x,y,heading,'HorizontalAlignment','Right','VerticalAlignment','Top','FontSize',12,'FontWeight','bold','Color','k');

end%function
12 changes: 12 additions & 0 deletions Engines/addImageSequenceToAxes.m → +rsa/+fig/addImageSequenceToAxes.m
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ function addImageSequenceToAxes(ax,il)
% transparentCol is left out here
%__________________________________________________________________________
% Copyright (C) 2010 Medical Research Council

import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*

defaultil = struct('sequence',1:length(il.images),'nRows',2, ...
'blackdisks',false);

Expand Down Expand Up @@ -208,3 +218,5 @@ function addImageSequenceToAxes(ax,il)
oldy = get(ax,'ylim');
set(ax,'xlim',oldx * padding);
set(ax,'ylim',oldy * padding);

end%function
10 changes: 9 additions & 1 deletion Engines/colorScale.m → +rsa/+fig/colorScale.m
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
%__________________________________________________________________________
% Copyright (C) 2012 Medical Research Council

import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*

%% preparations
if ~exist('monitor','var'), monitor=false; end
Expand All @@ -20,4 +28,4 @@
imagesc(reshape(cols,[nCols 1 3]));
end


end%function
12 changes: 11 additions & 1 deletion Engines/exportCurrentFigAsPDF.m → +rsa/+fig/exportCurrentFigAsPDF.m
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ function exportCurrentFigAsPDF(filespec,userOptions)
%__________________________________________________________________________
% Copyright (C) 2009 Medical Research Council

import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*

if ~isfield(userOptions,'dpi'), userOptions.dpi = 300; end;
if ~isfield(userOptions,'tightInset'), userOptions.tightInset = false; end;
Expand All @@ -25,4 +33,6 @@ function exportCurrentFigAsPDF(filespec,userOptions)
case 3
print('-dpdf',sprintf('-r%d',userOptions.dpi),[filespec,'_',num2str(gcf)]);
print('-dpdf',sprintf('-r%d',userOptions.dpi),'-append',filespec);
end
end

end%function
13 changes: 12 additions & 1 deletion Engines/exportCurrentFigAsPostscript.m → +rsa/+fig/exportCurrentFigAsPostscript.m
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ function exportCurrentFigAsPostscript(filespec,appendFlag,userOptions)
%__________________________________________________________________________
% Copyright (C) 2010 Medical Research Council

import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*

if ~exist('filespec','var'), filespec='currentFigAsPostscript'; end;
if ~exist('appendFlag','var'), appendFlag=1; end;
if ~isfield(userOptions,'dpi'), userOptions.dpi = 300; end;
Expand All @@ -31,4 +40,6 @@ function exportCurrentFigAsPostscript(filespec,appendFlag,userOptions)
case 4
print('-dpsc2',sprintf('-r%d',userOptions.dpi),filespec);
print('-dpsc2',sprintf('-r%d',userOptions.dpi),'-append','^ALL_POSTSCRIPTS_appendFlag4');
end
end

end%function
80 changes: 80 additions & 0 deletions Engines/exportfig.m → +rsa/+fig/exportfig.m
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ function exportfig(varargin)
% text in 10 point fonts. The size of the exported figure is
% the figure's PaperPostion width and height.

import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*

if (nargin < 2)
error('Too few input arguments');
Expand Down Expand Up @@ -405,24 +413,59 @@ function exportfig(varargin)
%

function outData = LocalPushOldData(inData, objs, prop, values)
import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*
outData.objs = {inData.objs{:}, objs};
outData.prop = {inData.prop{:}, prop};
outData.values = {inData.values{:}, values};
end%function

function cellArray = LocalGetAsCell(fig,prop);
import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*
cellArray = get(fig,prop);
if (~isempty(cellArray)) & (~iscell(cellArray))
cellArray = {cellArray};
end
end%function

function newArray = LocalScale(inArray, scale, minValue)
import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*
n = length(inArray);
newArray = cell(n,1);
for k=1:n
newArray{k} = max(minValue,scale*inArray{k}(1));
end
end%function

function newArray = LocalMapToGray(inArray);
import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*
n = length(inArray);
newArray = cell(n,1);
for k=1:n
Expand Down Expand Up @@ -460,8 +503,17 @@ function exportfig(varargin)
newArray{k} = [color color color];
end
end
end%function

function newArray = LocalMapCData(inArray);
import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*
n = length(inArray);
newArray = cell(n,1);
for k=1:n
Expand All @@ -474,8 +526,17 @@ function exportfig(varargin)
end
newArray{k} = color;
end
end%function

function outData = LocalUpdateColors(inArray, prop, inData)
import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*
value = LocalGetAsCell(inArray,prop);
outData.objs = {inData.objs{:}, inArray};
outData.prop = {inData.prop{:}, {prop}};
Expand All @@ -488,13 +549,32 @@ function exportfig(varargin)
end
set(inArray,{prop},value);
end
end%function

function bool = LocalIsPositiveScalar(value)
import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*
bool = isnumeric(value) & ...
prod(size(value)) == 1 & ...
value > 0;
end%function

function value = LocalToNum(value)
import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*
if ischar(value)
value = str2num(value);
end
end%function
11 changes: 11 additions & 0 deletions Engines/figureDendrogram.m → +rsa/+fig/figureDendrogram.m
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ function figureDendrogram(RDM, userOptions, localOptions)
%__________________________________________________________________________
% Copyright (C) 2010 Medical Research Council

import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*

if ~isfield(localOptions, 'linkageType')
localOptions.linkageType = 'single';
end
Expand Down Expand Up @@ -75,3 +84,5 @@ function figureDendrogram(RDM, userOptions, localOptions)
fileName = [userOptions.analysisName '_' localOptions.fileName];
handleCurrentFigure(fileName, userOptions);
clear thisFileName

end%function
11 changes: 11 additions & 0 deletions Engines/figureMDSArrangement.m → +rsa/+fig/figureMDSArrangement.m
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ function figureMDSArrangement(RDM, userOptions, localOptions)
%__________________________________________________________________________
% Copyright (C) 2010 Medical Research Council

import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*

%% define defaults
appendFlag = 0;
% warning('off', 'IgnoringExtraEntries');
Expand Down Expand Up @@ -237,6 +246,8 @@ function figureMDSArrangement(RDM, userOptions, localOptions)
clear thisFileName
end

end%function


% %% plot MDS arrangement using category-color-coded dots
% if isfield(options,'figI_catCols')&&~isempty(options.figI_catCols) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down
Loading