Ejemplo n.º 1
0
def _computeChart(chart, date):
    """ Internal function to return a new chart for
    a specific date using properties from old chart.
    
    """
    pos = chart.pos
    hsys = chart.hsys
    IDs = [obj.id for obj in chart.objects]
    return Chart(date, pos, IDs=IDs, hsys=hsys)
    accidental dignities.

"""

from flatlibfr import const
from flatlibfr.chart import Chart
from flatlibfr.datetime import Datetime
from flatlibfr.geopos import GeoPos

from flatlibfr.dignities import accidental
from flatlibfr.dignities.accidental import AccidentalDignity

# Build a chart for a date and location
date = Datetime('2015/03/13', '17:00', '+00:00')
pos = GeoPos('38n32', '8w54')
chart = Chart(date, pos)

# Get some objects
obj = chart.get(const.VENUS)
sun = chart.get(const.SUN)

# Sun relation
relation = accidental.sunRelation(obj, sun)
print(relation)

# Augmenting or Diminishing light
light = accidental.light(obj, sun)
print(light)

# Orientality
orientality = accidental.orientality(obj, sun)
Ejemplo n.º 3
0
    
    
    This recipe shows sample code for handling 
    solar returns.

"""

from flatlibfr import const
from flatlibfr.chart import Chart
from flatlibfr.datetime import Datetime
from flatlibfr.geopos import GeoPos
from flatlibfr.predictives import returns

# Build a chart for a date and location
date = Datetime('2013/06/13', '17:00', '+01:00')
pos = GeoPos('38n32', '8w54')
chart = Chart(date, pos)

# Get the next solar return Chart given a date
today = Datetime('2015/04/06', '10:40', '+01:00')
srChart = returns.nextSolarReturn(chart, today)

# Print the date and Asc
asc = srChart.get(const.ASC)
print(asc)  # <Asc Taurus +26:25:47>
print(srChart.date)  # <2015/06/14 04:38:37 01:00:00>

# Solar return of the year
srChart = chart.solarReturn(2015)
print(asc)  # <Asc Taurus +26:25:47>
print(srChart.date)  # <2015/06/14 04:38:37 01:00:00>
Ejemplo n.º 4
0
"""
    Author: João Ventura <*****@*****.**>
    
    
    This recipe shows sample code for handling 
    aspects.

"""

from flatlibfr import aspects
from flatlibfr import const
from flatlibfr.chart import Chart
from flatlibfr.datetime import Datetime
from flatlibfr.geopos import GeoPos

# Build a chart for a date and location
date = Datetime('2015/03/13', '17:00', '+00:00')
pos = GeoPos('38n32', '8w54')
chart = Chart(date, pos)

# Retrieve the Sun and Moon
sun = chart.get(const.SUN)
moon = chart.get(const.MOON)

# Get the aspect
aspect = aspects.getAspect(sun, moon, const.MAJOR_ASPECTS)
print(aspect)  # <Moon Sun 90 Applicative +00:24:30>
Ejemplo n.º 5
0
 def test_solar_return_hsys(self):
     """Solar return charts must maintain original house system."""
     chart = Chart(self.date, self.pos, hsys=const.HOUSES_MORINUS)
     sr_chart = chart.solarReturn(2018)
     self.assertEqual(chart.hsys, sr_chart.hsys)
Ejemplo n.º 6
0
"""
    Author: João Ventura <*****@*****.**>
    
    
    This recipe shows sample code for computing 
    the temperament protocol.

"""

from flatlibfr import const
from flatlibfr.chart import Chart
from flatlibfr.datetime import Datetime
from flatlibfr.geopos import GeoPos
from flatlibfr.protocols import behavior

# Build a chart for a date and location
date = Datetime('2015/03/13', '17:00', '+00:00')
pos = GeoPos('38n32', '8w54')
chart = Chart(date, pos)

# Behavior
factors = behavior.compute(chart)
for factor in factors:
    print(factor)
    
    This recipe shows sample code for handling the 
    primary directions.

