Reputation: 17
Hello I'm working on astrology software but I have a problem
def solar_longitude(jd):
"""Solar longitude at given instant (julian day) jd"""
data = swe.calc_ut(jd, swe.SUN, flag = swe.FLG_SWIEPH)
return data[0] # in degrees
def lunar_longitude(jd):
"""Lunar longitude at given instant (julian day) jd"""
data = swe.calc_ut(jd, swe.MOON, flag = swe.FLG_SWIEPH)
return data[0] # in degrees
def lunar_phase(jd):
solar_long = solar_longitude(jd)
lunar_long = lunar_longitude(jd)
moon_phase = (lunar_long - solar_long) % 360
return moon_phase
print(lunar_phase(2455027.75138))
output---
moon_phase = (lunar_long - solar_long) % 360
TypeError: unsupported operand type(s) for -: 'tuple' and 'tuple'
Please help with this problem
Upvotes: 0
Views: 563