Skip to content

Fisher-forecast Faraday detection layer (sky-marginalized SNR) - #2

Open
christianhbye wants to merge 14 commits into
faraday-rmsynthfrom
faraday-fisher-forecast
Open

Fisher-forecast Faraday detection layer (sky-marginalized SNR)#2
christianhbye wants to merge 14 commits into
faraday-rmsynthfrom
faraday-fisher-forecast

Conversation

@christianhbye

Copy link
Copy Markdown
Owner

Summary

Adds a Fisher-matrix forecast that estimates LuSEE's sky-marginalized detectability of the Faraday-rotation amplitude — the realistic version of the optimistic SNR_far from the RM-synthesis layer. The data are linear in the unknown intrinsic (Q,U) sky given known beam+RM+rotation operators, so the Fisher Jacobian is built analytically and the unknown large-scale sky is marginalized away.

New modules (src/lusee_faraday/):

  • forward.pypol_response, a reusable linear forward operator wrapping compute_vis_fast → complex pQ + i·pU per (time, channel); alpha scales the RM (Faraday amplitude).
  • skybasis.pyspin2_basis / n_modes, low-ℓ spin-2 (Q,U) harmonic basis = the marginalized intrinsic-sky nuisance.
  • fisher.pyrun_forecast assembles F = JᵀN⁻¹J over (α, an effective Faraday-dispersion variance τ, sky modes) and returns the sky-marginalized σ(α) and SNR vs a fixed-sky bound. α via finite difference, τ analytic, sky modes via the linear operator.

Driver notebooks/fisher_forecast.py reuses results/faraday_fullband.npz (channel table + pI_FR as T_sys), reconstructs sim inputs at nside=64 (a resolution knob), and runs run_forecast once, scaling SNR by √dt across integration times (exact: radiometer noise gives F ∝ dt).

Key result

Marginalizing the 24 low-ℓ spin-2 sky modes + τ reduces the Faraday-amplitude SNR by < 0.5% vs the fixed-sky bound — the smooth sky nuisance does not span the λ²-winding Faraday signature, i.e. the known-RM matched filter is not degeneracy-limited by these modes.

Caveat (stated in code + docs): the absolute SNR is an optimistic upper bound — the nuisance basis is restricted (low-ℓ, fixed spectral index per mode) and nside=64 smooths small-scale RM. Per-mode spectral freedom + higher ℓ are deferred follow-ups that would lower it.

Notes

  • Stacks on the unmerged faraday-rmsynth (PR Faraday RM-synthesis: Step 0 (rmsynth module + calibration) #1) — base is faraday-rmsynth.
  • Figure results/fisher_forecast.png is gitignored (repo convention); the driver regenerates it.
  • Implementation plan: docs/superpowers/plans/2026-06-09-faraday-fisher-forecast.md.

Test Plan

  • uv run pytest -q — 140 passed (new: test_forward.py, test_skybasis.py, test_fisher.py)
  • Driver runs end-to-end → finite σ(α), marginalized ≤ fixed-sky in every integration-time case
  • (follow-up) higher-ℓ / spectral-freedom nuisance; nside=128 precision run

🤖 Generated with Claude Code

christianhbye and others added 14 commits June 9, 2026 08:36
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add faraday_column (central-FD dP/dalpha), dispersion_column (analytic
dP/dtau = -2*lam2^2*P_pol_fid), and run_forecast assembling the full
Fisher matrix with alpha, tau, and sky-mode nuisance columns; returns
both sky-marginalized and fixed-sky optimistic SNR. Two new TDD tests
confirm shapes and the marginalized <= optimistic SNR invariant.
…cstring

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nside=64 forward model + channel decimation (DECIM=8) + exact sqrt(dt)
noise scaling (one forecast, scaled across integration times instead of
rebuilt per-dt). Marginalizing 24 low-l spin-2 sky modes + tau over the
known-RM matched filter barely reduces the Faraday-amplitude SNR
(sigma(alpha)~9e-7 at 1h; marginalized within 0.5% of fixed-sky): the
smooth sky nuisance does not span the lambda^2-winding Faraday signature.
Absolute SNR is an optimistic upper bound (restricted nuisance basis;
per-mode spectral freedom + higher l deferred). Figure (gitignored
results/) regenerated by running the script.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Addresses Task 6 code review: rename ambiguous 'l' loop var (E741),
guard results/ dir before savefig (clean-clone crash), assert npz has
>= N_TIMES LST steps, and print an explicit optimistic-upper-bound
caveat (low-l fixed-spectrum nuisance + nside=64 RM smoothing).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… Haslam data file

Final-review fixes: _toy() basis maps were (npix,) so run_forecast's mode
columns ran on degenerate input while the invariants passed regardless;
use (ntimes,npix) maps matching rotate_pol_maps. Add haslam_galactic.npz
to CLAUDE.md Data Files.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant