g-battaglia / kerykeion

Data driven Astrology 💫
Kerykeion is a python library for astrology. It can generate SVG charts and extract all data about a birthchart, a synastry chart and a transit chart.
https://kerykeion.net
GNU Affero General Public License v3.0
298 stars 103 forks source link

Sidereal houses calculation #69

Closed MateKristof closed 8 months ago

MateKristof commented 1 year ago

Hi! Could you modify the main.py line 210 for this ? This will calculates the sidereal houses correctly.

        """
        https://www.astro.com/faq/fq_fh_owhouse_e.htm
        https://github.com/jwmatthys/pd-swisseph/blob/master/swehouse.c#L685
        hsys = letter code for house system;
            A  equal
            E  equal
            B  Alcabitius
            C  Campanus
            D  equal (MC)
            F  Carter "Poli-Equatorial"
            G  36 Gauquelin sectors
            H  horizon / azimut
            I  Sunshine solution Treindl
            i  Sunshine solution Makransky
            K  Koch
            L  Pullen SD "sinusoidal delta", ex Neo-Porphyry
            M  Morinus
            N  equal/1=Aries
            O  Porphyry
            P  Placidus
            Q  Pullen SR "sinusoidal ratio"
            R  Regiomontanus
            S  Sripati
            T  Polich/Page ("topocentric")
            U  Krusinski-Pisa-Goelzer
            V  equal Vehlow
            W  equal, whole sign
            X  axial rotation system/ Meridian houses
            Y  APC houses
        """

        # creates the list of the house in 360°
        if self.zodiac_type == "Sidereal":
            self.houses_degree_ut = swe.houses_ex(tjdut=self.julian_day,
                                                  lat=self.lat,
                                                  lon=self.lng,
                                                  hsys=str.encode('P'),
                                                  flags=swe.FLG_SIDEREAL)[0]

        else:
            self.houses_degree_ut = swe.houses(tjdut=self.julian_day,
                                               lat=self.lat,
                                               lon=self.lng,
                                               hsys=str.encode('P'))[0]
g-battaglia commented 1 year ago

Hi, it should be fixed in the current version (4.1.1), please report if it works!