diff --git a/Examples.ipynb b/Examples.ipynb index 7941650..ef80005 100644 --- a/Examples.ipynb +++ b/Examples.ipynb @@ -194,8 +194,8 @@ "# actual parameters of the observer\n", "bias = -10.\n", "threshold = 20.\n", - "gamma1 = .2\n", - "gamma2 = 0.\n", + "gamma1 = .2 # lapse rate at low (-ve) stimulus values\n", + "gamma2 = 0. # lapse rate at high (+ve) stimulus values\n", "\n", "# fake experimental data given those parameters\n", "pp = psy.erf_psycho_2gammas((bias, threshold, gamma1, gamma2), xx)\n", @@ -216,7 +216,7 @@ "}\n", "\n", "# data: \n", - "# 3 x n matrix where first row corrsponds to stim levels (% contrast), \n", + "# 3 x n matrix where first row corresponds to stim levels (% contrast), \n", "# the second to number of trials for each stim level (int),\n", "# the third to proportion rightward (float between 0 and 1)\n", "data = np.vstack((xx, ntrials * np.ones((nxx,)), np.mean(dd, axis=0)))\n", diff --git a/psychofit.py b/psychofit.py index 4e15352..40495c3 100644 --- a/psychofit.py +++ b/psychofit.py @@ -118,7 +118,7 @@ def neg_likelihood(pars, data, P_model='weibull', parmin=None, parmax=None): Args: pars: Model parameters [threshold, slope, gamma], or if - using the 'erf_psycho_2gammas' model append a second gamma value. + using the 'erf_psycho_2gammas' model append a second gamma value (i.e. lapse high). data: 3 x n matrix where first row corresponds to stim levels, the second to number of trials for each stim level (int), the third to proportion correct / proportion rightward (float between 0 and 1) @@ -292,8 +292,11 @@ def erf_psycho_2gammas(pars, xx): """ erf function from 0 to 1, with two lapse rates. + gamma1 cooresponds to 'lapse low', i.e. the lapse rate at low (-ve) stimulus values; + gamma2 cooresponds to 'lapse high'. + Args: - pars: Model parameters [bias, slope, gamma]. + pars: Model parameters [bias, slope, gamma1, gamma2]. xx: vector of stim levels (%) Returns: