Table of Contents

Package Structure: 1

Tajaka - Functions. 1

Import 1

Lambda Functions. 1

trinal_aspects_of_the_raasi (house_planet_dict, raasi) 1

trinal_aspects_of_the_planet (house_planet_dict, planet) 1

sextile_aspects_of_the_raasi (house_planet_dict, raasi) 1

sextile_aspects_of_the_planet (house_planet_dict, planet) 1

square_aspects_of_the_raasi (house_planet_dict, raasi) 1

square_aspects_of_the_planet (house_planet_dict, planet) 1

benefic_aspects_of_the_raasi (house_planet_dict, raasi) 1

benefic_aspects_of_the_planet (house_planet_dict, planet) 1

planet_has_benefic_aspect_on_house (house_planet_dict, planet, house) 1

semi_sextile_aspects_of_the_raasi (house_planet_dict, raasi) 1

semi_sextile_aspects_of_the_planet (house_planet_dict, planet) 1

neutral_aspects_of_the_raasi (house_planet_dict, raasi) 1

neutral_aspects_of_the_planet (house_planet_dict, planet) 1

opposition_aspects_of_the_raasi (house_planet_dict, raasi) 1

opposition_aspects_of_the_planet (house_planet_dict, planet) 1

conjunction_aspects_of_the_raasi (house_planet_dict, raasi) 1

conjunction_aspects_of_the_planet (house_planet_dict, planet) 1

malefic_aspects_of_the_raasi (house_planet_dict, raasi) 1

malefic_aspects_of_the_planet (house_planet_dict, planet) 1

planets_have_benefic_aspects (house_planet_dict,planet1, planet2) 1

planets_have_malefic_aspects (house_planet_dict, planet1, planet2) 1

planets_have_neutral_aspects (house_planet_dict, planet1, planet2) 1

planets_have_aspects (house_planet_dict, planet1, planet2) 1

planet_has_malefic_aspect_on_house (house_planet_dict, planet, house) 1

aspects_of_the_raasi (house_planet_dict, raasi) 1

aspects_of_the_planet (house_planet_dict, planet) 1

annual_chart (jd_at_dob, place, divisional_chart_factor=1, years=1) 1

monthly_chart (jd_at_dob, place, divisional_chart_factor=1, years=1, months=1) 1

sixty_hour_chart (jd_at_dob, place, divisional_chart_factor=1, years=1, months=1, sixty_hour_count=1) 1

harsha_bala (p_to_h, new_year_daytime_start=True) 1

pancha_vargeeya_bala(jd, place) 1

dwadhasa_vargeeya_bala (jd, place) 1

lord_of_the_year (jd_at_dob, place, years_from_dob) 1

lord_of_the_month (jd_at_dob, place, years_from_dob, months_from_dob) 1

both_planets_within_their_deeptamsa (planet_positions, planet1, planet2) 1

both_planets_approaching (planet_positions, planet1, planet2) 1

Tajaka Yoga - Functions. 1

Import 1

ishkavala_yoga (planet_to_house_dict,asc_house) 1

induvara_yoga (planet_to_house_dict, asc_house) 1

ithasala_yoga (planet_positions, planet1, planet2) 1

eesarpha_yoga (planet_positions, planet1, planet2) 1

get_nakta_yoga_planet_triples (planet_positions) 1

get_yamaya_yoga_planet_triples (planet_positions) 1

get_eesarpha_yoga_planet_pairs (planet_positions) 1

get_ithasala_yoga_planet_pairs (planet_positions) 1

get_manahoo_yoga_planet_pairs (planet_positions) 1

get_kamboola_yoga_planet_pairs (planet_positions) 1

get_radda_yoga_planet_pairs (planet_positions) 1

get_duhphali_kutta_yoga_planet_pairs (jd, place) 1

Saham – Functions. 1

Import 1

Lambda Functions. 1

punya_saham (planet_positions,night_time_birth=False): 1

vidya_saham (planet_positions,night_time_birth=False): 1

yasas_saham (planet_positions,night_time_birth=False): 1

mitra_saham (planet_positions,night_time_birth=False): 1

mahatmaya_saham (planet_positions,night_time_birth=False): 1

asha_saham (planet_positions,night_time_birth=False): 1

samartha_saham (planet_positions,night_time_birth=False): 1

bhratri_saham (planet_positions): 1

gaurava_saham (planet_positions,night_time_birth=False): 1

pithri_saham (planet_positions,night_time_birth=False): 1

rajya_saham (planet_positions,night_time_birth=False): 1

maathri_saham (planet_positions,night_time_birth=False): 1

puthra_saham (planet_positions,night_time_birth=False): 1

jeeva_saham (planet_positions,night_time_birth=False): 1

karma_saham (planet_positions,night_time_birth=False): 1

roga_saham (planet_positions,night_time_birth=False): 1

roga_sagam_1(planet_positions,night_time_birth=False): 1

