module documentation

Undocumented

Function fit_psychometric_func Find the optimal fit of the psychometric function to the given data scipy.optimize.curve_fit
Function get_psychometric_point Return the point p, e.g. 50%/0.5 point or similar for the psychometric function centered in a with width b. This can be computed either analytically or solved using scipy.optimize.fsolve.
Function psychometric_func Computes the value of the psychometric function at x with parameters a (position) and b (width) with scaling factor and location/offset
def fit_psychometric_func(xdata, ydata, with_scale=True, with_loc=True, scale_bounds=None, loc_bounds=None, scale_p0=1.0, loc_p0=1.0): (source)

Find the optimal fit of the psychometric function to the given data scipy.optimize.curve_fit

Parameters
xdata
ydata
with_scaleenable fitting with a scaling parameter
with_locenable fitting with an offset parameter
scale_boundsboundary conditions for the scaling parameter
loc_boundsboundary conditions for the location parameter
scale_p0initial point for the scaling parameter
loc_p0initial point for the location parameter
Returns
List of optimal parameters for the psychometric-function on the input data
def get_psychometric_point(p, a, b, x0=None, method='analytical'): (source)

Return the point p, e.g. 50%/0.5 point or similar for the psychometric function centered in a with width b. This can be computed either analytically or solved using scipy.optimize.fsolve.

Scale and location are not used in this calculation

Parameters
p:floatpoint to retrieve
a:floatposition-parameter of the psychometric function
b:floatwidth-parameter of the psychometric function
x0:floatif using fsolve, x0 is used as starting point
method:strmethod used for retrieving x
Returns
floatthe position for which the psychometric function equals p
def psychometric_func(x, a, b, scale=1.0, loc=0): (source)

Computes the value of the psychometric function at x with parameters a (position) and b (width) with scaling factor and location/offset

Parameters
xposition to compute
aposition-parameter of the psychometric function
bwidth-parameter of the psychometric function
scalescale (default is 1)
loclocation (default is 0)
Returns
the value of the psychometric function at x