Ejemplo n.º 1
0
def updatePandC(date, observer, houses, entries):
	day = datetime_to_julian(date)
	obliquity = swisseph.calc_ut(day, swisseph.ECL_NUT)[0]
	cusps, asmc = swisseph.houses(day, observer.lat, observer.lng)
	fill_houses(date, observer, houses=houses, data=cusps)
	for i in range(10):
		calcs = swisseph.calc_ut(day, i)
		hom = swisseph.house_pos(asmc[2], observer.lat, obliquity, calcs[0], objlat=calcs[1])
		if i == swisseph.SUN or i == swisseph.MOON:
			retrograde = 'Not Applicable'
		else:
			retrograde = str(calcs[3] < 0)
		entries[i].retrograde = retrograde
		entries[i].m.longitude = calcs[0]
		entries[i].m.latitude = calcs[1]
		entries[i].m.progress = hom % 1.0
		entries[i].m.house_info = houses[int(hom-1)]
	if len(entries) > 10: #add node entries
		calcs = swisseph.calc_ut(day, swisseph.TRUE_NODE)
		hom = swisseph.house_pos(asmc[2], observer.lat, obliquity, calcs[0], objlat=calcs[1])
		retrograde = "Always"

		entries[10].retrograde = retrograde
		entries[10].m.longitude = calcs[0]
		entries[10].m.latitude = calcs[1]
		entries[10].m.progress = hom%1.0
		entries[10].m.house_info = houses[int(hom-1)]

		#do some trickery to display the South Node
		reverse = swisseph.degnorm(calcs[0]-180.0)
		revhouse = (int(hom)+6)%12
		#revprogress = 1-hom%1.0
		revprogress = hom%1.0
		entries[11].retrograde = retrograde
		entries[11].m.longitude = reverse
		entries[11].m.latitude = calcs[1]
		entries[11].m.progress = revprogress
		entries[11].m.house_info = houses[int(revhouse-1)]
	if len(entries) > 12:
		ascendant = asmc[0]
		descendant = cusps[6]
		mc = asmc[1]
		ic = cusps[3]
		retrograde = 'Not a Planet'

		entries[12].m.longitude = ascendant
		entries[13].m.longitude = descendant
		entries[14].m.longitude = mc
		entries[15].m.longitude = ic

	swisseph.close()
Ejemplo n.º 2
0
def updatePandC(date, observer, houses, entries):
    day = datetime_to_julian(date)
    obliquity = swisseph.calc_ut(day, swisseph.ECL_NUT)[0]
    cusps, asmc = swisseph.houses(day, observer.lat, observer.lng)
    fill_houses(date, observer, houses=houses, data=cusps)
    for i in range(10):
        calcs = swisseph.calc_ut(day, i)
        hom = swisseph.house_pos(asmc[2], observer.lat, obliquity, calcs[0], objlat=calcs[1])
        if i == swisseph.SUN or i == swisseph.MOON:
            retrograde = "Not Applicable"
        else:
            retrograde = str(calcs[3] < 0)
        entries[i].retrograde = retrograde
        entries[i].m.longitude = calcs[0]
        entries[i].m.latitude = calcs[1]
        entries[i].m.progress = hom % 1.0
        entries[i].m.house_info = houses[int(hom - 1)]
    if len(entries) > 10:  # add node entries
        calcs = swisseph.calc_ut(day, swisseph.TRUE_NODE)
        hom = swisseph.house_pos(asmc[2], observer.lat, obliquity, calcs[0], objlat=calcs[1])
        retrograde = "Always"

        entries[10].retrograde = retrograde
        entries[10].m.longitude = calcs[0]
        entries[10].m.latitude = calcs[1]
        entries[10].m.progress = hom % 1.0
        entries[10].m.house_info = houses[int(hom - 1)]

        # do some trickery to display the South Node
        reverse = swisseph.degnorm(calcs[0] - 180.0)
        revhouse = (int(hom) + 6) % 12
        # revprogress = 1-hom%1.0
        revprogress = hom % 1.0
        entries[11].retrograde = retrograde
        entries[11].m.longitude = reverse
        entries[11].m.latitude = calcs[1]
        entries[11].m.progress = revprogress
        entries[11].m.house_info = houses[int(revhouse - 1)]
    if len(entries) > 12:
        ascendant = asmc[0]
        descendant = cusps[6]
        mc = asmc[1]
        ic = cusps[3]
        retrograde = "Not a Planet"

        entries[12].m.longitude = ascendant
        entries[13].m.longitude = descendant
        entries[14].m.longitude = mc
        entries[15].m.longitude = ic

    swisseph.close()
