Senseidai (astrology station) and Onmyoryo (a government office that had jurisdiction over calendar preparation, astronomy, divination, etc.) were established probably because the Emperor was good at Astrology, or they were influenced by the nations under the Ritsuryo codes like Tang and Shiragi (ancient Korean kingdom), in which Onmyodo (way of Yin and Yang; occult divination system based on the Taoist theory of the five elements) was popular.
天皇自身、占星を得意としたのに加え、当時陰陽道などが律令国家である唐や新羅で盛んに行われたのが影響もしてか占星台や陰陽寮も設置させている。