Skip to content

Commit

Permalink
Updated some files required for running phase-encoded and pRF analyse…
Browse files Browse the repository at this point in the history
…s in BrainVoyager.

Signed-off-by: ban.hiroshi <[email protected]>
  • Loading branch information
hiroshiban committed May 16, 2019
1 parent f18b60a commit 1d901b1
Show file tree
Hide file tree
Showing 52 changed files with 754 additions and 23 deletions.
6 changes: 3 additions & 3 deletions pRF/README.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
******************************
README on pRF

Created : "Feb 27 2012 20:34:02 ban"
Last Update: "Feb 27 2012 20:34:02 ban"
Created : "2019-05-16 14:48:15 ban"
Last Update: "2019-05-16 14:48:24 ban"
******************************

The files & data in this directory are sample scripts to run pRF analysis in BrainVoyager
The files in this directory are for running pRF and phase-encoded analyses in BrainVoyager (BrainInnovation, Inc).
20 changes: 20 additions & 0 deletions pRF/olt/pRF_corr_BVQX_hbtools.olt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Color1: 255 0 0
Color2: 255 29 0
Color3: 255 57 0
Color4: 255 85 0
Color5: 255 114 0
Color6: 255 142 0
Color7: 255 170 0
Color8: 255 199 0
Color9: 255 227 0
Color10: 255 255 0
Color11: 255 0 255
Color12: 227 0 255
Color13: 199 0 255
Color14: 170 0 255
Color15: 142 0 255
Color16: 114 0 255
Color17: 85 0 255
Color18: 57 0 255
Color19: 29 0 255
Color20: 0 0 255
20 changes: 20 additions & 0 deletions pRF/olt/pRF_eccentricity_BVQX_hbtools.olt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Color1: 255 54 0
Color2: 255 227 0
Color3: 152 255 0
Color4: 7 255 5
Color5: 0 255 137
Color6: 0 245 255
Color7: 0 100 255
Color8: 23 0 255
Color9: 189 0 255
Color10: 255 0 203
Color11: 255 54 0
Color12: 255 227 0
Color13: 152 255 0
Color14: 7 255 5
Color15: 0 255 137
Color16: 0 245 255
Color17: 0 100 255
Color18: 23 0 255
Color19: 189 0 255
Color20: 255 0 203
20 changes: 20 additions & 0 deletions pRF/olt/pRF_hot_cool_BVQX_hbtools.olt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Color1: 255 0 0
Color2: 255 29 0
Color3: 255 57 0
Color4: 255 85 0
Color5: 255 114 0
Color6: 255 142 0
Color7: 255 170 0
Color8: 255 199 0
Color9: 255 227 0
Color10: 255 255 0
Color11: 0 0 255
Color12: 0 29 255
Color13: 0 57 255
Color14: 0 85 255
Color15: 0 114 255
Color16: 0 142 255
Color17: 0 170 255
Color18: 0 199 255
Color19: 0 227 255
Color20: 0 255 255
20 changes: 20 additions & 0 deletions pRF/olt/pRF_polar_BVQX_hbtools.olt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Color1: 0 246 252
Color2: 0 99 255
Color3: 24 0 255
Color4: 190 0 255
Color5: 255 0 200
Color6: 255 0 200
Color7: 190 0 255
Color8: 24 0 255
Color9: 0 99 255
Color10: 0 245 255
Color11: 0 255 138
Color12: 7 255 5
Color13: 154 255 0
Color14: 255 227 0
Color15: 255 53 0
Color16: 255 53 0
Color17: 255 227 0
Color18: 154 255 0
Color19: 7 255 6
Color20: 0 255 142
20 changes: 20 additions & 0 deletions pRF/olt/pRF_sigma_BVQX_hbtools.olt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Color1: 15 9 6
Color2: 48 30 19
Color3: 80 50 32
Color4: 112 70 45
Color5: 144 90 58
Color6: 176 110 70
Color7: 208 130 83
Color8: 240 150 96
Color9: 255 170 109
Color10: 255 191 122
Color11: 15 9 6
Color12: 48 30 19
Color13: 80 50 32
Color14: 112 70 45
Color15: 144 90 58
Color16: 176 110 70
Color17: 208 130 83
Color18: 240 150 96
Color19: 255 170 109
Color20: 255 191 122
20 changes: 20 additions & 0 deletions pRF/olt/pRF_standard_BVQX_hbtools.olt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Color1: 255 75 0
Color2: 255 95 0
Color3: 255 115 0
Color4: 255 135 0
Color5: 255 155 0
Color6: 255 175 0
Color7: 255 195 0
Color8: 255 215 0
Color9: 255 235 0
Color10: 255 255 0
Color11: 0 75 255
Color12: 0 95 235
Color13: 0 115 215
Color14: 0 135 195
Color15: 0 155 175
Color16: 0 175 155
Color17: 0 195 135
Color18: 0 215 115
Color19: 0 235 95
Color20: 0 255 75
20 changes: 0 additions & 20 deletions pRF/olt/phase_encoded_colors.olt

