bcam.indar.ema.H1¶
- bcam.indar.ema.H1(X: array - like, y: array - like) ndarray¶
Compute the H1 estimator of the kernel.
This estimator models the response as
\[\hat{y}(\omega) = \hat{h}(\omega)\hat{x}(\omega) + \varepsilon(\omega),\]where \(\hat{y}(\omega)\) is the continuous Fourier transform of the response, and likewise for \(\hat{h}(\omega)\), \(\hat{x}(\omega)\), where \(h\) is the Impulse Response Function and \(x\) is the input signal. The term \(\varepsilon(\omega)\) is white noise.
In practice, the continuous Fourier transform is approximated by the DFT, and the H1 estimator is given by
\[\hat{h}(\omega) = \frac{\sum_{r=1}^R \hat{y}_r(\omega)\hat{x}_r(\omega)^*}{\sum_{r=1}^R \hat{x}_r(\omega)\hat{x}_r(\omega)^*},\]where \(R\) is the number of repetitions (trials), and \(^*\) denotes complex conjugation.
- Parameters:
- Xarray-like of shape (n_repetitions, n_time_samples)
Input data.
- yarray-like of shape (n_repetitions, n_time_samples)
True response data.
- Returns:
- H1np.ndarray of shape (n_time_samples,)
H1 estimator of the kernel.