kali_saham (planet_positions,night_time_birth=False): 1

sastra_saham (planet_positions,night_time_birth=False): 1

bandhu_saham (planet_positions,night_time_birth=False): 1

mrithyu_saham (planet_positions): 1

paradesa_saham (planet_positions,night_time_birth=False): 1

artha_saham (planet_positions,night_time_birth=False): 1

paradara_saham (planet_positions,night_time_birth=False): 1

vanika_saham (planet_positions,night_time_birth=False): 1

karyasiddhi_saham (planet_positions,night_time_birth=False): 1

vivaha_saham (planet_positions,night_time_birth=False): 1

santapa_saham (planet_positions,night_time_birth=False): 1

sraddha_saham (planet_positions,night_time_birth=False): 1

preethi_saham (planet_positions,night_time_birth=False): 1

jadya_saham (planet_positions,night_time_birth=False): 1

vyaapaara_saham (planet_positions): 1

sathru_saham (planet_positions,night_time_birth=False): 1

jalapatna_saham (planet_positions,night_time_birth=False): 1

bandhana_saham (planet_positions,night_time_birth=False): 1

apamrithyu_saham (planet_positions,night_time_birth=False): 1

laabha_saham (planet_positions,night_time_birth=False): 1

 

Package Structure:

 

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

 

 Tajaka - Functions

 Import

 

import swisseph as swe

from hora import const,utils

from hora.panchanga import panchanga

from hora.horoscope.chart import charts, house

 

 Lambda Functions

       

      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 (house_planet_dict, raasi)

    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 (house_planet_dict, planet)

        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 (house_planet_dict, raasi)

        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 (house_planet_dict, planet)

        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 (house_planet_dict, raasi)

        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 (house_planet_dict, planet)

        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 (house_planet_dict, raasi)

        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 (house_planet_dict, planet)

        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

 

planet_has_benefic_aspect_on_house (house_planet_dict, planet, house)

        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 (house_planet_dict, raasi)

        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 (house_planet_dict, planet)

        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 (house_planet_dict, raasi)

        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 (house_planet_dict, planet)

        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 (house_planet_dict, raasi)

        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 (house_planet_dict, planet)

        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 (house_planet_dict, raasi)

        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 (house_planet_dict, planet)

        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 (house_planet_dict, raasi)

        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 (house_planet_dict, planet)

        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

 

planets_have_benefic_aspects (house_planet_dict,planet1, planet2)

        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

 

planets_have_malefic_aspects (house_planet_dict, planet1, planet2)

        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

 

planets_have_neutral_aspects (house_planet_dict, planet1, planet2)

        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

 

planets_have_aspects (house_planet_dict, planet1, planet2)

        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

 

planet_has_malefic_aspect_on_house (house_planet_dict, planet, house)

        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

 

aspects_of_the_raasi (house_planet_dict, raasi)

        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

 

aspects_of_the_planet (house_planet_dict, planet)

        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

 

annual_chart (jd_at_dob, place, divisional_chart_factor=1, years=1)

        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

 

monthly_chart (jd_at_dob, place, divisional_chart_factor=1, years=1, months=1)

        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

 

sixty_hour_chart (jd_at_dob, place, divisional_chart_factor=1, years=1, months=1, sixty_hour_count=1)

        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

 

harsha_bala (p_to_h, new_year_daytime_start=True)

        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

 

pancha_vargeeya_bala(jd, place)

        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

 

dwadhasa_vargeeya_bala (jd, place)

        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]

 

lord_of_the_year (jd_at_dob, place, years_from_dob)

        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

 

lord_of_the_month (jd_at_dob, place, years_from_dob, months_from_dob)

        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

 

both_planets_within_their_deeptamsa (planet_positions, planet1, planet2)

        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

 

both_planets_approaching (planet_positions, planet1, planet2)

        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

 

Tajaka Yoga - Functions

 Import

 

import itertools

from hora import const,utils

from hora.horoscope.chart import house

from hora.horoscope.transit import tajaka

 

ishkavala_yoga (planet_to_house_dict,asc_house)

         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 (planet_to_house_dict, asc_house)

        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 (planet_positions, planet1, planet2)

        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 

 

eesarpha_yoga (planet_positions, planet1, planet2)

        @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 

 

get_nakta_yoga_planet_triples (planet_positions)

        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

 

get_yamaya_yoga_planet_triples (planet_positions)

        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_eesarpha_yoga_planet_pairs (planet_positions)

        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 (planet_positions)

        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 (planet_positions)

        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 (planet_positions)

        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 (planet_positions)

        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 (jd, place)

        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 – Functions

    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.   

Import

 

from hora import const, utils

from hora.panchanga import panchanga

from hora.horoscope.chart import charts, house

 

Lambda Functions

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)

 

punya_saham (planet_positions,night_time_birth=False):

# 1 Punya Fortune/good deeds Moon – Sun + Lagna