"""

from flatlibfr import const
from flatlibfr.chart import Chart
from flatlibfr.datetime import Datetime
from flatlibfr.geopos import GeoPos
from flatlibfr.predictives import primarydirections

# Build a chart for a date and location
date = Datetime('2015/03/13', '17:00', '+00:00')
pos = GeoPos('38n32', '8w54')
chart = Chart(date, pos)

# MC will be used for calculating arcs
mc = chart.get(const.MC)

# Get a promissor and significator
prom = chart.get(const.MARS)
sig = chart.get(const.MERCURY)

# Compute arc in zodiaco (zerolat = True)
arc = primarydirections.getArc(prom, sig, mc, pos, zerolat=True)
print(arc)  # 56.17347

# Compute arc in mundo
arc = primarydirections.getArc(prom, sig, mc, pos, zerolat=False)
print(arc)  # 56.74266
Ejemplo n.º 8
0
  def __init__(self, date, hour_min, utc, geo_pos_1, geo_pos_2):
    # Build a chart for a date and location
    date = Datetime(date, hour_min, utc)
    pos = GeoPos(geo_pos_1, geo_pos_2)
    chart = Chart(date, pos, hsys=const.HOUSES_PLACIDUS, IDs=const.LIST_OBJECTS) #Page 25, livre: Cours complet d'astrologie
    
    # Prepare angles
    angles = []
    angles.append(chart.get(const.ASC))
    angles.append(chart.get(const.IC))
    angles.append(chart.get(const.DESC))
    angles.append(chart.get(const.MC))

    # Prepare houses
    houses = []
    houses.append(chart.get(const.HOUSE1))
    houses.append(chart.get(const.HOUSE2))
    houses.append(chart.get(const.HOUSE3))
    houses.append(chart.get(const.HOUSE4))
    houses.append(chart.get(const.HOUSE5))
    houses.append(chart.get(const.HOUSE6))
    houses.append(chart.get(const.HOUSE7))
    houses.append(chart.get(const.HOUSE8))
    houses.append(chart.get(const.HOUSE9))
    houses.append(chart.get(const.HOUSE10))
    houses.append(chart.get(const.HOUSE11))
    houses.append(chart.get(const.HOUSE12))

    # Prepare planets
    planets = []
    planets.append(chart.get(const.SUN))
    planets.append(chart.get(const.MOON))
    planets.append(chart.get(const.MERCURY))
    planets.append(chart.get(const.VENUS))
    planets.append(chart.get(const.MARS))
    planets.append(chart.get(const.JUPITER))
    planets.append(chart.get(const.SATURN))
    planets.append(chart.get(const.URANUS))
    planets.append(chart.get(const.NEPTUNE))
    planets.append(chart.get(const.PLUTO))
    planets.append(chart.get(const.CHIRON))
    planets.append(chart.get(const.NORTH_NODE))
    planets.append(chart.get(const.SOUTH_NODE))
    planets.append(chart.get(const.PARS_FORTUNA))
    self.data = export(angles=angles, houses=houses, planets=planets)
    
    
    This recipe shows sample code for handling 
    essential dignities.

"""

from flatlibfr import const
from flatlibfr.chart import Chart
from flatlibfr.datetime import Datetime
from flatlibfr.geopos import GeoPos
from flatlibfr.dignities import essential

# Build a chart for a date and location
date = Datetime('2015/03/13', '17:00', '+00:00')
pos = GeoPos('38n32', '8w54')
chart = Chart(date, pos)

# Get the Asc ruler
asc = chart.get(const.ASC)
ascRulerID = essential.ruler(asc.sign)
ascRuler = chart.get(ascRulerID)
print(ascRuler)  # <Mercury Pisces +00:48:57 +01:29:49>

# Get the Asc ruler score
score = essential.score(ascRuler.id, ascRuler.sign, ascRuler.signlon)
print(score)

# Simpler alternative using the EssentialInfo class
info = essential.EssentialInfo(ascRuler)
print(info.score)