lisa_noise.diagnostics.verify¶
Attributes¶
Classes¶
Diagonal comparison curves for one segment, in the XYZ and AET bases. |
Functions¶
|
|
|
Test |
|
Build the comparison curves for one segment. |
Render the comparison figure and return the |
Module Contents¶
- lisa_noise.diagnostics.verify.WHITENESS_BAND_EDGES = (0.0001, 0.001, 0.01, 0.03, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1)¶
- class lisa_noise.diagnostics.verify.SegmentVerification¶
Diagonal comparison curves for one segment, in the XYZ and AET bases.
Every array is indexed by science-band frequency bin. The
*_xyz/*_aetpairs each give the three diagonal channels (X,Y,Z or A,E,T) of the periodogram, the best-fit (MAP) model PSD, and the L1 noise estimate.When the result carries posterior samples (sampler runs),
band_xyz/band_aethold the lower and upper credible bounds of the model PSD, shape(Nf, 3, 2)with[..., 0]the lower and[..., 1]the upper edge; both areNonefor point-estimate (MLE) results.credible_levelrecords the enclosed posterior mass (e.g.0.95).When the fit used the windowed (taper-convolved) covariance,
model_windowed_xyz/model_windowed_aethold that model — the expectation of the periodogram of the tapered data — whilemodel_*remain the untapered instrument PSD. The credible band then refers to the windowed model.whitenedis the whitened residualq_j = (2 dt / N) d_j† C_j⁻¹ d_jof every science-band bin, withCthe covariance the data were fit with (the windowed one for a windowed fit). Under a correct covariance the three whitened channels are independent unit complex Gaussians, soq_jfollows a Gamma(3, 1) law: mean 3, variance 3,P(q > 10) = 0.28 %.whitenesssummarises the test: the whole-band mean and variance, the Kolmogorov–Smirnov statistic and p-value against Gamma(3, 1), the fraction of bins above 10, the lag-1 autocorrelation ofq_jacross bins, and one row per band with its mean and standard errorsqrt(3 / n).- segment_idx: int¶
- science_band: tuple[float, float]¶
- freq: numpy.ndarray¶
- periodogram_xyz: numpy.ndarray¶
- periodogram_aet: numpy.ndarray¶
- model_xyz: numpy.ndarray¶
- model_aet: numpy.ndarray¶
- l1_xyz: numpy.ndarray¶
- l1_aet: numpy.ndarray¶
- band_xyz: numpy.ndarray | None = None¶
- band_aet: numpy.ndarray | None = None¶
- credible_level: float | None = None¶
- model_windowed_xyz: numpy.ndarray | None = None¶
- model_windowed_aet: numpy.ndarray | None = None¶
- whitened: numpy.ndarray | None = None¶
- whiteness: dict | None = None¶
- lisa_noise.diagnostics.verify.whitened_residual(data: numpy.ndarray, cov: numpy.ndarray, n_samples: int, delta_t: float) numpy.ndarray¶
q_j = (2 dt / N) d_j† C_j⁻¹ d_jfordata(Nf, 3) andcov(Nf, 3, 3).
- lisa_noise.diagnostics.verify.whiteness_summary(freq: numpy.ndarray, q: numpy.ndarray, band_edges=WHITENESS_BAND_EDGES) dict¶
Test
qagainst the Gamma(3, 1) law it follows under a correct covariance.
- lisa_noise.diagnostics.verify.verify_segment(result_file: str, data_file: str, credible_level: float = 0.95, max_band_samples: int = 400) SegmentVerification¶
Build the comparison curves for one segment.
- Parameters:
result_file – A single-segment pipeline output HDF5 (see
lisa_noise.io.write.write_inference_result()).data_file – The processed segment data HDF5 (MojitoProcessor output) the result was fit to.
credible_level – Posterior mass enclosed by the credible band when the result carries samples (default
0.95). Ignored for point-estimate results.max_band_samples – Cap on the number of posterior draws evaluated for the band; the chain is thinned uniformly above this to bound runtime.
- lisa_noise.diagnostics.verify.plot_verification(v: SegmentVerification)¶
Render the comparison figure and return the
Figure.Three rows of spectra (XYZ | AET) and, when the verification carries the whitened residual, a fourth row with the whiteness test: the distribution of
q_jagainst the Gamma(3, 1) law on the left, its band means with their standard errors against the expectation of 3 on the right.