Table of Contents
trinal_aspects_of_the_raasi (house_planet_dict, raasi)
trinal_aspects_of_the_planet (house_planet_dict, planet)
sextile_aspects_of_the_raasi (house_planet_dict, raasi)
sextile_aspects_of_the_planet (house_planet_dict, planet)
square_aspects_of_the_raasi (house_planet_dict, raasi)
square_aspects_of_the_planet (house_planet_dict, planet)
benefic_aspects_of_the_raasi (house_planet_dict, raasi)
benefic_aspects_of_the_planet (house_planet_dict, planet)
planet_has_benefic_aspect_on_house (house_planet_dict, planet, house)
semi_sextile_aspects_of_the_raasi (house_planet_dict, raasi)
semi_sextile_aspects_of_the_planet (house_planet_dict, planet)
neutral_aspects_of_the_raasi (house_planet_dict, raasi)
neutral_aspects_of_the_planet (house_planet_dict, planet)
opposition_aspects_of_the_raasi (house_planet_dict, raasi)
opposition_aspects_of_the_planet (house_planet_dict, planet)
conjunction_aspects_of_the_raasi (house_planet_dict, raasi)
conjunction_aspects_of_the_planet (house_planet_dict, planet)
malefic_aspects_of_the_raasi (house_planet_dict, raasi)
malefic_aspects_of_the_planet (house_planet_dict, planet)
planets_have_benefic_aspects (house_planet_dict,planet1, planet2)
planets_have_malefic_aspects (house_planet_dict, planet1, planet2)
planets_have_neutral_aspects (house_planet_dict, planet1, planet2)
planets_have_aspects (house_planet_dict, planet1, planet2)
planet_has_malefic_aspect_on_house (house_planet_dict, planet, house)
aspects_of_the_raasi (house_planet_dict, raasi)
aspects_of_the_planet (house_planet_dict, planet)
annual_chart (jd_at_dob, place, divisional_chart_factor=1, years=1)
monthly_chart (jd_at_dob, place, divisional_chart_factor=1, years=1, months=1)
harsha_bala (p_to_h, new_year_daytime_start=True)
pancha_vargeeya_bala(jd, place)
dwadhasa_vargeeya_bala (jd, place)
lord_of_the_year (jd_at_dob, place, years_from_dob)
lord_of_the_month (jd_at_dob, place, years_from_dob, months_from_dob)
both_planets_within_their_deeptamsa (planet_positions, planet1, planet2)
both_planets_approaching (planet_positions, planet1, planet2)
ishkavala_yoga (planet_to_house_dict,asc_house)
induvara_yoga (planet_to_house_dict, asc_house)
ithasala_yoga (planet_positions, planet1, planet2)
eesarpha_yoga (planet_positions, planet1, planet2)
get_nakta_yoga_planet_triples (planet_positions)
get_yamaya_yoga_planet_triples (planet_positions)
get_eesarpha_yoga_planet_pairs (planet_positions)
get_ithasala_yoga_planet_pairs (planet_positions)
get_manahoo_yoga_planet_pairs (planet_positions)
get_kamboola_yoga_planet_pairs (planet_positions)
get_radda_yoga_planet_pairs (planet_positions)
get_duhphali_kutta_yoga_planet_pairs (jd, place)
punya_saham (planet_positions,night_time_birth=False):
vidya_saham (planet_positions,night_time_birth=False):
yasas_saham (planet_positions,night_time_birth=False):
mitra_saham (planet_positions,night_time_birth=False):
mahatmaya_saham (planet_positions,night_time_birth=False):
asha_saham (planet_positions,night_time_birth=False):
samartha_saham (planet_positions,night_time_birth=False):
bhratri_saham (planet_positions):
gaurava_saham (planet_positions,night_time_birth=False):
pithri_saham (planet_positions,night_time_birth=False):
rajya_saham (planet_positions,night_time_birth=False):
maathri_saham (planet_positions,night_time_birth=False):
puthra_saham (planet_positions,night_time_birth=False):
jeeva_saham (planet_positions,night_time_birth=False):
karma_saham (planet_positions,night_time_birth=False):
roga_saham (planet_positions,night_time_birth=False):
roga_sagam_1(planet_positions,night_time_birth=False):
kali_saham (planet_positions,night_time_birth=False):
sastra_saham (planet_positions,night_time_birth=False):
bandhu_saham (planet_positions,night_time_birth=False):
mrithyu_saham (planet_positions):
paradesa_saham (planet_positions,night_time_birth=False):
artha_saham (planet_positions,night_time_birth=False):
paradara_saham (planet_positions,night_time_birth=False):
vanika_saham (planet_positions,night_time_birth=False):
karyasiddhi_saham (planet_positions,night_time_birth=False):
vivaha_saham (planet_positions,night_time_birth=False):
santapa_saham (planet_positions,night_time_birth=False):
sraddha_saham (planet_positions,night_time_birth=False):
preethi_saham (planet_positions,night_time_birth=False):
jadya_saham (planet_positions,night_time_birth=False):
vyaapaara_saham (planet_positions):
sathru_saham (planet_positions,night_time_birth=False):
jalapatna_saham (planet_positions,night_time_birth=False):
bandhana_saham (planet_positions,night_time_birth=False):
apamrithyu_saham (planet_positions,night_time_birth=False):
laabha_saham (planet_positions,night_time_birth=False):
hora
!- horoscope
!- horoscope.py - horoscope class
!- chart - chart package
!- arudhas.py - arudhas, argala, virodhargal
!- ashtavarga.py - ashtavarga, trikona sodhana, ekadhipatya_sodhana, sodhaya pinda
!- charts.py - divisional charts, planet combustion, retrograde
!- house.py - aspects, drishti,stronger planets/raasi, kaarakas
!- yoga.py - 100+ yogas
!- raja_yoga.py - raja_yoga and its sub-types
!- dhasa - dhasa package
!- ashtottari.py - ashtottari dhasa-bhuthi
!- drig.py - drigdhasa-bhuthi
!- kalachakra.py - kalachakra dhasa-bhuthi
!- moola.py - moola dhasa-bhuthi
!- mudda.py - mudda dhasa-bhuthi
!- narayana.py - narayana dhasa-bhuthi
!- nirayana.py - nirayana dhasa-bhuthi
!- patyayini.py - patyayini dhasa-bhuthi
!- shoola.py - shoola dhasa-bhuthi
!- sudasa.py - sudasa dhasa-bhuthi
!- sudharsana_chakra.py - sudharsana_chakra dhasa-bhuthi
!- vimsottari.py - vimsottari dhasa-bhuthi
!- match - marriage compatibility package
!- compatibility.py - marriage compatibility
!- transit - tajaka package
!- tajaka.py - annual, monthly and 60 hour charts, muntha, vargeeya balas, tajaka lord
!- tajaka_yoga.py - tajaka yogas
!- saham.py - 36 sahams
import swisseph as swe
from hora import const,utils
from hora.panchanga import panchanga
from hora.horoscope.chart import charts, house
Muntha house at n years after birth is nth house from Lagna. For example at 51th year, 50th house (i.e 4x12+2, 2nd house) from lagna
muntha_house = lambda ascendant_house,years: (ascendant_house+years)%12
Trinal Aspects of the Raasi
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param raasi:Raasi index whose trinal aspects is sought
@return: aspected Raasis, aspected planets - as a list
Trinal Aspects of the planet (strong benefic aspect)
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet:Planet index whose trinal aspects is sought
@return: aspected raasis, aspected planets - as a list
Sextile Aspects of the Raasi
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param raasi:Raasi index whose sextile aspects is sought
@return: aspected Raasis, aspected planets - as a list
Sextile Aspects of the planet (weak benefic aspect)
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet:Planet index whose sextile aspects is sought
@return: aspected raasis, aspected planets - as a list
Square Aspects of the Raasi
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param raasi:Raasi index whose square aspects is sought
@return: aspected Raasis, aspected planets - as a list
Square Aspects of the planet (weak maleefic aspect)
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet:Planet index whose sextile aspects is sought
@return: aspected raasis, aspected planets - as a list
Benefic Aspects of the Raasi
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param raasi:Raasi index whose benefic aspects is sought
@return: aspected Raasis, aspected planets - as a list
Benefic Aspects of the planet (weak maleefic aspect)
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet:Planet index whose benefic aspects is sought
@return: aspected raasis, aspected planets - as a list
Return True/False if planet has benefic on a house
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet:Planet index whose benefic aspects is sought
@param house:House index whose benefic aspects is sought
@return: True/False
Semi sextile Aspects of the Raasi
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param raasi:Raasi index whose semi sextile aspects is sought
@return: aspected Raasis, aspected planets - as a list
Semi sextile Aspects of the planet (Neutral aspect)
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet:palnet index whose semi sextile aspects is sought
@return: aspected Raasis, aspected planets - as a list
Neutral Aspects of the Raasi
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param raasi:Raasi index whose neutral aspects is sought
@return: aspected Raasis, aspected planets - as a list
Neutral Aspects of the Planet
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet:planet index whose neutral aspects is sought
@return: aspected Raasis, aspected planets - as a list
Opposition Aspects of the Raasi (Strong Malefic Aspect)
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param raasi:Raasi index whose opposition aspects is sought
@return: aspected Raasis, aspected planets - as a list
Opposition Aspects of the Planet (Strong Malefic Aspect)
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet:Planet index whose opposition aspects is sought
@return: aspected Raasis, aspected planets - as a list
Conjunction Aspects of the Raasi
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param raasi:Raasi index whose conjunction aspects is sought
@return: aspected Raasis, aspected planets - as a list
Conjunction Aspects of the Planet (strong malefic aspect)
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet:Planet index whose conjunction aspects is sought
@return: aspected Raasis, aspected planets - as a list
Malefic Aspects of the Raasi
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param raasi:Raasi index whose malefic aspects is sought
@return: aspected Raasis, aspected planets - as a list
Malefic Aspects of the Planet
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet:Planet index whose malefic aspects is sought
@return: aspected Raasis, aspected planets - as a list
Return True/False if planet1 and planet2 have benefic aspects on each other
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet1:Planet1 index whose benefic aspects is sought
@param planet1:Planet2 index whose benefic aspects is sought
@return: True/False if both planets have benefic aspect on each other
Return True/False if planet1 and planet2 have malefic aspects on each other
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet1:Planet1 index whose malefic aspects is sought
@param planet1:Planet2 index whose malefic aspects is sought
@return: True/False if both planets have malefic aspect on each other
Return True/False if planet1 and planet2 have neutral aspects on each other
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet1:Planet1 index whose neutral aspects is sought
@param planet1:Planet2 index whose neutral aspects is sought
@return: True/False if both planets have neutral aspect on each other
Return True/False if planet1 and planet2 have ANU aspects on each other
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet1:Planet1 index whose aspects is sought
@param planet1:Planet2 index whose aspects is sought
@return: True/False if both planets have ANY aspect on each other
Return True/False if planet has malefic aspect on the house
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet:Planet index whose malefic aspects is sought
@param house:House index whose malefic aspects is sought
@return: True/False if planet has malefic aspect on the house
Return benefic, malefic and neutral aspected of the rasi
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param raasi:Raasi index whose malefic aspects is sought
@return aspected houses, aspected planets
Return benefic, malefic and neutral aspects of the planet
@param house_to_planet_dict: list of raasi with planet ids in them
Example: ['','','','','2','7','1/5','0','3/4','L','','6/8'] 1st element is Aries and last is Pisces
@param planet:Planet index whose malefic aspects is sought
@return aspected houses, aspected planets
Also can be called using:
varsha_pravesh (jd_at_dob, place, divisional_chart_factor=1, years=1)
Create Tajaka Annual Chart. Tajaka annual chart is chart for one year at "years" from date of birth/time of birth
@param jd_at_dob: Julian Day nummber at date/time of birth
Note: You can use swe.julday(dob_year,dob_month,dob_day,tob_hour+tob_minutes/60.0+tob_seconds/3600.0) to get
@param place: should be a struct os panchanga.Place (place,latitude,longitude,time_sone_factor)
@param divisional_chart_factor: 1=Rasi, 2=Hota, 9=navamsa etc. See panchanga.division_chart_factors for details
@param years: number of years after dob the dhasa varga chart is sought
@return: Tjaka annual dhasa varga chart as list of planets
Also can be called using:
maasa_pravesh (jd_at_dob, place, divisional_chart_factor=1, years=1, months=1)
Create Tajaka monthly Chart. Tajaka monthly chart is chart for nth month at "years" from date of birth/time of birth
@param jd_at_dob: Julian Day nummber at date/time of birth
Note: You can use swe.julday(dob_year,dob_month,dob_day,tob_hour+tob_minutes/60.0+tob_seconds/3600.0) to get
@param place: should be a struct os panchanga.Place (place,latitude,longitude,time_sone_factor)
@param divisional_chart_factor: 1=Rasi, 2=Hota, 9=navamsa etc. See panchanga.division_chart_factors for details
@param years: number of years after dob the dhasa varga chart is sought
@param months: number of month after years after dob the dhasa varga chart is sought
@return: Tjaka annual dhasa varga chart as list of planets
Create Tajaka sizty hour Chart.
@param jd_at_dob: Julian Day nummber at date/time of birth
Note: You can use swe.julday(dob_year,dob_month,dob_day,tob_hour+tob_minutes/60.0+tob_seconds/3600.0) to get
@param place: should be a struct os panchanga.Place (place,latitude,longitude,time_sone_factor)
@param divisional_chart_factor: 1=Rasi, 2=Hota, 9=navamsa etc. See panchanga.division_chart_factors for details
@param years: number of years after dob the dhasa varga chart is sought
@param months: number of month after years after dob the dhasa varga chart is sought
@param sizty_hour_count: number of 2.5 days in the tajaka month after years after dob the dhasa varga chart is sought
@return: Tjaka annual dhasa varga chart as list of planets
computes the harsha bala score of the planets
@param p_to_h: Planet to House dictionary in the format:
={0:1,1:0,2:3...} # Sun in Ta, Moon in Ar, Mars in Ge etc
@param new_year_daytime_start: If the birth time on the annual chart is daytime or nighttime
For example.If some one was born 11:00 AM in 1970 and 25th year the same time is equivalent to say 7 pm
because a solar year 365.2583 days then 24*365.2583 could lead to 7pm - so new_year_daytime_start = False
@return: Harsha Bala score for each planet - as a list
Example: {0: 0, 1: 15, 2: 0, 3: 10, 4: 5, 5: 10, 6: 5} - Sun's score = 0, Venus's score = 10
computes the Pancha Vargeeya bala score of the planets
Keshetra Bala:
A planet gets 30 units of Bala in own sign, 22.5 units in friendly sign, 15 units in neutral sign
and 7.5 units in an enemy sign.
Drekkana Bala
A planet in own rasi in D-3 gets 10 units of Drekkana bala. A planet in a friend’s rasi in D-3 gets 5 units of
Drekkana bala. A planet in an enemy’s rasi in D-3 gets 2.5 units of Drekkana bala.
Navamsa Bala
A planet in own rasi in D-9 gets 5 units of Navamsa bala. A planet in a friend’s rasi in D-9 gets 2.5 units of
Navamsa bala. A planet in an enemy’s rasi in D-9 gets 1.25 units of Navamsa bala.
Uchcha Bala
Uchcha bala shows how close a planet is from its exaltation point. A planet gets 20
units of uchcha bala if it is at its deep exaltation point (Sun: 10º Ar, Moon: 3º Ta,
Mars: 28º Cp, Mercury: 15º Vi, Jupiter: 5º Cn, Venus: 27º Pi, Saturn: 20º Li). At
180º from its deep exaltation point, a planet is deeply debilitated and it gets 0 units of
uchcha bala.
Hadda Bala
A planet in own hadda gets 15 units of Hadda bala. A planet in a friend’s hadda gets 7.5 units of Hadda bala.
A planet in an enemy’s hadda gets 3.75 units of Hadda bala.
@param jd: Julian Day Number (of the annual day
@param place: panchanga.Place struct: Place('place_name',latitude, longitude, timezone)
@return: Pancha Vargeeya Bala score for each planet - as a list
Example: [15.72, 14.27, 13.0, 6.33, 11.87, 16.05, 6.45] - Sun's score = 15.72, Venus's score = 16.05
Calculates dwadhasa_vargeeya_bala score of the planets
@param jd: Julian Day Number (of the annual day
@param place: panchanga.Place struct: Place('place_name',latitude, longitude, timezone)
@return: returns dict of strong (>0) and weak (<0) planets. Also returns list of only strong planets
Example: {0: -4, 1: 0, 2: -4, 3: 2, 4: 0, 5: -2, 6: 2} [3, 6]
Get the Lord of the year/annual chart - Get natal lagna house from birth chart
@param jd_at_dob: Julin Day Number for the date of birth
@param place: pancha.Place Struct Place('place name',latitude,longitude,timezone)
@param years_from_dob:# of years from date of birth.
For example if Lord of the 25th year from DOB, then years_from_dob=25
@return: Lord of the year (planet index) [0..6]
Note: Rahu/Ketu dont form lord of the year
Get the Lord of the monthly chart - Get natal lagna house from birth chart
@param jd_at_dob: Julin Day Number for the date of birth
@param place: pancha.Place Struct Place('place name',latitude,longitude,timezone)
@param years_from_dob:# of years from date of birth.
For example if Lord of the 25th year from DOB, then years_from_dob=25
@param months_from_dob:# of months on the years_from_dob.
For example if 10th month of 25th year from DOB, then months_from_dob=10
@return: Lord of the month (planet index) [0..6]
Note: Rahu/Ketu dont form lord of the month
Check if two planets are within their deeptamsa
@param planet_positions: Planet Positions in the format [[planet,(raasi,longitude)],...]
@param planet1: First planet index
@param planet2: Second planet index comapred against
@return: True/False, Ithasala Type
Ithasala Type: 1. Varthamaana ithasala, 2. Bhavishya ithasala, 3. Poorna ithasala
Check if two planets are approaching each other
NOTE: TODO: Check if planets in retrograde so they are moving away
@param planet_positions: Planet Positions in the format [[planet,(raasi,longitude)],...]
@param planet1: First planet index
@param planet2: Second planet index comapred against
@return: True/False
import itertools
from hora import const,utils
from hora.horoscope.chart import house
from hora.horoscope.transit import tajaka
Ishkavala Yoga
If planets occupy only kendras (1st, 4th, 7th and 10th houses) and panapharas (2nd, 5th,
8th and 11th houses) and if apoklimas (3rd, 6th, 9th and 12th houses) are empty, then
this yoga is present. This yoga gives wealth, happiness and good fortune.
@param planet_to_house_dict: Example {0:1.1:2,2:0,..'L':1}
@param asc_house: Raasi index of the ascendant/Lagnam
@return: True/False - whether ishkaval yoga is present or not
Induvara Yoga
If planets occupy only apoklimas (3rd, 6th, 9th and 12th houses) and if kendras (1st, 4th,
7th and 10th houses) and panapharas (2nd, 5th, 8th and 11th houses) are empty, then this
yoga is present. This yoga gives disappointments, worries and illnesses.
@param planet_to_house_dict: Example {0:1.1:2,2:0,..'L':1}
@param asc_house: Raasi index of the ascendant/Lagnam
@return: True/False - whether induvara yoga is present or not
Ithasala Yoga
If two planets have an aspect and if the faster moving planet83 is less advanced in its
rasi than the slower moving planet, then we have an ithasala yoga between the two.
@param planet_to_house_dict: Example {0:1.1:2,2:0,..'L':1}
@param asc_house: Raasi index of the ascendant/Lagnam
@return: True/False - whether induvara yoga is present or not
@param planet_positions: [ ['L',(7,12,3456)], [0,(4,112,3456)],...]]
@param asc_house: Raasi index of the ascendant/Lagnam
@return: True/False - whether yoga is present or not
nakta yoga between p2 and p3 if
p1 & p2 and p1 & p3 have ithasala yoga between them
but p2 and p3 have no aspects
@param planet_positions: [ ['L',(7,12,3456)], [0,(4,112,3456)],...]]
@return: List of natka yoga triples
yamaya yoga between p2 and p3 if
p1 & p2 and p1 & p3 have ithasala yoga between them
but p2 and p3 have no aspects
@param planet_positions: [ ['L',(7,12,3456)], [0,(4,112,3456)],...]]
@return: List of yamaya yoga triples
Get eeasrpha yoga planet pairs
@param planet_positions: [ ['L',(7,12,3456)], [0,(4,112,3456)],...]]
@return: List of eesarpha yoga pairs
Get ithasala yoga planet pairs
@param planet_positions: [ ['L',(7,12,3456)], [0,(4,112,3456)],...]]
@return: List of ithasala yoga pairs
Get manahoo yoga planet pairs
@param planet_positions: [ ['L',(7,12,3456)], [0,(4,112,3456)],...]]
@return: List of manahoo yoga pairs
Get kamboola yoga planet pairs
@param planet_positions: [ ['L',(7,12,3456)], [0,(4,112,3456)],...]]
@return: List of kamboola yoga pairs
Get radda yoga planet pairs
@param planet_positions: [ ['L',(7,12,3456)], [0,(4,112,3456)],...]]
@return: List of radda yoga pairs
Get duhphali kutta yoga planet pairs
@param jd: Julian Day Number
@param place: panchanga.Place struct ('place name',latitude, longitude, timezone)
@return: List of duhphali kutta yoga pairs
Saham calculation
saham has a formula that looks like A – B + C. What this means is that we take the
longitudes of A, B and C and find (A – B + C). This is equivalent to finding how far
A is from B and then taking the same distance from C. However, if C is not between
B and A (i.e. we start from B and go zodiacally till we meet A and we do not find C
on the way), then we add 30º to the value evaluated above.
from hora import const, utils
from hora.panchanga import panchanga
from hora.horoscope.chart import charts, house
saham_longitude = lambda pp,p:pp[p][1][0]*30+pp[p][1][1]
lagna_longitude = lambda pp: saham_longitude(pp,0)
sun_longitude = lambda pp: saham_longitude(pp,1)
moon_longitude = lambda pp: saham_longitude(pp,2)
mars_longitude = lambda pp: saham_longitude(pp,3)
mercury_longitude = lambda pp: saham_longitude(pp,4)
jupiter_longitude = lambda pp: saham_longitude(pp,5)
venus_longitude = lambda pp: saham_longitude(pp,6)
saturn_longitude = lambda pp: saham_longitude(pp,7)
# 1 Punya Fortune/good deeds Moon – Sun + Lagna
# 2 Vidya Education Sun – Moon + Lagna
# 3 Yasas Fame Jupiter – PunyaSaham + Lagna
# 4 Mitra Friend Jupiter – PunyaSaham + Venus
# 5 Mahatmya Greatness PunyaSaham – Mars + Lagna
# 6 Asha Desires Saturn – Mars + Lagna
# 7 Samartha Enterprise/ability Mars – Lagna Lord + Lagna (Jupiter – Mars + Lagna, if Mars owns lagna)
# 8 Bhratri Brothers Jupiter – Saturn + Lagna (same for day & night)
# 9 Gaurava Respect/regard Jupiter – Moon + Sun
# 10 Pitri Father Saturn – Sun + Lagna
# 11 Rajya Kingdom Saturn – Sun + Lagna
# 12 Matri Mother Moon – Venus + Lagna
# 13 Putra Children Jupiter – Moon + Lagna
# 14 Jeeva Life Saturn – Jupiter + Lagna
# 15 Karma Action (work) Mars – Mercury + Lagna
# 16 Roga Disease Lagna – Moon + Lagna (Same for night/day)
# 16 Roga Disease - Another Version - Saturn – Moon + Lagna
# 17 Kali Great misfortune Jupiter – Mars + Lagna
# 18 Sastra Sciences Jupiter – Saturn + Mercury
# 19 Bandhu Relatives Mercury – Moon + Lagna
# 20 Mrityu Death 8th house – Moon + Lagna (same for day & night)
# 21 Paradesa Foreign countries 9th house – 9th lord + Lagna (same for day & night)
# 22 Artha Money 2nd house – 2nd lord + Lagna (same for day & night)
# 23 Paradara Adultery Venus – Sun + Lagna
# 24 Vanik Commerce Moon – Mercury + Lagna
# 25 Karyasiddhi Success in endeavours Saturn – Sun + Lord of sunsign (Night: Saturn – Moon + Lord of Moonsign)
# 26 Vivaha Marriage Venus – Saturn + Lagna
# 27 Santapa Sadness Saturn – Moon + 6th house
# 28 Sraddha Devotion/sincerity Venus – Mars + Lagna
# 29 Preeti Love/attachment SastraSaham – PunyaSaham + Lagna
# 30 Jadya Chronic disease Mars – Saturn + Mercury
# 31 Vyapara Business Mars – Saturn + Lagna (same for day & night)
# 32 Satru Enemy Mars – Saturn + Lagna
# 33 Jalapatana Crossing an ocean Cancer 15º– Saturn + Lagna
# 34 Bandhana Imprisonment PunyaSaham – Saturn + Lagna
# 35 Apamrityu Bad death 8th house – Mars + Lagna
# 36 Labha Material gains 11th house – 11th lord + Lagna (same for day & night)