opiPresent
is blocking in that it will not return until either a response
is obtained, or at least the responseWindow milliseconds has expired. (Note
that more time might have expired.) Specifying nextStim
allows the implementing
machine to use the time waiting for a
response to stim
to make preparations
for the next stimuli. (For example retargeting the projector or moving
aperture and/or filter wheels.)
There is no guarantee that the next call to
opiPresent
will have nextStim
as the first argument; this
should be checked by the machine specific implementations.Also note that to allow for different parameters depending on the
implementation chosen with chooseOpi
, every parameter MUST
be named in a call to opiPresent
.
SimHenson{
opiPresent(stim, nextStim=NULL, fpr=0.03, fnr=0.01, tt=30)
If the chosen OPI implementation is SimHenson
, then
the response to a stimuli is determined by sampling from a
Frequency-of-Seeing (FoS) curve (also known as the psychometric
function) with formula $$\mbox{fpr}+(1-\mbox{fpr}-\mbox{fnr})(1-\mbox{pnorm}(x, \mbox{tt},
\mbox{pxVar})),$$
where $x$ is the stimulus value in Humphrey dB, and pxVar is
$$\min\left(\mbox{simH.global.cap}, e^{A\times\mbox{tt}+B}\right).$$
The ceiling simH.global.cap
is set with the call to opiInitialize
, and A
and B
are from Table 1 in Henson et al (2000). Which values are used is
determined by simH.type
which is also set in the call to
opiInitialize
.
Note that if the stimulus value is less than zero, then the Henson
formula is not used. The probability of seeing is fpr
.
}
SimHensonRT{
opiPresent(stim, nextStim=NULL, fpr=0.03, fnr=0.01, tt=30, dist=stim$level - tt)
This presentation is the same as for SimHenson
, but reaction
times are determined by sampling from rtData
as passed to
opiInitialize
. The dist
parameter is the distance
of the stimulus level from the true threshold, and should be in the
same units as the Dist
column of rtData
. The default
is just the straight difference between the stimulus level and the
true threshold, but you might want it scaled somehow to match
rtData
.
}
SimGaussian{
opiPresent(stim, nextStim=NULL, fpr=0.03, fnr=0.01, tt=30)
If the chosen OPI implementation is SimGaussian
, then
the response to a stimuli is determined by sampling from a
Frequency-of-Seeing (FoS) curve (also known as the psychometric
function) with formula fpr+(1-fpr-fnr)*(1-pnorm(x, tt, simG.global.sd))
,
where x
is the stimulus value in Humphrey dB, and simG.global.sd
is
set with opiInitialize
.
}
SimYes{
opiPresent(stim, nextStim=NULL)
If the chosen OPI implementation is SimYes
, then
the response to a stimuli is always yes, hence opiPresent
always returns
err=NULL
, seen=TRUE
, and time=0
.
}
SimNo{
opiPresent(stim, nextStim=NULL)
If the chosen OPI implementation is SimNo
, then
the response to a stimuli is always no, hence opiPresent
always returns
err=NULL
, seen=FALSE
, and time=0
.
}