nnmt.lif._general._fit_transfer_function

nnmt.lif._general._fit_transfer_function(transfunc, omegas)[source]

Fits the transfer function (tf) of a low-pass filter to the passed tf.

A least-squares fit is used for the fitting procedure.

For details refer to Senk et al. [2020], Sec. F ‘Comparison of neural-field and spiking models’.

Parameters:
transfer_functionnp.array

Transfer functions for each population with the following shape: (number of freqencies, number of populations).

omegas[float | np.ndarray]

Input frequencies to population in Hz.

Returns:
transfer_function_fitnp.array

Fit of transfer functions in Hertz/volt for each population with the following shape: (number of freqencies, number of populations).

tau_ratenp.array

Fitted time constant of low-pass filter for each population in s.

h0np.array

Fitted gain of low-pass filter for each population in Hertz/volt.

fit_errorfloat

Combined fit error.