This file was deleted.

130 changes: 130 additions & 0 deletions pRF/olt/script_generate_OLTs_for_pRF_maps.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
% script_generate_OLTs_for_pRF_maps.m
%
% a simple script to generate BrainVoyager color lookup tables (*.olt)
% for visualizing pRF and the other statistical mapping results
%
%
% Created : "2018-08-31 09:47:37 ban"
% Last Update: "2018-09-04 17:14:42 ban"

cv_hbtools_BVQX_setup(1);

% constants
nLUT=20; % default #LUT of BrainVoyager

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% colormap for pRF eccentricity representation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

lut_pRF_rho=ceil(255.*imresize(generate_colormap_BrainFactory(360,64,-90,1,0,0,0),[nLUT/2,3]));
%lut_pRF_rho=lut_pRF_rho([3:nLUT/2,1:2],:);
lut_pRF_rho(lut_pRF_rho<0)=0; lut_pRF_rho(lut_pRF_rho>255)=255;
lut_pRF_rho=flip(lut_pRF_rho,1);

fid=fopen('pRF_eccentricity_BVQX_hbtools.olt','w');
for ii=1:1:nLUT/2
fprintf(fid,sprintf('Color%d: % 3d % 3d % 3d\n',ii,lut_pRF_rho(ii,1),lut_pRF_rho(ii,2),lut_pRF_rho(ii,3)));
end
for ii=1:1:nLUT/2
fprintf(fid,sprintf('Color%d: % 3d % 3d % 3d\n',ii+nLUT/2,lut_pRF_rho(ii,1),lut_pRF_rho(ii,2),lut_pRF_rho(ii,3)));
end
fclose(fid);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% colormap for pRF polar-angle representation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

lut_pol=ceil(255.*imresize(generate_colormap_BrainFactory(360,64,0,2,0,0,0),[nLUT,3]));
lut_pol(lut_pol<0)=0; lut_pol(lut_pol>255)=255;

fid=fopen('pRF_polar_BVQX_hbtools.olt','w');
for ii=1:1:size(lut_pol,1)
fprintf(fid,sprintf('Color%d: % 3d % 3d % 3d\n',ii,lut_pol(ii,1),lut_pol(ii,2),lut_pol(ii,3)));
end
fclose(fid);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% colormap for amplitude etc (hot_cool)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

lut_hot=zeros(nLUT,3);
lut_hot(1:1:nLUT/2,1)=255;
lut_hot(1:1:nLUT/2,2)=ceil(linspace(0,255,nLUT/2));
lut_hot(1:1:nLUT/2,3)=0;
lut_hot(nLUT/2+1:1:nLUT,1)=0;
lut_hot(nLUT/2+1:1:nLUT,2)=ceil(linspace(0,255,nLUT/2));
lut_hot(nLUT/2+1:1:nLUT,3)=255;

