Equinox, Solstice and the 24 Solar Terms
Hi all,
I am look for the calculation of Solar Terms
In short , they are used in Chinese and Japanese Calendar, they divide 1 year to 24 pieces as Solar Terms. Each term divide the ecliptic into 24 equal segments, with 15 degrees of the Sun's longitude between the terms.
Reference:
http://
While I can find functions in PyEphem to calculate 4 of the Solar Terms (next_vernal_
#example from the code
def next_vernal_
"""Return the date of the next vernal equinox."""
return holiday(date, twopi, 0)
def holiday(d0, motion, offset):
"""Function that assists the finding of equinoxes and solstices."""
def f(d):
return (_sun.ra + eighthpi) % quarterpi - eighthpi
d0 = Date(d0)
_sun.
angle_to_cover = motion - (_sun.ra + offset) % motion
if abs(angle_to_cover) < tiny:
d = d0 + 365.25 * angle_to_cover / twopi
return date(newton(f, d, d + hour))
May be my lack of understanding of the whole things. I try to modify these functions to try to get other Solar Terms but I failed.
Can anyone get me out of this? A simple example of how I can get one of those other Solar Terms will be very helpful.
Thanks a lot
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- PyEphem Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Jack for more information if necessary.