Demons are mentioned in several places in the writings of the ancient Indian astronmers, either in describing the Earth, particularly when doing thought experiments, or in discussing beliefs of the past.
Rāhu was thought to be the decapitated, floating head of a demon that wandered through the heavens, eating the luminous planets and causing eclipses. This is the belief that Lalla relates when he disproves of the notion, using parallax. The name Rāhu influenced Template:Ref-VM when he described the lunar nodes (the only two points in the moon's orbit where eclipses can occur)
The basic arrangement of Pṛthvi (Earth) was also described using the notion of demons; they were said to be the inhabitants of the Southern pole, at a place called Baḍavāmukha. The gods lived at Meru mountain, at the North pole. Meru and Baḍavāmukha are used often in the astronomical literature in 'thought experiments'. Frequently the author will attempt to explain the nature of the heavens by imagining how the demons or gods might see various astronomical phenomenon, such as the rising and setting of the sun, planets, & stars, which stars they see at different times of the year, etc.