Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
Clearer comments in prepare_inputs_polar_samsrf.m and improved plotting
in spm_prf_editor.m
  • Loading branch information
pzeidman committed Dec 2, 2016
1 parent f91e9ae commit dd0a875
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
local/
GLM/
example_3T/scripts/onsets.mat

Expand Down
13 changes: 10 additions & 3 deletions example_3T/scripts/prepare_inputs_polar_samsrf.m
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
function U = prepare_inputs_polar_samsrf(ApFrm,TR)
% Returns coordinates of pixels of the screen stimulated at each time point
% Produces the input structure needed for spm_prf_analyse() given a 3D
% stimuli matrix with dimensions [x,y,t].
%
% P - [x,y,t] matrix
% Inputs:
%
% ApFrm - [x,y,t] binary matrix indiciating which pixel locations
% were illuminated at each time point t
% TR - Scanner repetition time (TR)
% num_session - Which session to use
%
% Returns:
%
% U - Input structure to feed to spm_prf_analyse.m

% Settings
nmicrotime = 16; % Bins per TR
Expand Down
4 changes: 3 additions & 1 deletion toolbox/spm_prf_editor.m
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ function display_PRF(varargin)

% List X,Y stimulus coordinates
pmax = PRF.M.pmax;
x_bins = -(pmax/2):(pmax/2);
x_bins = -(pmax/2):0.1:(pmax/2);
y_bins = x_bins;
b = length(x_bins);
[x2,y2] = meshgrid(x_bins,y_bins);
Expand All @@ -365,6 +365,7 @@ function display_PRF(varargin)
cla;
h = imagesc(z_post);
axis square;
colormap jet;
colorbar;
if ~isempty(mask), set(h,'AlphaData',mask); end
title('PRF','FontSize',16);
Expand All @@ -385,6 +386,7 @@ function display_PRF(varargin)
h = imagesc(pd);
title('PRF with uncertainty','FontSize',16);
axis square;
colormap jet;
colorbar;
if ~isempty(mask), set(h,'AlphaData',mask); end
set(gca,'YDir','normal','XTick',1:10:b,'YTick',1:10:b);
Expand Down

0 comments on commit dd0a875

Please sign in to comment.