fid=fopen('pRF_hot_cool_BVQX_hbtools.olt','w');
for ii=1:1:size(lut_hot,1)
fprintf(fid,sprintf('Color%d: % 3d % 3d % 3d\n',ii,lut_hot(ii,1),lut_hot(ii,2),lut_hot(ii,3)));
end
fclose(fid);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% colormap for correlation etc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%lut_corr=load(fullfile(fileparts(mfilename('fullpath')),'..','lut','corr.lut'));
%lut_corr=ceil(255.*imresize(lut_corr(:,1:3),[nLUT,3]));
%lut_corr(lut_corr<0)=0; lut_corr(lut_corr>255)=255;

lut_corr(1:1:nLUT/2,1:3)=ceil([255*ones(nLUT/2,1),linspace(0,255,nLUT/2)',zeros(nLUT/2,1)]);
lut_corr(nLUT/2+1:1:nLUT,1:3)=ceil([linspace(255,0,nLUT/2)',zeros(nLUT/2,1),255*ones(nLUT/2,1)]);
lut_corr(lut_corr<0)=0; lut_corr(lut_corr>255)=255;

fid=fopen('pRF_corr_BVQX_hbtools.olt','w');
for ii=1:1:size(lut_corr,1)
fprintf(fid,sprintf('Color%d: % 3d % 3d % 3d\n',ii,lut_corr(ii,1),lut_corr(ii,2),lut_corr(ii,3)));
end
fclose(fid);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% colormap for sigma
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

lut_sigma=load(fullfile(fileparts(mfilename('fullpath')),'..','lut','sigma.lut'));
lut_sigma=ceil(255.*imresize(lut_sigma(:,1:3),[nLUT/2,3]));
lut_sigma(lut_sigma<0)=0; lut_sigma(lut_sigma>255)=255;
%lut_sigma(nLUT/2+1:nLUT,:)=lut_sigma(nLUT/2:-1:1,:);
lut_sigma=[lut_sigma;lut_sigma];

fid=fopen('pRF_sigma_BVQX_hbtools.olt','w');
for ii=1:1:size(lut_sigma,1)
fprintf(fid,sprintf('Color%d: % 3d % 3d % 3d\n',ii,lut_sigma(ii,1),lut_sigma(ii,2),lut_sigma(ii,3)));
end
fclose(fid);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% colormap for standard maps (BrainVoyager default)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

lut_standard=[
255 75 0;
255 95 0;
255 115 0;
255 135 0;
255 155 0;
255 175 0;
255 195 0;
255 215 0;
255 235 0;
255 255 0;
0 75 255;
0 95 235;
0 115 215;
0 135 195;
0 155 175;
0 175 155;
0 195 135;
0 215 115;
0 235 95;
0 255 75];

fid=fopen('pRF_standard_BVQX_hbtools.olt','w');
for ii=1:1:size(lut_standard,1)
fprintf(fid,sprintf('Color%d: % 3d % 3d % 3d\n',ii,lut_standard(ii,1),lut_standard(ii,2),lut_standard(ii,3)));
end
fclose(fid);

cv_hbtools_BVQX_setup(0);
70 changes: 70 additions & 0 deletions pRF/prt/bar.prt
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@

FileVersion: 2

ResolutionOfTime: Volumes

Experiment: pRF bar

BackgroundColor: 0 0 0
TextColor: 255 255 255
TimeCourseColor: 192 192 192
TimeCourseThick: 2
ReferenceFuncColor: 0 0 80
ReferenceFuncThick: 2

NrOfConditions: 9

Fix
10
1 2
19 22
39 42
59 62
79 82
99 102
119 122
139 142
159 162
179 184
Color: 195 195 195

stim1
2
3 18
163 178
Color: 255 0 191

stim2
1
23 38
Color: 127 0 255

stim3
1
43 58
Color: 0 63 255

stim4
1
63 78
Color: 0 255 255

stim5
1
83 98
Color: 0 255 63

stim6
1
103 118
Color: 127 255 0

stim7
1
123 138
Color: 255 191 0

stim8
1
143 158
Color: 255 0 0
Loading

0 comments on commit 1d901b1

Please sign in to comment.