Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about:natal.ascept #10

Closed
sunny3721BABY opened this issue Apr 27, 2024 · 4 comments
Closed

about:natal.ascept #10

sunny3721BABY opened this issue Apr 27, 2024 · 4 comments

Comments

@sunny3721BABY
Copy link

import datetime
from time import strftime
from immanuel.setup import settings
import swisseph as swe
from immanuel import charts
from immanuel.const import chart, calc
from immanuel.tools import position
import json
from immanuel.classes.serialize import ToJSON
native = charts.Subject(
date_time='1992-01-14 12:00:06',
latitude='57N00',
longitude='00W00',
)

natal = charts.Natal(native)
print(natal.aspects[chart.SUN][chart.MARS])
KeyError: 4000005
Do I need to make changes in the settings options, and how can I do it? I am a beginner, thank you.

@theriftlab
Copy link
Owner

There is no aspect detected between the Sun and Mars for that date. The key error just means there is no entry for Mars in the Sun's aspect list. A safer way to output aspects:

from immanuel import charts
from immanuel.const import chart


native = charts.Subject(
    date_time='1992-01-14 12:00:06',
    latitude='57N00',
    longitude='00W00',
)

natal = charts.Natal(native)

# Output aspects to Sun only
for aspect in natal.aspects[chart.SUN].values():
    print(aspect)

# ...or output all aspects
for index, aspects in natal.aspects.items():
    print(f'Aspects for {natal.objects[index].name}:')

    for aspect in aspects.values():
        print(f' - {aspect}')

@sunny3721BABY
Copy link
Author

Thank you very much for your work. The following piece of code is not working. Could you please take a look at it for me? Thank you very much!
from immanuel import charts
from immanuel.const import chart

def SearchKiteJupiter():
# Search for astrological kite configurations with Jupiter as the vertex.
native = charts.Subject(
date_time='2022-04-14 13:00:00',
latitude='57N00',
longitude='00W00',
)

natal = charts.Natal(native)
pointseq = []
# seq-->1.jupiter--SEXTILE--2.unknownpoint--TRINE--3.point(and oppo-->1.jupiter)--TRINE--4.unknownpoint
for aspect in natal.aspects[chart.JUPITER].values():
    pointseq.append(aspect._active_name) if aspect.type == "Sextile" else None
    pointseq2 = aspect._active_name if aspect.type == "Opposition" else None
    for aspect2 in natal.aspects[chart.[pointseq[0]]].values():

        pointseq3 = aspect2._active_name if aspect2.type == "Trine" and aspect2._active_name == pointseq2 else None
        for aspect3 in natal.aspects[chart.[pointseq3]].values():
            pointseq.append(aspect3._active_name) if aspect3.type == "Trine" else None

close = natal.aspects[pointseq[0]][pointseq[1]]

return "kite_j" if close.type == "Sextile" else None

@theriftlab
Copy link
Owner

I have purposely avoided including aspect patterns in Immanuel simply because of the complexity involved in calculating them accurately. This is due to the chart objects having different orbs and aspect rules, so what initially looks like a kite might not really be a kite.

Taking Jupiter as an example: Jupiter might oppose a certain object and trine two others (one on each side) which looks like a kite, but the opposing object is not always guaranteed to sextile those same two others. Differing orbs and rules might mean it aspects one and not the other, or neither of them. Often there are multiple objects opposing and trining/sextiling, and in that case every combination will need to be checked. The complexity grows exponentially with every added object.

It is of course possible, but not something I am ready to tackle just yet!

@sunny3721BABY
Copy link
Author

It's quite difficult for a beginner like me. Thank you for your advice and good luck!

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

No branches or pull requests

2 participants