vidya_saham (planet_positions,night_time_birth=False):

# 2 Vidya Education Sun – Moon + Lagna

yasas_saham (planet_positions,night_time_birth=False):

# 3 Yasas Fame Jupiter – PunyaSaham + Lagna

mitra_saham (planet_positions,night_time_birth=False):

# 4 Mitra Friend Jupiter – PunyaSaham + Venus

mahatmaya_saham (planet_positions,night_time_birth=False):

# 5 Mahatmya Greatness PunyaSaham – Mars + Lagna

asha_saham (planet_positions,night_time_birth=False):

# 6 Asha Desires Saturn – Mars + Lagna

samartha_saham (planet_positions,night_time_birth=False):

# 7 Samartha Enterprise/ability    Mars – Lagna Lord + Lagna (Jupiter – Mars + Lagna, if Mars owns lagna)

bhratri_saham (planet_positions):

# 8 Bhratri Brothers Jupiter – Saturn + Lagna (same for day & night)

gaurava_saham (planet_positions,night_time_birth=False):

# 9 Gaurava Respect/regard Jupiter – Moon + Sun

pithri_saham (planet_positions,night_time_birth=False):

    # 10 Pitri Father Saturn – Sun + Lagna

rajya_saham (planet_positions,night_time_birth=False):

# 11 Rajya Kingdom Saturn – Sun + Lagna

maathri_saham (planet_positions,night_time_birth=False):

# 12 Matri Mother Moon – Venus + Lagna

puthra_saham (planet_positions,night_time_birth=False):

# 13 Putra Children Jupiter – Moon + Lagna

jeeva_saham (planet_positions,night_time_birth=False):

# 14 Jeeva Life Saturn – Jupiter + Lagna

karma_saham (planet_positions,night_time_birth=False):

# 15 Karma Action (work) Mars – Mercury + Lagna

roga_saham (planet_positions,night_time_birth=False):

# 16 Roga Disease Lagna – Moon + Lagna (Same for night/day)

roga_sagam_1(planet_positions,night_time_birth=False):

# 16 Roga Disease - Another Version -  Saturn – Moon + Lagna

kali_saham (planet_positions,night_time_birth=False):

# 17 Kali Great misfortune Jupiter – Mars + Lagna

sastra_saham (planet_positions,night_time_birth=False):

# 18 Sastra Sciences Jupiter – Saturn + Mercury

bandhu_saham (planet_positions,night_time_birth=False):

# 19 Bandhu Relatives Mercury – Moon + Lagna

mrithyu_saham (planet_positions):

# 20 Mrityu Death 8th house – Moon + Lagna (same for day & night)

paradesa_saham (planet_positions,night_time_birth=False):

# 21 Paradesa Foreign countries 9th house – 9th lord + Lagna (same for day & night)

artha_saham (planet_positions,night_time_birth=False):

# 22 Artha Money 2nd house – 2nd lord + Lagna (same for day & night)

paradara_saham (planet_positions,night_time_birth=False):

# 23 Paradara Adultery Venus – Sun + Lagna

vanika_saham (planet_positions,night_time_birth=False):

# 24 Vanik Commerce Moon – Mercury + Lagna

karyasiddhi_saham (planet_positions,night_time_birth=False):

# 25 Karyasiddhi Success in endeavours Saturn – Sun + Lord of sunsign (Night: Saturn – Moon + Lord of Moonsign)

vivaha_saham (planet_positions,night_time_birth=False):

# 26 Vivaha Marriage Venus – Saturn + Lagna

santapa_saham (planet_positions,night_time_birth=False):

# 27 Santapa Sadness Saturn – Moon + 6th house

sraddha_saham (planet_positions,night_time_birth=False):

# 28 Sraddha Devotion/sincerity Venus – Mars + Lagna

preethi_saham (planet_positions,night_time_birth=False):

# 29 Preeti Love/attachment SastraSaham – PunyaSaham + Lagna

jadya_saham (planet_positions,night_time_birth=False):

# 30 Jadya Chronic disease Mars – Saturn + Mercury

vyaapaara_saham (planet_positions):

# 31 Vyapara Business Mars – Saturn + Lagna (same for day & night)

sathru_saham (planet_positions,night_time_birth=False):

# 32 Satru Enemy Mars – Saturn + Lagna

jalapatna_saham (planet_positions,night_time_birth=False):

# 33 Jalapatana Crossing an ocean Cancer 15º– Saturn + Lagna

bandhana_saham (planet_positions,night_time_birth=False):

# 34 Bandhana Imprisonment PunyaSaham – Saturn + Lagna

apamrithyu_saham (planet_positions,night_time_birth=False):

# 35 Apamrityu Bad death 8th house – Mars + Lagna

laabha_saham (planet_positions,night_time_birth=False):

# 36 Labha Material gains 11th house – 11th lord + Lagna (same for day & night)