Skip to content

Change Bennett refraction algorithm to use apparent elevation - #166

Merged
AdamRJensen merged 5 commits into
mainfrom
AdamRJensen-patch-2
Oct 26, 2026
Merged

AdamRJensen merged 5 commits into
mainfrom
AdamRJensen-patch-2

Conversation

@AdamRJensen

Copy link
Copy Markdown
Member

Closes #162

Updated function parameters and documentation to reflect the use of apparent solar elevation angle instead of true solar elevation angle.
@AdamRJensen AdamRJensen added the bug Something isn't working label Oct 20, 2026
@AdamRJensen
AdamRJensen requested a balanced review from Copilot October 20, 2026 09:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Existing Bennett tests still use the removed elevation keyword and fail with TypeError.

1 open issue
What changed in this PR

Corrects Bennett’s input semantics to use apparent solar elevation, addressing the direction mismatch described in #162 without changing the numerical formula.

Changes:

  • Renames the input parameter to apparent_elevation.
  • Updates documentation and adds a warning distinguishing Bennett from true-elevation refraction models.
File Description
src/​solposx/​refraction/​bennett.py Aligns the parameter, formula notation, and documentation with apparent elevation.

Review effort: Balanced

Comment thread src/solposx/refraction/bennett.py Resolved
@kandersolar

Copy link
Copy Markdown
Member

Can we start a new section here: https://solposx--166.org.readthedocs.build/en/166/refraction.html

With brief sentences indicating the direction (true -> apparent vs apparent -> true)

@kandersolar kandersolar 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.

Needs a what's new entry, but otherwise LGTM

@AdamRJensen
AdamRJensen merged commit d34c697 into main Oct 26, 2026
3 of 20 checks passed
@AdamRJensen
AdamRJensen deleted the AdamRJensen-patch-2 branch October 26, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bennett's refraction algorithm computes true from apparent, not apparent from true

3 participants