what does the first one refer to?
The natural science that studies celestial objects and phenomena.
Astronomy
Astronomy (from , literally meaning the science that studies the laws of the stars) is a natural science that studies celestial objects and phenomena. 
what area of science did the muslim world excel in Astronomy, mathematics, and medicine.
wiki:11574150
Astronomy [SEP] Introduction
Astronomy (from , literally meaning the science that studies the laws of the stars) is a natural science that studies celestial objects and phenomena. It uses mathematics, physics, and chemistry in order to explain their origin and evolution. Objects of interest include planets, moons, stars, nebulae, galaxies, and comets. Relevant phenomena include supernova explosions, gamma ray bursts, quasars, blazars, pulsars, and cosmic microwave background radiation. More generally, astronomy studies everything that originates outside Earth's atmosphere. Cosmology is a branch of astronomy. It studies the Universe as a whole. Astronomy is one of the oldest natural sciences. The early civilizations in recorded history made methodical observations of the night sky.