def __init__(self, tjd_ut, pId, flag, lat = None, ascmc2 = None, raequasc = None, ecl = None, equ = None, nolat = False, obl = 0.0): self.pId = pId self.speculums = None if (ecl == None): rflag, self.data, serr = astrology.swe_calc_ut(tjd_ut, pId, flag) rflag, self.dataEqu, serr = astrology.swe_calc_ut(tjd_ut, pId, flag+astrology.SEFLG_EQUATORIAL) # data[0] : longitude # data[1] : latitude # data[2] : distance # data[3] : speed in long # data[4] : speed in lat # data[5] : speed in dist # if rflag < 0: # print 'Error: %s' % serr self.name = astrology.swe_get_planet_name(pId) else: self.data = tuple(ecl) self.dataEqu = tuple(equ) self.name = 'DescNode' if nolat: self.data = (self.data[Planet.LONG], 0.0, self.data[Planet.DIST], self.data[Planet.SPLON], self.data[Planet.SPLAT], self.data[Planet.SPDIST]) ra, decl, dist = astrology.swe_cotrans(self.data[Planet.LONG], 0.0, 1.0, -obl) self.dataEqu = (ra, decl, self.dataEqu[Planet.DISTEQU], self.dataEqu[Planet.SPRAEQU], self.dataEqu[Planet.SPDECLEQU], self.dataEqu[Planet.SPDISTEQU]) if lat != None: #placspec.py and regiospec should be used instead, remove these! self.speculums = [] self.computePlacidianSpeculum(lat, ascmc2) self.computeRegiomontanSpeculum(lat, ascmc2, raequasc)
def __init__(self, tjd_ut, aId, flag): self.aId = aId rflag, dat, serr = astrology.swe_calc_ut(tjd_ut, aId, flag) rflag, datEqu, serr = astrology.swe_calc_ut(tjd_ut, aId, flag + astrology.SEFLG_EQUATORIAL) self.data = (dat[0], dat[1], datEqu[0], datEqu[1]) self.name = astrology.swe_get_planet_name(aId)
def __init__(self, tjd_ut, aId, flag): self.aId = aId rflag, dat, serr = astrology.swe_calc_ut(tjd_ut, aId, flag) rflag, datEqu, serr = astrology.swe_calc_ut( tjd_ut, aId, flag + astrology.SEFLG_EQUATORIAL) self.data = (dat[0], dat[1], datEqu[0], datEqu[1]) self.name = astrology.swe_get_planet_name(aId)
def __init__(self, tjd_ut, pId, flag, lat=None, ascmc2=None, raequasc=None, ecl=None, equ=None, nolat=False, obl=0.0): self.pId = pId self.speculums = None if (ecl == None): rflag, self.data, serr = astrology.swe_calc_ut(tjd_ut, pId, flag) rflag, self.dataEqu, serr = astrology.swe_calc_ut( tjd_ut, pId, flag + astrology.SEFLG_EQUATORIAL) # data[0] : longitude # data[1] : latitude # data[2] : distance # data[3] : speed in long # data[4] : speed in lat # data[5] : speed in dist # if rflag < 0: # print 'Error: %s' % serr self.name = astrology.swe_get_planet_name(pId) else: self.data = tuple(ecl) self.dataEqu = tuple(equ) self.name = 'DescNode' if nolat: self.data = (self.data[Planet.LONG], 0.0, self.data[Planet.DIST], self.data[Planet.SPLON], self.data[Planet.SPLAT], self.data[Planet.SPDIST]) ra, decl, dist = astrology.swe_cotrans(self.data[Planet.LONG], 0.0, 1.0, -obl) self.dataEqu = (ra, decl, self.dataEqu[Planet.DISTEQU], self.dataEqu[Planet.SPRAEQU], self.dataEqu[Planet.SPDECLEQU], self.dataEqu[Planet.SPDISTEQU]) if lat != None: #placspec.py and regiospec should be used instead, remove these! self.speculums = [] self.computePlacidianSpeculum(lat, ascmc2) self.computeRegiomontanSpeculum(lat, ascmc2, raequasc)