Repository navigation
deps: bump croissant-sim to v5.3.0.dev4 - #16
Merged
Merged
Conversation
Moves the pin from v5.3.0.dev3 to v5.3.0.dev4.
Prepared by croissant's scripts/bump_consumers.py; this passed
against the new pin:
uv run --all-extras pytest -q tests/test_beam.py tests/test_horizon.py tests/test_map.py tests/test_rotation_investigation.py tests/test_sim.py tests/test_sky.py
croissant v5.3.0.dev4 adds horizon_frame="topocentric" so a terrain mask stays fixed to the ground while the beam rotates (croissant#156). mistsim's Beam had no way to pass it, so terrain users had to counter-rotate (and mirror) their masks by hand. - Beam takes horizon_frame (default "beam", the existing behaviour) and forwards it to croissant.Beam. - Docstring: the beam-grid convention (A = beam_az_rot - phi, so phi = 90 deg is West at beam_az_rot = 0), fractional horizon weights and croissant's fractional default, and the topocentric ground grid (phi = 0 East, phi = 90 deg North, phi = 90 - A), with the interpolation caveat for off-column rotations. - Tests: default is "beam"; unknown values raise; a ground-fixed sector lands at the same compass azimuth for beam_az_rot = 0, 40 and 233 deg; the default frame keeps the mask on the beam; and for an asymmetric beam, fgnd with the topocentric mask equals fgnd with a hand counter-rotated beam-frame mask. Dropping the forward fails 5 of these. Validation: 83 passed on PR #16's test set (its 76 plus 7 new). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…entric") A horizon mask describes what blocks the sky from where the antenna stands (terrain, buildings, the ground), all fixed to the ground. Until now mistsim applied it on the beam grid, so it turned with beam_az_rot and terrain was misplaced whenever the beam was rotated, unless the caller counter-rotated the mask by hand. Antenna-attached structures belong in the EM beam pattern, never in a mask. The catch, and how it is handled: croissant's ground grid has phi = 0 at East (A = 90 - phi), while mistsim's beam grid at beam_az_rot = 0 has phi = 0 at North and phi = 90 deg at West (A = -phi). Flipping croissant's default through would turn every phi-dependent mask by 90 deg even with no rotation. So mistsim's ground grid is defined as the beam grid at beam_az_rot = 0 (the grid users already write masks on), and mistsim shifts the mask by 90 deg onto croissant's ground grid before passing it on, with croissant's own periodic shift. The shift is exact when 90 deg is whole grid columns (1-deg MWSS, every HEALPix ring) and interpolated otherwise. Consequences: - beam_az_rot = 0: identical weights and fgnd to the old behaviour (tested on MWSS and HEALPix). - theta-only masks (what the pipeline builds): identical at any rotation (tested). - phi-dependent masks with beam_az_rot != 0: now stay on the ground. Callers who counter-rotated by hand must drop that step or pass horizon_frame="beam", now documented as only for such masks. - The horizon attribute holds croissant's ground-grid weights; horizon_in_beam_frame gives the weights applied. Uses croissant.horizon._horizon_in_beam_frame (private; mistsim pins croissant exactly). Tests: 11 horizon-frame tests in tests/test_beam.py. Removing the conversion fails 6; flipping the offset sign fails 6. Validation: 87 passed on PR #16's test set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
This PR also changes mistsim's horizon handling. Beam now defaults to horizon_frame="topocentric" and the mask stays fixed to the ground at any beam_az_rot. The mask is given on the beam grid as it is at beam_az_rot = 0 (φ = 0 North, φ = 90° West, so a compass azimuth A sits at φ = −A). mistsim shifts it onto croissant's ground grid (φ = 0 East) internally. |
christianhbye
added a commit
that referenced
this pull request
Oct 7, 2026
croissant v5.3.0.dev4 adds horizon_frame="topocentric" so a terrain mask stays fixed to the ground while the beam rotates (croissant#156). mistsim's Beam had no way to pass it, so terrain users had to counter-rotate (and mirror) their masks by hand. - Beam takes horizon_frame (default "beam", the existing behaviour) and forwards it to croissant.Beam. - Docstring: the beam-grid convention (A = beam_az_rot - phi, so phi = 90 deg is West at beam_az_rot = 0), fractional horizon weights and croissant's fractional default, and the topocentric ground grid (phi = 0 East, phi = 90 deg North, phi = 90 - A), with the interpolation caveat for off-column rotations. - Tests: default is "beam"; unknown values raise; a ground-fixed sector lands at the same compass azimuth for beam_az_rot = 0, 40 and 233 deg; the default frame keeps the mask on the beam; and for an asymmetric beam, fgnd with the topocentric mask equals fgnd with a hand counter-rotated beam-frame mask. Dropping the forward fails 5 of these. Validation: 83 passed on PR #16's test set (its 76 plus 7 new). Co-Authored-By: Claude Opus 5.5 <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.
Updates mistsim's Croissant pin from
v5.3.0.dev3tov5.3.0.dev4and refreshes the lockfile, resolving toa83a9864162b64466a85654fc1a4a2072f92e743. The s2fft fork pin stays the same.The new tag includes integration-window averaging, corrected fractional default horizons, and ground-fixed horizon masks. Results can change for beams using Croissant's default horizon with response at the boundary. Explicit boolean/fractional masks retain their behavior; snapshots and beam-frame masks remain the defaults. Mistsim's beam wrapper continues to forward its existing horizon masks without code changes. See the Croissant changelog.
Validation against the resolved tag: 76 passed with
uv run --all-extras pytest -q tests/test_beam.py tests/test_horizon.py tests/test_map.py tests/test_rotation_investigation.py tests/test_sim.py tests/test_sky.py(Python 3.13). Prepared and tested with Croissant'sscripts/bump_consumers.py.