SpHr_NeuronsIPD [ flags] IPDNeuronLabels, *maxIPDLabels [, IPDNeurons ]
Generates a 'look-up table' wave of hypothetical activities generated by a population of neurons selective for interaural phase differences (IPD). Neuron IPD 'labels' (cycles) are also generated, corresponding to activity maxima or half-maxima along medial edges.
Parameters
IPDNeuronLabels IPD 'labels' (cycles) corresponding to medial activity half-maxima are written to column 0. IPD 'labels' corresponding to activity maxima are written to column 1.
*maxIPDLabels For historical reasons, IPD 'labels' corresponding to activity maxima are written to this wave. This may change in the future. Use IPDLabels[p][1] instead.
IPDNeurons 'Look up table' of hypothetical activities generated by interaural phase differences (IPD) across IPD-selective neurons in the left hemisphere.
Flags
/F = functionTypeString
functionTypeString determines the shape of IPD activity curves.
Curves are log-normal if functionTypeString includes the characters "Log" or "LN" (case insensitive) or it the /F flag is omitted. The log-normal function is: exp(-(ln((IPD+(1/HX))*2)*M)^2 ). By default, M is set to 2.0. Values of 1.5 and 2.5 may also be used if functionTypeString includes the characters "2.5", "25", "1.5", or "15". As described in notes below, HX determines the IPD corresponding to an activity value of 0.5 along the curve's medial edge. The curves are similar to those described by McAlpine, D., Jiang, D., & Palmer, A. (2001) A neural code for low-frequency sound localization in mammals; Nature Neuroscience. The shape is also similar to a single cycle of an auditory filter's impulse response.
Curves are raised-cosine if functionTypeString includes the characters "Cos" or "RC" (case insensitive). The raised-cosine function is: (0.5+0.5*cos((IPD)*2.0*pi))^4 but (0.5+0.5*cos((IPD)*2.0*pi))^3 may also be used if functionTypeString includes the character "3". Raised-cosine functions are described by Harper, N. S., & McAlpine, D. (2004) Optimal neural population coding of an auditory spatial cue. Nature, 430, 682–686.
/N = { numNeurons [, IPDbins ] }
numNeurons is the number of neurons generated. Higher values provide finer resolution but consume more memory. Even numbers are increased by 1. numNeurons must be between 11 and 9999. If the /N flag is omitted, a default value of 501 is used.
IPDbins is the number of IPD bins. Higher values provide finer resolution but consume more memory. If IPDbins is omitted, a default value of 501 is used. Even numbers are increased by 1. The number of bins passed must be between 11 and 9999.
If the value of IPDbins is less than 1.0, the number of bins is calculated by dividing the desired phase range (see /R flag) by IPDbins. The number of bins calculated in this manner must be between 11 and 9999.
Note: The SpHr_NeuronsILD operation must pass the same values for numNeurons and ILDbins if IPDs and ILDs are both used to model neural activities.
/HML = { minIpsiPhaseLabel [, maxContraPhaseLabel ] }
Labels span a range of values between minIpsiPhaseLabel and maxContraPhaseLabel and reflect medial half-maximal activity levels across modeled neurons. Values are swapped if maxContraPhaseLabel < minIpsiPhaseLabel. If only minIpsiPhaseLabel is passed, values range between -minIpsiPhaseLabel and +minIpsiPhaseLabel.
This flag overrides /ML flag.
/ML = { minIpsiPhaseLabel [, maxContraPhaseLabel ] }
Labels span a range of values between minIpsiPhaseLabel and maxContraPhaseLabel and reflect maximal activity levels across modeled neurons. Values are swapped if maxContraPhaseLabel < minIpsiPhaseLabel. If only minIpsiPhaseLabel is passed, values range between -minIpsiPhaseLabel and +minIpsiPhaseLabel.
This flag may be overridden by the /HML flag.
/SL = labelShift
Proportional shift applied to IPD labels and modeled activities. This flag may be used if ILD neurons were previously generated using the SpHr_NeuronsILD operation. Specifically, the SpHr_NeuronsILD operation sets the variable V_ILDLabelShift which may be passed to this operation as labelShift . This assures that IPD and ILD labels are proportional in how they are shifted to the left and right of zero (cycles or dB).
/R = maxPhase
Determines the size and limits of the IPDNeurons wave. The value maxPhase should be set so that IPDs obtained from signals fall between -maxPhase and maxPhase (cycles). If the /R flag is omitted, a default value of 1.25 is used.
/EC = wrap
Include responses at ± one cycle (i.e., ±2π radians). This flag should not be used when modeling neural activities.
/DF = dfRef dfRef is an optional datafolder reference. Destination waves and variables are written to this already existing datafolder, overriding any datafolder specified by destination waves. Waves are written to the current datafolder if not specified here or by destination wave specifications.
/Q = quiet
quiet = 1 is the same as the /Q flag alone. Variable generation is suppressed unless SpHr_NeuronsIPD is called from within a function.
quiet = 0 is the same as no /Q flag (default).
Variables
The following variables are generated upon return, unless the /Q flag is present:
V_IPDLabelShift = proportional IPD label shift. This values may be applied to ILD labels using the SpHr_NeuronsILD operation and the /SL flag.
V_NeuronWidth = neuron width, in cycles, at the half-maximal activity level. This value is useful when modeling activities evoked by waveform envelopes.
V_MaxHalfMaxOffset = offset, in points, between maximal and half-maximal phase labels.
V_IPDdelta = difference between one neuron's phase ‘label’ and the next.
V_HalfMaxima_Min = smallest half-maximal label (may be overwritten by SpHr_NeuronsILD operation).
V_HalfMaxima_Max = largest half-maximal label (may be overwritten by SpHr_NeuronsILD operation).
V_Maxima_Min = smallest maximal label.
V_Maxima_Max = largest maximal label.
Notes
Log-normal curves:
When M equals 2.0, HX = 0.730867+1.291527*expf(-((-φ)+0.129749)/0.082556)+2.970719*expf(-((-φ)+0.129749)/0.342301)
where φ is the IPD corresponding to an activity/response value of 0.5 along the curve's medial edge.
When M equals 2.5, HX = 0.685254+1.038849*expf(-((-φ)+0.129749)/0.090012)+2.645487*expf(-((-φ)+0.129749)/0.367938).
Example
Function SpHr_NeuronsIPD_Example()
SpHr_NeuronsIPD/F="ln"/R=1.0/N={501,501}/HML=0.2 IPDLabels, MaxIPDs, IPDNeurons
killwaves MaxIPDs // obsolete
// display first, central, and last neurons
Display/K=1 IPDNeurons[][0],IPDNeurons[][250],IPDNeurons[][500]
ModifyGraph lsize=0.75,rgb=(0,0,0),grid(left)=1
ModifyGraph zero(bottom)=3,nticks(left)=2,margin(top)=36
ModifyGraph ZisZ=1,zapTZ=1,zapLZ=1,standoff=0,fSize=10,axThick=0.5
ModifyGraph tick=2,btLen=4,btThick=0.4,stLen=2,stThick=0.5,lblMargin=3
Label bottom "IPD (\\U)"
String str // label activity 'labels'
SetDrawEnv xcoord=bottom,ycoord=left,textxjust=2,textyjust=1,fsize=10,save
DrawText -0.3,1.1,"\\JCmaximal 'labels'\r(cycles)"
DrawText -0.45,0.35,"\\JChalf-maximal\r'labels' (cycles)"
SetDrawEnv xcoord=bottom,ycoord=left,textxjust=2,textyjust=1,fsize=10,textrot=-35,save
SPrintf str,"%.2f ➜ ",IPDLabels[0][1]; DrawText IPDLabels[0][1],1,str
SPrintf str,"%.2f ➜ ",IPDLabels[250][1]; DrawText IPDLabels[250][1],1,str
SPrintf str,"%.2f ➜ ",IPDLabels[500][1]; DrawText IPDLabels[500][1],1,str
SetDrawEnv xcoord=bottom,ycoord=left,textxjust=2,textyjust=1,fsize=10,textrot=35,save
SPrintf str,"%.2f ➜ ",IPDLabels[0][0]; DrawText IPDLabels[0][0],0.5,str
SPrintf str,"%.2f ➜ ",IPDLabels[250][0]; DrawText IPDLabels[250][0],0.5,str
SPrintf str,"%.2f ➜ ",IPDLabels[500][0]; DrawText IPDLabels[500][0],0.5,str
End