Skip to content

add --elevation-limit CLI flag to di-calibrate and srclist-by-beam - #83

Merged
gsleap merged 1 commit into
mwalib2from
elevation-limit
May 15, 2026
Merged

add --elevation-limit CLI flag to di-calibrate and srclist-by-beam#83
gsleap merged 1 commit into
mwalib2from
elevation-limit

Conversation

@d3v-null

Copy link
Copy Markdown
Collaborator

Make the elevation cutoff in veto_sources configurable rather than fixed at compile time.

  • Rename constant ELEVATION_LIMIT -> DEFAULT_ELEVATION_LIMIT in constants.rs
  • Add min_elevation_deg: f64 parameter to veto_sources(); all callers updated (SkyModelWithVetoArgs, by_beam, vis-simulate passes the default)
  • Add --elevation-limit flag to SkyModelWithVetoArgs (used by di-calibrate) and SrclistByBeamArgs (srclist-by-beam); defaults to DEFAULT_ELEVATION_LIMIT (0°) when not supplied
  • Add test elevation_limit_rejects_sources verifying that a below-horizon source is always rejected, a zenith source survives reasonable limits, and an impossible limit (>90°) empties the source list

Make the elevation cutoff in veto_sources configurable rather than fixed
at compile time.
- Rename constant ELEVATION_LIMIT -> DEFAULT_ELEVATION_LIMIT in constants.rs
- Add `min_elevation_deg: f64` parameter to veto_sources(); all callers
  updated (SkyModelWithVetoArgs, by_beam, vis-simulate passes the default)
- Add --elevation-limit <DEG> flag to SkyModelWithVetoArgs (used by
  di-calibrate) and SrclistByBeamArgs (srclist-by-beam); defaults to
  DEFAULT_ELEVATION_LIMIT (0°) when not supplied
- Add test `elevation_limit_rejects_sources` verifying that a below-horizon
  source is always rejected, a zenith source survives reasonable limits, and
  an impossible limit (>90°) empties the source list
@gsleap
gsleap self-requested a review May 15, 2026 04:23
@gsleap
gsleap marked this pull request as draft May 15, 2026 04:25
@gsleap
gsleap changed the base branch from main to mwalib2 May 15, 2026 04:26
@gsleap
gsleap marked this pull request as ready for review May 15, 2026 04:27

@gsleap gsleap left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@gsleap
gsleap merged commit f73fe3e into mwalib2 May 15, 2026
11 of 12 checks passed
@d3v-null
d3v-null deleted the elevation-limit branch June 9, 2026 08:09
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.

2 participants