theriftlab / immanuel-python Goto Github PK
View Code? Open in Web Editor NEWQuickly produce both human-readable and JSON-formatted astrology chart data based on the Swiss Ephemeris and astro.com.
License: GNU Affero General Public License v3.0
Quickly produce both human-readable and JSON-formatted astrology chart data based on the Swiss Ephemeris and astro.com.
License: GNU Affero General Public License v3.0
Hi Robert,
Really digging Immanuel, it's been super useful. Ever thought about adding support for other languages? Noticed a lot of astrology libs are doing it.
I'm actually using Immanuel in Brazilian Portuguese and got quite a bit translated already. Happy to help with Spanish translations too.
Think it'd make Immanuel even more awesome for folks worldwide.
What do you say?
HI @theriftlab
I saw your last commit, but noticed an odd behavior on my code.
Then, I ran a simple test, like the ones you have on the 'test' folder
from immanuel.const import chart
print (
chart.NORTH_NODE,
chart.SOUTH_NODE,
chart.TRUE_NORTH_NODE,
chart.TRUE_SOUTH_NODE,
chart.VERTEX,
chart.LILITH,
chart.TRUE_LILITH,
chart.INTERPOLATED_LILITH,
chart.SYZYGY,
chart.PART_OF_FORTUNE,
chart.PART_OF_SPIRIT,
)
It seems like the code is not compliant with numbers on this file:
So it seems that, although you updated that link, some part of the code just "didn´t get the memo"
您好,想要相位数据,需要怎么设置
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)
Hi @theriftlab
Check this out:
from immanuel import charts
subject = charts.Subject('2024-04-29 06:15', '22S54', '43w06')
natal= charts.Natal(subject)
print(natal.objects[6000007])
The answer was:
True Lilith 16°27'33" in Libra, 6th House, Direct
But looking in Astro.com, it should be Virgo, 19º, 5th House, as you can see in the image.
Do you have any idea what I'm doing wrong?
I don't know if it's on any plan you have for the library.
I've being exploring the find function, which is very cool, but I encontered a limitattion: it only deals with planets (the "4000000" objects). I don't know how difficult it will be, but I think it will be great if we could work with other objects.
Let me give three examples:
1 - I wanna calculate the sunrise for a given day. So I could ask it to find when the Sun and the ASC will make a conjunction. But it gives me an error, because it calls functions that need information I can't provide.
2 - I could use it to find when a given object will be in a given sign
3 - Or it could help find, when a planet it will enter my 10th house.
Whenever you are thinking about upgrades on the find funcion (os similar function), it will be great if it receive these options.
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.
timestr = datetime.strftime(datetime.utcnow(), '%Y-%m-%d %H:%M:%S')
native = charts.Subject(
date_time=timestr,
latitude='51N00',
longitude='00W00',
)
default_body = charts.Natal(native)
print(default_body._houses)
print(default_body.native)
print(default_body.house_system)
print("moon:", default_body.moon_phase)
for house in default_body.houses.values():
print(house)
----------------------------------------------------->>>
Thu May 16 2024 10:05:47 BST at 51N0.0, 0E0.0
Placidus
moon: First Quarter
1st House 04°10'47" in Leo
2nd House 21°02'02" in Leo
3rd House 12°30'17" in Virgo
4th House 11°58'56" in Libra
5th House 21°23'01" in Scorpio
6th House 02°21'42" in Capricorn
7th House 04°10'47" in Aquarius
8th House 21°02'02" in Aquarius
9th House 12°30'17" in Pisces
10th House 11°58'56" in Aries
11th House 21°23'01" in Taurus
12th House 02°21'42" in Cancer
Hi @theriftlab .
I have an idea for the Aspect class: start and end dates.
For sure, it doesn't make sense in a Natal chart, but It will be very useful in some particular situations:
I know it can be tricky with some objects not moving in their typical direction, but, if possible, it will be very cool.
Hi,
first of all, awesome work you did there.
I just have a question regarding the progressed chart.
I have a person, born in Berlin on 1.1.1970
native = charts.Subject('1970-01-01 00:00', 52.490134, 13.3365914)
I want to calculate the daily horoscope for Tuesday - 17 January 2024, like on astro-seek.com:
So my approach is to do this:
progressed = charts.Progressed(native, '2024-01-17 00:00')
The birthchart is right, but for some reason i get very different data to astro.com & astro-seek.com for the progressed chart.
e.g. The Moon should be in the 7th house, but in the progressed chart its in the 11th house.
Hi @theriftlab,
I am collaborating with an astrologer on a project where we are using the Immanuel library to implement some specific astrological rules. While we've successfully integrated several rules, we're encountering challenges with others.
Here are some examples of her specific requirements:
I've attempted to use the settings module as suggested in the documentation, but it didn’t work for these particular cases.
Currently, I generate the chart and then manually filter out non-compliant aspects from the chart.aspects dictionary using multiple loops. This method is quite inefficient, particularly as our project has more specific needs. I would prefer not to loop for every little detail.
Is there a more streamlined way within the library to apply these rules before generating the chart? I've tried several approaches without success and couldn’t find relevant guidance in the documentation.
Thank you for your assistance.
Hi, first of all, thank you for providing this well-written api in astrology! I'm really enjoying it!
When I tried to output natal.objects in JSON format, the output didn't include dignities and score by default. I have read the docs and tried with settings and reports module, but still failed to include the dignities data. Could you please guide me on how to include dignities data in the natal.objects output? Thank you!
Here's what I have imported:
I assume I should do something with the setting. But I'm not sure how to do it.
This is what I called to get the natal.objects data:
print(json.dumps(natal.objects, cls=ToJSON, indent=4))
The output data ends with the key "out_of_bound", without "dignities" and "score" as displayed in doc/examples or doc/data
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.