lisa_noise.modelled.window¶
Taper-convolved (“windowed”) covariance.
The data are tapered before the FFT, d = rfft(w · x), so the covariance of
frequency bin i is the model covariance convolved with the squared
spectral window (Burke et al., “Zurückbleiben bitte”, Eq. 91):
C_w[i] = Σ_m k[m] · C[i − m], k[m] = |fft(w)[m]|² / N²
with C(−f) = conj C(f). Where C is smooth over the width of k this
is just mean(w²) · C. It differs at the TDI nulls and at the steep
low-frequency end, so WindowedModel scales every bin and convolves
only the patches of bins where the two differ.
Attributes¶
Classes¶
Taper-convolved covariance |
Functions¶
|
The time-domain taper |
|
|
|
Smallest lag that leaves a fraction |
|
Per-bin largest |
|
Mask of the bins where |
|
|
Module Contents¶
- lisa_noise.modelled.window.WINDOW_METHODS = ('patches', 'exact')¶
- lisa_noise.modelled.window.MAX_PATCH = 3¶
- lisa_noise.modelled.window.U_AET¶
- lisa_noise.modelled.window.build_window(name: str, n_samples: int, alpha: float | None = None) numpy.ndarray¶
The time-domain taper
MojitoProcessorapplied, from its recorded kwargs.
- lisa_noise.modelled.window.spectral_kernel(window: numpy.ndarray) numpy.ndarray¶
k[m] = |fft(w)[m]|² / N²at lags0 .. N//2(kis even).
- lisa_noise.modelled.window.kernel_half_width(kernel: numpy.ndarray, tol: float = 1e-10) int¶
Smallest lag that leaves a fraction
tolof the kernel sum outside.
- lisa_noise.modelled.window.relative_deviation(a: numpy.ndarray, b: numpy.ndarray, local_max_bins: int = 0)¶
Per-bin largest
|a − b|over the 3×3 entries, relative to the PSDs ofb.With
local_max_binsthe PSDs are replaced by their running maximum over±local_max_bins, which measures a null against its surroundings.
- lisa_noise.modelled.window.bins_to_convolve(deviation: numpy.ndarray, tol: float, half_width: int, i_lo: int)¶
Mask of the bins where
deviation > tol, widened by half the kernel width.The low-frequency end grows with the fitted slope, so it is doubled in frequency.
- lisa_noise.modelled.window.mask_to_patches(mask: numpy.ndarray, max_len: int) list[tuple[int, int]]¶
(start, stop)of every run of True, cut into equal parts of at mostmax_lenbins (short transforms keep the FFT round-off small).
- class lisa_noise.modelled.window.WindowedModel(make_model: Any, freq: numpy.ndarray, window: numpy.ndarray, delta_t: float, seeds: Any, xp: Any = np, method: str = 'patches', patch_tol: float = 1e-05, kernel_tol: float = 1e-10)¶
Taper-convolved covariance
k ⊛ Cof any covariance model.- Parameters:
make_model (callable) –
make_model(freq)returns amodel(freq, params) -> (Nf, 3, 3)bound tofreq(which may include DC; that row must be zero).freq ((Nf,) array) – Science grid: a contiguous slice of
np.fft.rfftfreq(N, delta_t).window ((N,) array) – Time-domain taper applied to the data.
delta_t (float) – Sample interval in seconds.
seeds (sequence of arrays) – Parameter vectors at which the bins to convolve are located. The first is also used for the self-check.
xp (module, optional) –
numpyorjax.numpy.method ({"patches", "exact"}, optional) –
"exact"convolves every bin.patch_tol (float, optional) – Relative deviation from
mean(w²) Cabove which a bin is convolved.kernel_tol (float, optional) – Fraction of the kernel sum neglected beyond the guard band.
- name = 'window'¶
- inner¶
- info¶
- describe() str¶
One-line summary for the log.