Fisher-forecast Faraday detection layer (sky-marginalized SNR) - #2
Open
christianhbye wants to merge 14 commits into
Open
Fisher-forecast Faraday detection layer (sky-marginalized SNR)#2christianhbye wants to merge 14 commits into
christianhbye wants to merge 14 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_farfrom 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.py—pol_response, a reusable linear forward operator wrappingcompute_vis_fast→ complexpQ + i·pUper (time, channel);alphascales the RM (Faraday amplitude).skybasis.py—spin2_basis/n_modes, low-ℓ spin-2 (Q,U) harmonic basis = the marginalized intrinsic-sky nuisance.fisher.py—run_forecastassemblesF = JᵀN⁻¹Jover (α, an effective Faraday-dispersion variance τ, sky modes) and returns the sky-marginalizedσ(α)andSNRvs a fixed-sky bound. α via finite difference, τ analytic, sky modes via the linear operator.Driver
notebooks/fisher_forecast.pyreusesresults/faraday_fullband.npz(channel table +pI_FRas T_sys), reconstructs sim inputs at nside=64 (a resolution knob), and runsrun_forecastonce, scaling SNR by √dt across integration times (exact: radiometer noise givesF ∝ 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
faraday-rmsynth(PR Faraday RM-synthesis: Step 0 (rmsynth module + calibration) #1) — base isfaraday-rmsynth.results/fisher_forecast.pngis gitignored (repo convention); the driver regenerates it.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)σ(α), marginalized ≤ fixed-sky in every integration-time case🤖 Generated with Claude Code