theriftlab / immanuel-python

Quickly produce both human-readable and JSON-formatted astrology chart data based on the Swiss Ephemeris and astro.com.
GNU Affero General Public License v3.0
44 stars 13 forks source link

相位 #5

Closed liu124 closed 7 months ago

liu124 commented 7 months ago

您好,想要相位数据,需要怎么设置 native = charts.Subject( date_time='2024-04-11 16:44', latitude='39.55', longitude='116.28', )

settings.set({ 'house_system': chart.CAMPANUS, 'mc_progression_method': calc.DAILY_HOUSES, })

settings.aspect_rules[chart.ASC] = settings.default_aspect_rule settings.objects.append(chart.CERES)

settings.aspects.append(calc.OPPOSITION) settings.aspects.append(calc.SESQUISQUARE)

natal = charts.Natal(native) progressed = charts.Progressed(native, '2024-04-11 16:44')

for object2 in progressed.objects.values(): print("===",object2)

theriftlab commented 7 months ago

Hi, are you able to rephrase in English? According to Google Translate you are looking to calculate a "phase" but I am unsure what kind of phase, or if this is a mistranslation. To find the moon phase you can simply try:

print(natal.moon_phase)

but I am not sure if this is what you're after in view of the progressed chart. I noticed you passed the natal date to the progressed chart too - this should be a future date to calculate progressions for that date.

liu124 commented 7 months ago

want arrows identification content

企业微信截图_17128877118894

theriftlab commented 7 months ago

OK you should be able to reproduce that data like this:

from immanuel import charts

native = charts.Subject(
    date_time='2024-04-12 10:07:06',
    latitude='39N55',
    longitude='116E28',
)

natal = charts.Natal(native)

print(natal.native, end='\n\n')

for object in natal.objects.values():
    print(f'{object}, {object.movement}' if hasattr(object, 'movement') else object)

print()

for house in natal.houses.values():
    print(house)

That should give you this output:

Fri Apr 12 2024 10:07:06 CST at 39N55.0, 116E28.0

Asc 09°08'29" in Cancer, 1st House
Desc 09°08'29" in Capricorn, 7th House
MC 18°03'19" in Pisces, 10th House
IC 18°03'19" in Virgo, 4th House
True North Node 15°36'01" in Aries, 10th House, Retrograde
True South Node 15°36'01" in Libra, 4th House, Retrograde
Vertex 26°28'47" in Scorpio, 5th House, Direct
Part of Fortune 24°08'56" in Leo, 3rd House, Stationary
True Lilith 23°57'27" in Virgo, 4th House, Retrograde
Sun 22°39'52" in Aries, 10th House, Direct
Moon 07°40'19" in Gemini, 12th House, Direct
Mercury 22°26'35" in Aries, 10th House, Retrograde
Venus 08°33'01" in Aries, 10th House, Direct
Mars 15°38'04" in Pisces, 9th House, Direct
Jupiter 19°47'09" in Taurus, 11th House, Direct
Saturn 14°48'32" in Pisces, 9th House, Direct
Uranus 21°20'38" in Taurus, 11th House, Direct
Neptune 28°18'30" in Pisces, 10th House, Direct
Pluto 02°00'10" in Aquarius, 8th House, Direct
Chiron 19°36'07" in Aries, 10th House, Direct

1st House 09°08'29" in Cancer
2nd House 28°56'41" in Cancer
3rd House 20°48'22" in Leo
4th House 18°03'19" in Virgo
5th House 23°18'37" in Libra
6th House 03°25'10" in Sagittarius
7th House 09°08'29" in Capricorn
8th House 28°56'41" in Capricorn
9th House 20°48'22" in Aquarius
10th House 18°03'19" in Pisces
11th House 23°18'37" in Aries
12th House 03°25'10" in Gemini

Hope this helps!

theriftlab commented 7 months ago

FYI the "Direct" etc. is now included by default as of v1.3.2, so if you upgrade you won't need print(f'{object}, {object.movement}' if hasattr(object, 'movement') else object) and can just use print(object) instead.

Closing this issue as it appears to be solved - let me know if it is not.

NodBr commented 7 months ago

hey, @theriftlab !

I gotta an idea. How about if, in the settings, the user could set some properties for those prints? For example, maybe someone wants the prints to have "direct/retrograde/stationary" info in their prints. But maybe someone doesn't.

For example: in my project, I'd love to have the info for "non-default state". For example: Planets are generally in direct motion. So, if a planet is in direct motion, I prefer to not have this info printed, but, if it's stationary or retrograde, I want this information to be shown. North and South Nodes are generally retrogrades, so I don't need to be remembered about it everytime, but I really want to know on those rare moments when they are direct.

Of course, I have a couple of "if-clauses" and "f-prints" that can deal with it, but maybe you get inspired to allow users to set this.

theriftlab commented 7 months ago

This is a good idea to prevent visual clutter with the textual output. I've pushed a change to make this the default, with a setting to toggle on/off. The next package release should have this included (which will likely be the Spanish translation unless any other major fixes/changes need to be released beforehand).