Psychometric functions¶
The spatio-temporal contrast sensitivity function. |
|
The cumulate normal distribution. |
|
The cumulative normal distribution with lapse rate equal to lower asymptote. |
|
A Weibull psychometric function. |
-
questplus.psychometric_function.
csf
(*, contrast, spatial_freq, temporal_freq, c0, cf, cw, min_thresh, slope=3.5, lower_asymptote=0.01, lapse_rate=0.01, scale='log10')¶ The spatio-temporal contrast sensitivity function.
- Parameters
contrast (
Union
[float
,Iterable
[float
]]) –spatial_freq (
Union
[float
,Iterable
[float
]]) –temporal_freq (
Union
[float
,Iterable
[float
]]) –c0 (
Union
[float
,Iterable
[float
]]) –cf (
Union
[float
,Iterable
[float
]]) –cw (
Union
[float
,Iterable
[float
]]) –min_thresh (
Union
[float
,Iterable
[float
]]) –slope (
Union
[float
,Iterable
[float
]]) –lower_asymptote (
Union
[float
,Iterable
[float
]]) –lapse_rate (
Union
[float
,Iterable
[float
]]) –scale (
str
) –
- Return type
ndarray
-
questplus.psychometric_function.
norm_cdf
(*, intensity, mean, sd, lower_asymptote=0.01, lapse_rate=0.01, scale='linear')¶ The cumulate normal distribution.
- Parameters
intensity (
Union
[float
,Iterable
[float
]]) –mean (
Union
[float
,Iterable
[float
]]) –sd (
Union
[float
,Iterable
[float
]]) –lower_asymptote (
Union
[float
,Iterable
[float
]]) –lapse_rate (
Union
[float
,Iterable
[float
]]) –scale (
str
) –
-
questplus.psychometric_function.
norm_cdf_2
(*, intensity, mean, sd, lapse_rate=0.01, scale='linear')¶ The cumulative normal distribution with lapse rate equal to lower asymptote.
- Parameters
intensity (
Union
[float
,Iterable
[float
]]) –mean (
Union
[float
,Iterable
[float
]]) –sd (
Union
[float
,Iterable
[float
]]) –lapse_rate (
Union
[float
,Iterable
[float
]]) –scale (
str
) –
-
questplus.psychometric_function.
weibull
(*, intensity, threshold, slope=3.5, lower_asymptote=0.01, lapse_rate=0.01, scale='log10')¶ A Weibull psychometric function.
- Parameters
intensity (
Union
[float
,Iterable
[float
]]) – Stimulus values on the abscissa, \(x\).threshold (
Union
[float
,Iterable
[float
]]) – The threshold parameter, \(\alpha\).slope (
Union
[float
,Iterable
[float
]]) – The slope parameter, \(\beta\).lower_asymptote (
Union
[float
,Iterable
[float
]]) – The lower asymptote, \(\gamma\), which is equivalent to the false-alarm rate in a yes-no task, or \(\frac{1}{n}\) in an \(n\)-AFC task.lapse_rate (
Union
[float
,Iterable
[float
]]) – The lapse rate, \(\delta\). The upper asymptote of the psychometric function will be \(1-\delta\).scale (
str
) – The scale of the stimulus parameters. Possible values arelog10
,dB
, andlinear
.
- Returns
The psychometric function evaluated at the specified intensities for all parameters combinations.
- Return type
p
Notes
An appropriate parametrization of the function is chosen based on the scale keyword argument. Specifically, the following parametrizations are used:
- scale=’linear’
\(p = 1 - \delta - (1 - \gamma - \delta)\, e^{-\left (\frac{x}{t} \right )^\beta}\)
- scale=’log10’
\(p = 1 - \delta - (1 - \gamma - \delta)\, e^{-10^{\beta (x - t)}}\)
- scale=’dB’:
\(p = 1 - \delta - (1 - \gamma - \delta)\, e^{-10^{\frac{\beta}{20} (x - t)}}\)