Repository navigation
Consolidated Raul comparison notebook: main vs #12, and the pole regression it found - #13
Merged
Merged
Conversation
The croissant v5.3.0.dev2 bump leaves the mapmaking results alone -- data and forward model are built from the same Simulator, so the pole-of-date change cancels in the linear inverse and a re-run of mars-lmax40 moved the relative reconstruction error by 0.006%. The comparison against Raul's reference simulator has no such cancellation and has to be redone. The three sim_comparison notebooks could not do that: none referenced the others, and none had any notion of comparing two versions of mistsim. The stored comparison_022526.npz was written thirty-six minutes before that day's croissant-v5 upgrade commits, so it predates five subsequent changes and cannot serve as a controlled baseline. The design replaces all three with one notebook run under two kernels -- a git worktree of main against this branch -- so both versions execute byte-identical cells. main and this branch differ in croissant, s2fft and jax together, and those cannot be separated cheaply, so the notebook measures main versus PR 12 rather than the pole fix alone; the spec says so and labels its curves by environment. Delete the three superseded notebooks; they remain in history on main. interp_beam.ipynb is untouched, being a study of beam sampling rather than frame correctness. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Declare NSIDE and SIM_LMAX in Task 2's produces block; Task 3 consumes them and an undeclared interface invites redefinition. Replace Task 3's absolute cache-timing bound with a relative one -- re-execution rebuilds the sky and beam transforms regardless of the cache, so the bound could fail for reasons unrelated to what it tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Creates notebooks/sim_comparisons/raul_comparison.ipynb with the title cell, setup cell (paths, BEAM_AZ_ROT, NSIDE/SIM_LMAX, TESTS), an environment-tagging cell that distinguishes croissant main vs PR 12 via cro.rotations.eq2cirs, and a cell loading Raul's three reference HDF5 waterfalls. Verified headless via nbconvert under the project kernel (croissant v5.3.0.dev2): all in-cell asserts pass, shapes are (241, 86), freqs span 40-125 MHz. Also adds notebooks/sim_comparisons/results/.gitignore so the notebook's regenerable cached npz outputs stay untracked. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Address code-review fix round 1 on the comparison section: - Cell 11 suptitle and the residual_profile docstring no longer attribute an observed arch to any specific fix (pole-of-date or otherwise) -- they only describe the shape, per the plan's own "labelled by environment, never by feature" constraint. The docstring now cites croissant's CHANGELOG entry for the pointing error numbers instead of stating them as bare fact. - arch_ratio now returns nan when the edge mean is negligible relative to mean_abs_K (not just exactly zero), avoiding an arbitrarily large, meaningless ratio in precisely the regime this metric exists to flag. - The right-edge slice in residual_profile no longer aliases to the whole array when third // 2 == 0 (the "-0" slicing trap); not triggered at 241 samples but was a latent corruption on a coarser grid. - Cell 12's residual heatmaps now share one colour scale across all runs per test (like cell 13 already did), so panels are directly comparable by eye instead of each floating on its own vmin/vmax. - The summary table's "rel %" header is renamed "ratio %" since the value is a ratio of means, not a mean of per-point relative errors; a comment in residual_profile now says so explicitly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Add a results markdown cell after the summary table stating the outcome: MARS improves under PR 12, North Pole regresses 27x with a constant (arch=1.00) offset, and the diagnosed mechanism (a non-orthogonal get_rot_mat from astropy annual aberration, amplified through rotmat_to_eulerZYZ's beta-conditioned split, confirmed independently by a +66.0 degree LST-lag scan). Notes that the table mixes croissant/s2fft/jax and cannot attribute its own numbers, unlike the separately-measured diagnosis, and flags the southpole synthetic data as carrying the smaller pre-CIRS error. - Fold BEAM_AZ_ROT into the cache filename so changing it can't silently load and mislabel results simulated under a different rotation; rename the two existing gitignored cache files to match. - Derive REPO from the notebook's own location instead of a hardcoded path, and document the worktree/kernel setup commands in the intro cell so the notebook is self-contained. - Add a failure message to the MARS LST-grid assert, since it guards LSTs plotted later for both tests 0 and 1. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
PR 12 has merged, so cell 0's `git worktree add ../mistsim-main main` now builds croissant v5.3.0.dev2 in both kernels. Both runs would then write the same cache file, and the comparison would quietly show one environment. Pin daa5e7b, the last commit before the merge. The results cell said the April southpole synthetic data carry a -1.4 degree error, a figure measured only at +90. Measured now at the runs.yaml start time and latitude -90, as the angle between the Euler reconstruction and the nearest true rotation (meaningful at either pole): 1.4 degrees under croissant 5.1.4, 38.5 degrees under PR 12. Also say that the error depends on epoch, so the notebook's 66.5 degrees and the 133.4 degrees in croissant#152 are each correct for their own epoch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qDDdFg7x9CVkj4EGVT8AE
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
One notebook,
notebooks/sim_comparisons/raul_comparison.ipynb, replaces the threesim_comparison*notebooks. It compares Raul's reference simulator against mistsim under two environments:mainbefore #12 (croissant 5.1.4) and #12 (croissant v5.3.0.dev2). The same cells run under two Jupyter kernels, each run caches its waterfalls under a tag derived from its croissant revision, and the comparison section plots every cached run it finds.Impact: #12 introduced a large regression at latitude ±90, and it is now on main. Result (mean |mistsim − Raul|, and the arch ratio of mid-day to edge residual):
get_rot_matreturns a slightly non-orthogonal matrix (‖RRᵀ−I‖ ≈ 1e-4, from direction-dependent aberration).rotmat_to_eulerZYZamplifies that by 1/sin β. Move onto croissant v5.3.0.dev2 and its s2fft fork; put sky alm in the Earth frame of date #12's CIRS frame puts the zenith within 20″ of the pole at ±90, so β collapses and the error becomes large. This was measured directly from croissant's rotation matrices, separately from the table. The table itself compares environments that also differ in s2fft and jax, so it cannot attribute anything to a single cause.runs.yamldefines asouthpolesite at −90.0. No current run list uses its beams, so no stored mapmaking result is affected.data/synthetic_data/southpole-*.npzdate from April, under croissant 5.1.x. That J2000 frame sat ~428″ off the zenith, which kept the error small. Measured at theruns.yamlstart time and latitude −90, the error is 1.4° under croissant 5.1.4 and 38.5° under Move onto croissant v5.3.0.dev2 and its s2fft fork; put sky alm in the Earth frame of date #12. Do not regenerate southpole data until #152 is fixed.The mapmaking results for the other sites are unaffected. Data and forward model share one
Simulator, so frame changes cancel: a re-run ofmars-lmax40moved relative reconstruction error by 0.006%.Changes
notebooks/sim_comparisons/raul_comparison.ipynb(new): setup and environment tagging, Raul's reference, sky and beams, the three cached simulations, the comparison figures and summary table, a results cell stating the conclusion, and a disabledbeam_az_rot=90convention check.notebooks/sim_comparisons/results/.gitignore: cached waterfalls are regenerable and stay out of git.sim_comparison.ipynb,sim_comparison_azrot0.ipynbandsim_comparison_azrot90.ipynb. The new notebook covers them, sinceBEAM_AZ_ROTis a parameter. They remain in history.docs/superpowers/specs/…-design.md,docs/superpowers/plans/….md: the design and implementation plan.Reproducing
Cell 0 contains the setup for the second kernel:
Run the notebook under that kernel first, then under the project kernel. Now that #12 is merged,
mainneeds to be the pre-#12 commit (daa5e7b) for the old environment. The inputs underdata/are gitignored, as they already were in this repo.Verification
uv run pytest: 111 passed on this exact tree.5.1.4,5.2.1+gitd972c5f).data/beam.npzanddata/feko_beam.npzhave the same md5 before and after.🤖 Generated with Claude Code
https://claude.ai/code/session_012qDDdFg7x9CVkj4EGVT8AE