Ejemplo n.º 3
0
def get_signs(date, observer, nodes, axes, prefix=None):
	entries = []
	houses = fill_houses(date, observer)
	day = datetime_to_julian(date)
	obliquity = swisseph.calc_ut(day, swisseph.ECL_NUT)[0]

	cusps, asmc = swisseph.houses(day, observer.lat, observer.lng)

	for i in range(10):
		calcs = swisseph.calc_ut(day, i)
		hom = swisseph.house_pos(asmc[2], observer.lat, obliquity, calcs[0], objlat=calcs[1])
		zm = ActiveZodiacalMeasurement(calcs[0], calcs[1], houses[int(hom-1)], progress=hom % 1.0)
		if i == swisseph.SUN or i == swisseph.MOON:
			retrograde = 'Not Applicable'
		else:
			retrograde = str(calcs[3] < 0)
		planet = Planet(swisseph.get_planet_name(i), prefix=prefix, m=zm, retrograde=retrograde)
		entries.append(planet)
	if nodes: #add node entries
		calcs = swisseph.calc_ut(day, swisseph.TRUE_NODE)
		hom = swisseph.house_pos(asmc[2], observer.lat, obliquity, calcs[0], objlat=calcs[1])
		zm = ActiveZodiacalMeasurement(calcs[0], calcs[1], houses[int(hom-1)], progress=hom % 1.0)
		retrograde = "Always"
		planet = Planet("North Node", prefix=prefix, m=zm, retrograde=retrograde)
		entries.append(planet)

		#do some trickery to display the South Node
		reverse = swisseph.degnorm(calcs[0]+180.0)
		revhouse = (int(hom)+6) % 12
		#revprogress = 1-hom%1.0
		revprogress = hom % 1.0
		zm = ActiveZodiacalMeasurement(reverse, calcs[1], houses[revhouse-1], progress=revprogress)
		planet = Planet("South Node", prefix=prefix ,m=zm, retrograde=retrograde)
		entries.append(planet)
	if axes:
		ascendant = asmc[0]
		descendant = cusps[6]
		mc = asmc[1]
		ic = cusps[3]
		retrograde = 'Not a Planet'

		zm = ActiveZodiacalMeasurement(ascendant, 0.0, houses[0], progress=0.0)
		planet = Planet("Ascendant", prefix=prefix, m=zm, retrograde=retrograde)
		entries.append(planet)

		zm = ActiveZodiacalMeasurement(descendant, 0.0, houses[6], progress=0.0)
		planet = Planet("Descendant", prefix=prefix, m=zm, retrograde=retrograde)
		entries.append(planet)

		zm = ActiveZodiacalMeasurement(mc, 0.0, houses[9], progress=0.0)
		planet = Planet("MC", prefix=prefix, m=zm, retrograde=retrograde)
		entries.append(planet)

		zm = ActiveZodiacalMeasurement(ic, 0.0, houses[3], progress=0.0)
		planet = Planet("IC", prefix=prefix, m=zm, retrograde=retrograde)
		entries.append(planet)

	#if stars:
		#print "Todo"
	swisseph.close()
	return houses, entries
Ejemplo n.º 4
0
 def calc_house(self, armc, latitude, ecl_nut):
     return swe.house_pos(armc, latitude, ecl_nut, self.x, self.y)
Ejemplo n.º 5
0
def get_signs(date, observer, nodes, axes, prefix=None):
    entries = []
    houses = fill_houses(date, observer)
    day = datetime_to_julian(date)
    obliquity = swisseph.calc_ut(day, swisseph.ECL_NUT)[0]

    cusps, asmc = swisseph.houses(day, observer.lat, observer.lng)

    for i in range(10):
        calcs = swisseph.calc_ut(day, i)
        hom = swisseph.house_pos(asmc[2], observer.lat, obliquity, calcs[0], objlat=calcs[1])
        zm = ActiveZodiacalMeasurement(calcs[0], calcs[1], houses[int(hom - 1)], progress=hom % 1.0)
        if i == swisseph.SUN or i == swisseph.MOON:
            retrograde = "Not Applicable"
        else:
            retrograde = str(calcs[3] < 0)
        planet = Planet(swisseph.get_planet_name(i), prefix=prefix, m=zm, retrograde=retrograde)
        entries.append(planet)
    if nodes:  # add node entries
        calcs = swisseph.calc_ut(day, swisseph.TRUE_NODE)
        hom = swisseph.house_pos(asmc[2], observer.lat, obliquity, calcs[0], objlat=calcs[1])
        zm = ActiveZodiacalMeasurement(calcs[0], calcs[1], houses[int(hom - 1)], progress=hom % 1.0)
        retrograde = "Always"
        planet = Planet("North Node", prefix=prefix, m=zm, retrograde=retrograde)
        entries.append(planet)

        # do some trickery to display the South Node
        reverse = swisseph.degnorm(calcs[0] + 180.0)
        revhouse = (int(hom) + 6) % 12
        # revprogress = 1-hom%1.0
        revprogress = hom % 1.0
        zm = ActiveZodiacalMeasurement(reverse, calcs[1], houses[revhouse - 1], progress=revprogress)
        planet = Planet("South Node", prefix=prefix, m=zm, retrograde=retrograde)
        entries.append(planet)
    if axes:
        ascendant = asmc[0]
        descendant = cusps[6]
        mc = asmc[1]
        ic = cusps[3]
        retrograde = "Not a Planet"

        zm = ActiveZodiacalMeasurement(ascendant, 0.0, houses[0], progress=0.0)
        planet = Planet("Ascendant", prefix=prefix, m=zm, retrograde=retrograde)
        entries.append(planet)

        zm = ActiveZodiacalMeasurement(descendant, 0.0, houses[6], progress=0.0)
        planet = Planet("Descendant", prefix=prefix, m=zm, retrograde=retrograde)
        entries.append(planet)

        zm = ActiveZodiacalMeasurement(mc, 0.0, houses[9], progress=0.0)
        planet = Planet("MC", prefix=prefix, m=zm, retrograde=retrograde)
        entries.append(planet)

        zm = ActiveZodiacalMeasurement(ic, 0.0, houses[3], progress=0.0)
        planet = Planet("IC", prefix=prefix, m=zm, retrograde=retrograde)
        entries.append(planet)

        # if stars:
        # print "Todo"
    swisseph.close()
    return houses, entries
Ejemplo n.º 6
0
    indexSign = getIndexSign(gObj)
    td = decdeg2dms(gObj)
    gdeg = int(td[0])
    mdeg = int(td[1])
    sdeg = int(td[2])
    rsgdeg = gdeg - (indexSign * 30)
    jsonBodies += '"c' + str(index) + '": {' if (
        index == 0) else ',"c' + str(index) + '": {'
    jsonBodies += '"nom":"' + str(np[index][0]) + '",'
    jsonBodies += '"is":' + str(indexSign) + ', '
    jsonBodies += '"gdec":' + str(gObj) + ', '
    jsonBodies += '"gdeg":' + str(gdeg) + ', '
    jsonBodies += '"rsgdeg":' + str(rsgdeg) + ', '
    jsonBodies += '"mdeg":' + str(mdeg) + ', '
    jsonBodies += '"sdeg":' + str(sdeg) + ', '
    posHouse = swe.house_pos(h[0][9], float(lat), oblicuidad, gObj, 0.0,
                             bytes(houseType, encoding="utf-8"))

    jsonBodies += '"ih":' + str(int(posHouse)) + ', '
    jsonBodies += '"dh":' + str(posHouse)
    jsonBodies += '}'
    index = index + 1

jsonBodies += '}'

jsonAspets = '"asps":{'
#print(tuplaPosBodies)
tuplaArr = (())
arr1 = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
arr2 = (0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
arr3 = (0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
arr4 = (0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)