Example #1
0
 def setUp(self):
     global fn
     fn = PowerSensoryFunc()
     
     
     fn.sigmamin = 0.0
     fn.sigmamax = 0.0
     fn.exponent = 3
     fn.a = 1
     fn.c = 0
Example #2
0
#######
# 1. First, we set a stimulus dimension of interest
N = 11
stim = np.linspace(0, 1, N)

#######
# 2. Then, we need to set a sensory function that maps the sensory dimension
# with the perceived dimension. 
# This repository includes some rudimentary functions
from sensoryfunctions import PowerSensoryFunc

# sets a quadratic sensory function with exponent 2:  x^2 + epsilon, where x
# is the stimulus dimension. epsilon is the gaussian-distributed noise
# added to the sensory representation
fn = PowerSensoryFunc()
fn.exponent = 3.0

# it sets a fixed noise value 
fn.sigmamax = 0.05
fn.sigmamin = 0.05


######
# 3. Now we simulate the observer performing the method of triads.
#    The simulated results are stored in the file fname
fname = mlds.simulateobserver(fn, stim, nblocks=15)


#######
# 4. Finally, we want to estimate the scale from the simulated data.