Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jesse Heckman
pbtoolbox
Commits
8b26590c
Commit
8b26590c
authored
Jan 30, 2019
by
Jesse Heckman
Browse files
vPrime/sound
parent
503c4d54
Changes
6
Hide whitespace changes
Inline
Side-by-side
setups/vestibular chair/vPrime/cfg/HumanNH.cfg
→
setups/vestibular chair/vPrime/cfg/
data/
HumanNH.cfg
View file @
8b26590c
File moved
setups/vestibular chair/vPrime/cfg/pb_getblock.m
View file @
8b26590c
...
...
@@ -7,28 +7,46 @@ function handles = pb_getblock(handles)
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
%% INITIALIZE
% Get handles and read experiment.
cfg
=
handles
.
cfg
;
[
block
,
cfg
]
=
pb_vReadExp
(
cfg
);
%% CFG file
cfg
.
cfgfname
=
which
(
'HumanNH.cfg'
);
cfg
=
pb_vReadCFG
(
cfg
);
% read cfg cfile
cfg
.
acqdur
=
cfg
.
humanv1
.
ADC
(
1
)
.
samples
/
cfg
.
humanv1
.
ADC
(
1
)
.
rate
*
1000
;
% TODO: HumanV1/duration of data acquisition (ms)
cfg
.
nsamples
=
round
(
cfg
.
acqdur
/
1000
*
cfg
.
RZ6Fs
);
% length data acquisition (samples)
cfg
.
nchan
=
3
;
%% FILTER PARAMETERS
% Will select the appriopriate filter setting for GWN sounds, default is expname else
% soundParameters.mat is loaded.
fn
=
fullfile
(
cfg
.
expdir
,
cfg
.
expfname
);
fn
=
fcheckext
(
fn
,
'mat'
);
par
=
'parameters'
;
if
exist
(
fn
,
'file'
)
load
(
fn
,
par
);
else
load
(
which
(
'soundParameters.mat'
),
par
)
end
cfg
.
parameters
=
parameters
;
%% CFG FILE
% Will extract the correct cfg settings. Current default is set to
% HumanNH.cfg.
%% Correct Block
block
=
pb_vPrimeZ
(
block
,
cfg
);
cfg
.
cfgfname
=
which
(
'HumanNH.cfg'
);
cfg
=
pb_vReadCFG
(
cfg
);
% read cfg cfile
cfg
.
acqdur
=
cfg
.
humanv1
.
ADC
(
1
)
.
samples
/
cfg
.
humanv1
.
ADC
(
1
)
.
rate
*
1000
;
% TODO: HumanV1/duration of data acquisition (ms)
cfg
.
nsamples
=
round
(
cfg
.
acqdur
/
1000
*
cfg
.
RZ6Fs
);
% length data acquisition (samples)
cfg
.
nchan
=
3
;
%%
Timing
cfg
.
trialdur
=
getdurations
(
block
);
% sets trialdur
%%
CHECK-OUT
% Define trial duration, correct stimulus positions, and store handles.
handles
.
block
=
block
;
handles
.
cfg
=
cfg
;
cfg
.
trialdur
=
getdurations
(
block
);
handles
.
block
=
pb_vPrimeZ
(
block
,
cfg
);
handles
.
cfg
=
cfg
;
end
function
td
=
getdurations
(
block
)
%
e
xtracts trial and block dur
%
E
xtracts trial and block dur
stimarr
=
[];
blocksz
=
length
(
block
);
...
...
setups/vestibular chair/vPrime/cfg/pb_vPrimeZ.m
View file @
8b26590c
...
...
@@ -24,7 +24,6 @@ function block = pb_vPrimeZ(block,cfg)
block
(
iBlck
)
.
trial
(
iTrl
)
.
stim
(
iStm
)
.
Z
=
ZI
;
block
(
iBlck
)
.
trial
(
iTrl
)
.
stim
(
iStm
)
.
azimuth
=
cfg
.
lookup
(
ZI
+
1
,
4
);
block
(
iBlck
)
.
trial
(
iTrl
)
.
stim
(
iStm
)
.
elevation
=
cfg
.
lookup
(
ZI
+
1
,
5
);
end
end
end
...
...
setups/vestibular chair/vPrime/core/experiment/block/trial/pb_vSetSound.m
View file @
8b26590c
...
...
@@ -49,5 +49,3 @@ end
% Written by: Jesse J. Heckman (2018) %
% %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
a
\ No newline at end of file
setups/vestibular chair/vPrime/core/experiment/block/trial/pb_vSetupTrial.m
View file @
8b26590c
...
...
@@ -8,7 +8,7 @@ function [stim, cfg] = pb_vSetupTrial(stim,cfg)
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
%% S
et
TDT
parameters
%% S
ET
TDT
PARAMETERS
selled
=
strcmpi
({
stim
.
modality
},
'LED'
);
selsnd
=
strcmpi
({
stim
.
modality
},
'sound'
);
...
...
@@ -57,7 +57,7 @@ function [stim, cfg] = pb_vSetupTrial(stim,cfg)
stim
(
find
(
selled
,
1
))
.
ledhandle
.
write
(
s
);
end
%% S
ound
%% S
OUND
if
any
(
selsnd
)
snd
=
stim
(
selsnd
);
...
...
@@ -78,7 +78,7 @@ function [stim, cfg] = pb_vSetupTrial(stim,cfg)
end
cfg
.
maxSamples
=
maxSamples
;
%% W
ait
%% W
AIT
ev
=
stim
.
offevent
;
de
=
stim
.
offdelay
;
...
...
setups/vestibular chair/vPrime/sound/soundParameters.mat
0 → 100644
View file @
8b26590c
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment