gw.likelihood.inner_product
gw.likelihood.inner_product(a, b, min_idx=0, delta_f=None, psd=None)Compute the inner product between two complex arrays. There are two modes: either, the data a and b are not whitened, in which case delta_f and the psd must be provided. Alternatively, if delta_f and psd are not provided, the data a and b are assumed to be whitened already (i.e., whitened as d -> d * sqrt(4 delta_f / psd)).
Note: sum is only taken along axis 0 (which is assumed to be the frequency axis), while other axes are preserved. This is e.g. useful when evaluating kappa2 on a phase grid.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| a | First array with frequency domain data. | required | |
| b | Second array with frequency domain data. | required | |
| min_idx | Truncation of likelihood integral, index of lowest frequency bin to consider. | 0 |
|
| delta_f | Frequency resolution of the data. If None, a and b are assumed to be whitened and the inner product is computed without further whitening. | None |
|
| psd | PSD of the data. If None, a and b are assumed to be whitened and the inner product is computed without further whitening. | None |
Returns
| Name | Type | Description |
|---|---|---|
| inner_product | float |