畴人

Archaic: someone skilled in astronomy, calendar...