def year_regent(self): epheflag = self.epheflag pto = [4,0,3,2,1,6,5] year = self.date.dt.year dnow = pysw.julday(*self.date.dateforcalc()) s,sunnow,e = pysw.calc(dnow,0,epheflag) fsols = pysw.julday(year+1,1,1,0) s,solstice,e = pysw.calc(fsols,0,epheflag) if not 0.0 <= sunnow < solstice: year -=1 return pto[year%7]
def solar_rev(boss): date, time = parsestrtime(boss.state.curr_chart.date) d,m,y = [int(i) for i in date.split("/")] nowyear = boss.state.date.dt.year julday = pysw.julday(nowyear,m,d,0.0) sun = boss.state.curr_chart.planets[0] s,sunnow,e = pysw.calc(julday,0,boss.state.epheflag) while sunnow > sun: julday -= 0.1 s,sunnow,e = pysw.calc(julday,0,boss.state.epheflag) while sunnow < sun: julday += 0.01 s,sunnow,e = pysw.calc(julday,0,boss.state.epheflag) julday -= 0.01 s,sunnow,e = pysw.calc(julday,0,boss.state.epheflag) while sunnow < sun: julday += 0.001 s,sunnow,e = pysw.calc(julday,0,boss.state.epheflag) julday -= 0.001 s,sunnow,e = pysw.calc(julday,0,boss.state.epheflag) while sunnow < sun: julday += 0.0001 s,sunnow,e = pysw.calc(julday,0,boss.state.epheflag) julday -= 0.0001 s,sunnow,e = pysw.calc(julday,0,boss.state.epheflag) while sunnow < sun: julday += 0.00001 s,sunnow,e = pysw.calc(julday,0,boss.state.epheflag) julday -= 0.00001 s,sunnow,e = pysw.calc(julday,0,boss.state.epheflag) while sunnow < sun: julday += 0.000001 s,sunnow,e = pysw.calc(julday,0,boss.state.epheflag) julday -= 0.000001 s,sunnow,e = pysw.calc(julday,0,boss.state.epheflag) sol = pysw.revjul(julday) zone = boss.state.curr_chart.zone dt = boss.state.date.getnewdt(sol) boss.da.panel.set_date_only(dt)
def chiron_calc(self,date,epheflag): d = pysw.julday(*date) chi = pysw.calc(d,15,epheflag) return chi