Skip to content
GitLab
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
b542aa5d
Commit
b542aa5d
authored
Nov 27, 2018
by
Jesse Heckman
Browse files
updated commentaries for vPrime and fixed vs-deletion in block
parent
032cfd5f
Changes
32
Hide whitespace changes
Inline
Side-by-side
setups/vestibular chair/vPrime/cfg/pb_createdir.m
View file @
b542aa5d
function
handles
=
pb_createdir
(
handles
)
% PB_CREATEDIR
(HANDLES)
% PB_CREATEDIR
%
% PB_CREATEDIR(
HANDLES
) checks if intended data directory exists, and,
% PB_CREATEDIR(
handles
) checks if intended data directory exists, and,
% if not, makes directory. Furthermore, a quick check is done to see if
% there is already existing data in this folder to prevent loss of data.
%
...
...
setups/vestibular chair/vPrime/cfg/pb_getblock.m
View file @
b542aa5d
function
handles
=
pb_getblock
(
handles
)
% PB_GETBLOCK
(HANDLES)
% PB_GETBLOCK
%
% PB_GETBLOCK(
HANDLES
) retracts block info provided by the exp file.
% PB_GETBLOCK(
handles
) retracts block info provided by the exp file.
%
% See also PB_VPRIME, PB_VPRIMEGUI, PB_VRUNEXP.
...
...
setups/vestibular chair/vPrime/cfg/pb_gethandles.m
View file @
b542aa5d
function
handles
=
pb_gethandles
(
handles
)
% PB_GETHANDLES
(HANDLES)
% PB_GETHANDLES
%
% PB_GETHANDLES(
HANDLES
) extracts the set parameters from the GUI and stores
% PB_GETHANDLES(
handles
) extracts the set parameters from the GUI and stores
% them into your handles.
%
% See also PB_VPRIME, PB_VPRIMEGUI, PB_VRUNEXP
...
...
setups/vestibular chair/vPrime/cfg/pb_setupShow.m
View file @
b542aa5d
function
pb_setupShow
(
handles
)
% PB_SETUPSHOW
(HANDLES)
% PB_SETUPSHOW
%
% PB_SETUPSHOW(
HANDLES
) sets up axes for vPrime GUI.
% PB_SETUPSHOW(
handles
) sets up axes for vPrime GUI.
%
% See also PB_VPRIMEGUI, PB_VPRIME, PB_VRUNEXP
...
...
setups/vestibular chair/vPrime/cfg/pb_vPrimeZ.m
View file @
b542aa5d
function
block
=
pb_vPrimeZ
(
block
,
cfg
)
% PB_VPRIMEZ
(BLOCK, CFG)
% PB_VPRIMEZ
%
% PB_VPRIMEZ(
BLOCK, CFG
) adds additional fields to 'block' in order to
% PB_VPRIMEZ(
block, cfg
) adds additional fields to 'block' in order to
% allow for TDT control of correct LSCs during experimentation.
%
% See also PB_VPRIME, PB_VPRIME, PB_VRUNEXP, PB_GETBLOCK, PB_VREADEXP
...
...
setups/vestibular chair/vPrime/core/experiment/block/pb_vCreateSignal.m
View file @
b542aa5d
function
D
=
pb_vCreateSignal
(
N
,
dur
,
SR
,
freq
,
type
,
varargin
)
% PB_VCREATESIGNAL
(N, DUR, SR, FREQ, TYPE, VARARGIN)
% PB_VCREATESIGNAL
%
% PB_VCREATESIGNAL(N,
DUR
, SR,
FREQ, TYPE, VARARGIN
) creates an unscaled
% PB_VCREATESIGNAL(N,
dur
, SR,
freq, type, varargin
) creates an unscaled
% signal for the vestibular chair.
%
% See also PB_VPRIME, PB_VPRIMEGUI, PB_VRUNEXP, PB_VSIGNALVC.
...
...
setups/vestibular chair/vPrime/core/experiment/block/pb_vEndExp.m
View file @
b542aa5d
function
pb_vEndExp
% PB_VENDEXP
()
% PB_VENDEXP
%
% PB_VENDEXP
() ..
.
% PB_VENDEXP
ends experiment, displays lightshow and turns lights off
.
%
% See also
..
.
% See also
PB_VRUNEXP
.
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
...
...
setups/vestibular chair/vPrime/core/experiment/block/pb_vSignalVC.m
View file @
b542aa5d
function
[
Dat
,
profile
,
dur
]
=
pb_vSignalVC
(
handles
)
% PB_VSIGNALVC
(HANDLES)
% PB_VSIGNALVC
%
% PB_VSIGNALVC(
HANDLES
) reads vestibular signal from handles, writes
% PB_VSIGNALVC(
handles
) reads vestibular signal from handles, writes
% profile, and feeds back the signal to the axes in GUI.
%
% See also PB_VPRIME, PB_VPRIMEGUI, PB_VRUNEXP
...
...
setups/vestibular chair/vPrime/core/experiment/block/pb_vStoreBlockDat.m
View file @
b542aa5d
function
pb_vStoreBlockDat
(
cfg
,
Dat
)
% PB_VSTOREBLOCKDAT
()
% PB_VSTOREBLOCKDAT
%
% PB_VSTOREBLOCKDAT(
) ..
.
% PB_VSTOREBLOCKDAT(
cfg, Dat) stores 'Dat' Data in files
.
%
% See also
...
% See also
PB_VRUNEXP
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
...
...
setups/vestibular chair/vPrime/core/experiment/pb_vInitialize.m
View file @
b542aa5d
function
handles
=
pb_vInitialize
(
handles
,
initialize
)
% PB_VINITIALIZE
(HANDLES, INITIALIZE)
% PB_VINITIALIZE
%
% PB_VINITIALIZE(
HANDLES, INITIALIZE
) interacts with GUI and command window
% PB_VINITIALIZE(
handles, initialize
) interacts with GUI and command window
% during check in/out of experiment.
%
% See also PB_VPRIME, PB_VPRIME, PB_VRUNEXP.
...
...
setups/vestibular chair/vPrime/core/experiment/pb_vReadCFG.m
View file @
b542aa5d
function
cfg
=
pb_vReadCFG
(
cfg
)
% PB_VREADCFG
()
% PB_VREADCFG
%
% PB_VREADCFG(
) ..
.
% PB_VREADCFG(
cfg) reads cfg parameters for experiment
.
%
% See also
...
% See also
PB_VREADEXP
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
...
...
setups/vestibular chair/vPrime/core/experiment/pb_vReadExp.m
View file @
b542aa5d
function
[
block
,
cfg
]
=
pb_vReadExp
(
cfg
)
% PB_VREADEXP
(CFG)
% PB_VREADEXP
%
% PB_VREADEXP(
CFG
) reads experimental data from expfile and loads it in
% PB_VREADEXP(
cfg
) reads experimental data from expfile and loads it in
% 'block' and 'cfg'.
%
% See also PB_VPRIME, PB_VPRIMEGUI, PB_VRUNEXP, PB_GETBLOCK
...
...
@@ -10,9 +10,9 @@ function [block,cfg] = pb_vReadExp(cfg)
%% INITIALIZE
expfile
=
cfg
.
expfname
;
expfile
=
cfg
.
expfname
;
if
~
pb_fexist
(
expfile
);
return
;
end
fid
=
fopen
(
expfile
,
'r'
);
fid
=
fopen
(
expfile
,
'r'
);
%% HEADER
...
...
setups/vestibular chair/vPrime/core/experiment/trial/pb_vClearTrial.m
View file @
b542aa5d
function
cfg
=
pb_vClearTrial
(
stim
,
cfg
)
% PB_VCLEARTRIAL
(HANDLES)
% PB_VCLEARTRIAL
%
% PB_VCLEARTRIAL(
HANDLES
) empties previous trial: data, stimuli, GUI, and
% PB_VCLEARTRIAL(
stim, cfg
) empties previous trial: data, stimuli, GUI, and
% updates the command window.
%
% See also PB_VPRIME, PB_VPRIMEGUI, PB_VRUNEXP
...
...
setups/vestibular chair/vPrime/core/experiment/trial/pb_vSetupTrial.m
View file @
b542aa5d
function
[
stim
,
cfg
]
=
pb_vSetupTrial
(
stim
,
cfg
)
% PB_VSETUPTRIAL
(STIM, CFG)
% PB_VSETUPTRIAL
%
% PB_VSETUPTRIAL(
STIM, CFG
) sets up experimental parameters for Trial.
% PB_VSETUPTRIAL(
stim, cfg
) sets up experimental parameters for Trial.
%
% See also PB_VPRIME, PB_VPRIMEGUI, PB_VRUNEXP.
...
...
setups/vestibular chair/vPrime/core/experiment/trial/pb_vStoreData.m
View file @
b542aa5d
function
handles
=
pb_vStoreData
(
handles
,
data
)
% PB_VSTOREDATA
(HANDLES, DATA)
% PB_VSTOREDATA
%
% PB_VSTOREDATA(
HANDLES, DATA
) stores all the trial data and configurements
% PB_VSTOREDATA(
handles, data
) stores all the trial data and configurements
% on a trial basis in organized vc-files.
%
% See also PB_VPRIME, PB_VPRIMEGUI, PB_VRUNEXP, PB_TDTINIT
...
...
setups/vestibular chair/vPrime/core/experiment/trial/pb_vTraces.m
View file @
b542aa5d
function
pb_vTraces
(
handles
)
% PB_VTRACES
(HANDLES)
% PB_VTRACES
%
% PB_VTRACES(
HANDLES
) updates the trace velocity plots of eye and head in
% PB_VTRACES(
handles
) updates the trace velocity plots of eye and head in
% GUI.
%
% See also
..
.
% See also
PB_VRUNEXP, PB_VPRIMEGUI
.
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
...
...
setups/vestibular chair/vPrime/core/pb_vPrime.m
View file @
b542aa5d
function
pb_vPrime
()
% PB_VPRIME
()
function
pb_vPrime
% PB_VPRIME
%
% PB_VPRIME() ...
% PB_VPRIME runs the vPrime Graphic User Interface (GUI). In here you can load
% and run experiments.
%
% See also
...
% See also
PB_VPRIMEGUI, PB_VRUNEXP
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
...
...
setups/vestibular chair/vPrime/core/pb_vRunExp.m
View file @
b542aa5d
function
pb_vRunExp
(
handles
)
% PB_VRUNEXP
(HANDLES)
% PB_VRUNEXP
%
% PB_VRUNEXP(
HANDLES
) forms the core body of experimental paradigms run in
% PB_VRUNEXP(
handles
) forms the core body of experimental paradigms run in
% the VC, and will loop over the blocks and trials provided by the exp-file.
% Note that PB_VRUNEXP is called from the vPrime GUI, from which it
% receives its experimental handles.
%
% See also PB_VPRIME, PB_VPRIMEGUI.
...
...
@@ -28,7 +30,7 @@ function pb_vRunExp(handles)
% initialize recordings
rc
=
pb_runPupil
;
[
ses
,
streams
]
=
pb_runLSL
()
;
[
ses
,
streams
]
=
pb_runLSL
;
experimentTime
=
tic
;
%% START BLOCK
...
...
@@ -51,8 +53,8 @@ function pb_vRunExp(handles)
% start vestibular chair
if
~
ismac
&&
~
debug
pb_sendServo
(
profile
);
vs
=
pb_startServo
;
vs
=
pb_sendServo
(
profile
);
pb_startServo
(
vs
)
;
pause
(
6
);
blockTime
=
tic
;
% allow vestibular chair to get in sync with input signal
end
...
...
@@ -84,9 +86,8 @@ function pb_vRunExp(handles)
if
~
ismac
&&
~
debug
elapsedTime
=
toc
(
blockTime
);
if
elapsedTime
<
dur
;
pause
(
dur
-
floor
(
elapsedTime
));
end
% wait untill chair is finished running before disabling.
pb_stopServo
(
vs
);
Dat
=
pb_readServo
;
Dat
=
pb_readServo
(
vs
)
;
end
% stop recording
...
...
setups/vestibular chair/vPrime/experiment/pb_vGenVisExp.m
View file @
b542aa5d
function
pb_vGenVisExp
(
varargin
)
% PB_VGENEXP
()
% PB_VGEN
VIS
EXP
%
% PB_VGENEXP() will generate an EXP-file for a default localization experiment.
% PB_VGEN
VIS
EXP(
varargin
) will generate an EXP-file for a default localization experiment.
% EXP-files are used for the psychophysical experiments at the
% Biophysics Department of the Donders Institute for Brain, Cognition and
% Behavior of the Radboud University Nijmegen, the Netherlands.
%
% See also ... See also WRITESND, WRITELED, WRITETRG, GENWAV_DEFAULT, etc
% VESTIBULAR STIMULATION PARAMETERS:
%
% Vestibular signals: 1) none,
% 2) predict sine,
% 3) noise,
% 4) turn,
% 5) VOR-turnstop.
%
% Azimuth rotation: VER
% Elevation rotation: HOR
%
% See also WRITESND, WRITELED, WRITETRG, GENWAV_DEFAULT, etc
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
...
...
subtools/lsl/pb_runLSL.m
View file @
b542aa5d
function
[
ses
,
str
]
=
pb_runLSL
(
varargin
)
% PB_RUNLSL
()
% PB_RUNLSL
%
% PB_RUNLSL() creates a LSL session for VC.
% PB_RUNLSL(
varargin
) creates a LSL session for VC.
%
% See also PB_VRUNEXP
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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