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
297 stars 103 forks source link

The number of houses is wrong when generating the SVG file #117

Closed Intekai closed 1 month ago

Intekai commented 2 months ago

The number of houses is wrong when generating the SVG file, e.g. it puts bull in house 8 ms the correct one is house 9.

g-battaglia commented 2 months ago

Can you share a code snippet of the problem?

Intekai commented 2 months ago

@app.route("/svgchartsingle", methods=['POST']) def svgchartsingle(): data = request.get_json()

if data is None:
    return jsonify({'error': 'Invalid JSON data'}), 400

chart_type = data['chart_type']

first_name = data['first']['name']
first_year = data['first']['year']
first_month = data['first']['month']
first_day = data['first']['day']
first_hour = data['first']['hour']
first_minute = data['first']['minute']
first_city = data['first']['city']
first_nation = data['first']['nation']
first_lng = data['first']['lng']
first_lat = data['first']['lat']
first_tz_str = data['first']['tz_str']
first_zodiac_type=data['first']['zodiac_type']

first = AstrologicalSubject(
    name=first_name,
    year=first_year,
    month=first_month,
    day=first_day,
    hour=first_hour,
    minute=first_minute,
    city=first_city,
    nation=first_nation,
    lng=first_lng,
    lat=first_lat,
    tz_str=first_tz_str,
    zodiac_type=first_zodiac_type,
    geonames_username="alimohsin" 

)

name = KerykeionChartSVG(first_obj=first,
                         chart_type=chart_type,
                         new_output_directory=".",
                         )

return name.makeTemplate()
Intekai commented 2 months ago

I also looked at the reports the houses are wrong

Intekai commented 2 months ago

image

Intekai commented 2 months ago

image

sengiv commented 2 months ago

The number of houses is wrong when generating the SVG file, e.g. it puts bull in house 8 ms the correct one is house 9.

@Intekai I suspect 🤔 you're seeing discrepancy because of different "Ayanamsa". VedAstro defaults to "Lahiri", you'll have to change to "Fagan Bradley" or something else to match with the default Ayanamsa used by Kerykeion (which i'm not sure which is 😁)

g-battaglia commented 2 months ago

@Intekai I confirm what said by @sengiv, so far Kerykeion has just Fagan Bradley as sidereal mode. In the next release major release (version 5.0.0) I will definitely implement all the possibile sidereal modes.

g-battaglia commented 2 months ago

@Intekai I updated the AstrologicalSubject class to have the possibility to set a sidereal mode (Ayanamsa), here a code snippet as example:

johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")

Let me know if it works!

Intekai commented 2 months ago

hello the calculation is now correct but not the order of the houses which is reversed you see it anti-clockwise image

g-battaglia commented 2 months ago

Sorry I didn't understand, the houses or the sings are in the wrong position? You mean that the whole chart should be reversed?

g-battaglia commented 2 months ago

Cha you check with some other online tools? For instance I checked this: https://zodiacal.com/create-a-birth-chart-sidereal-fagan-bradley/

And it return the same structure of the Kerykeion chart

g-battaglia commented 1 month ago

Closing since no other answers, I consider it fixed.