Fix Adhi yoga: detect benefics occupying 6/7/8 from Moon (all -> any) - #73
Open
dfl wants to merge 1 commit into
Open
Fix Adhi yoga: detect benefics occupying 6/7/8 from Moon (all -> any)#73dfl wants to merge 1 commit into
dfl wants to merge 1 commit into
Conversation
…onfined there
adhi_yoga() and adhi_yoga_from_jd_place() used
`all(benefic in {6,7,8} from Moon)`, which requires *every* natural
benefic to lie inside that zone. A benefic placed elsewhere (e.g.
Jupiter in the 11th from the Moon) then cancels the yoga.
The classical rule constrains the houses (are the 6th/7th/8th from the
Moon occupied by benefics?), not the benefics (are all benefics confined
there). Varahamihira grades the yoga by how many benefics fall in the
zone (one = moderate, two = higher, three = ruler-like), so it forms
with as few as one benefic present. Changed `all` -> `any` so the yoga
is detected when a benefic occupies the 6th/7th/8th from the Moon.
This also aligns PyJHora with JHora's own output.
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
adhi_yoga()andadhi_yoga_from_jd_place()detect Adhi yoga withwhich requires every natural benefic to lie in the 6th/7th/8th from the Moon. A benefic placed outside that zone therefore cancels the yoga.
That inverts the classical rule. Adhi yoga constrains the houses — are the 6th/7th/8th from the Moon occupied by benefics? — not the benefics (it does not require all benefics to be confined there). Varāhamihira grades the yoga by how many benefics fall in the zone: one benefic → moderate, two → higher, three → "ruler-like", so it forms with as few as one benefic present.
The one-word fix is
all→any.References
Note (not changed here)
In
adhi_yoga(),_natural_benefics = const.natural_beneficsfollowed by_natural_benefics += [const.MERCURY_ID]mutates the module-levelconst.natural_beneficslist in place (aliasing), so Mercury can leak into the global default across calls. Left untouched to keep this PR single-purpose, but flagging it —_natural_benefics = _natural_benefics + [const.MERCURY_ID]would be safer.🤖 Generated with Claude Code