Astrological history was important to Sasanian Imperial ideology. The stars decreed the fate of the mortals and the kings expected to receive special protection. Shahnameh is full of stories where the fate of the heroes is sealed in the astronomical charts read at the time of their birth. Ptolemy and Greek astronomy was very well known in Iran. To what extent astronomy was separated from astrology is not clear and very likely astrology would have dominated the field. The Muslim Arabs destroyed almost all of the literature of the Zoroastrian Sasanian including their astrological works. However there are some clues as to what their astrology might have been. Most of the greatest astrologers in the Islamic era were Persians! The astrology Iranians taught is quite different from both the Hindu and the Greek traditions. It had orbs of aspect, the Great Cycles of Jupiter and Saturn, all of the elaborate systems of planetary interactions such as Frustration, Abscission of Light, Translation of Light and so forth. While Muslim era astrology owes a large debt to Hellenistic astrology, it is also clear that in the two or three centuries between the last known Hellenistic astrologers and the first known Muslim ones, something new had come into the field. This was very likely the Persian stream of astrology.

The famous university and the hospital at Jundaishapur built earlier reached its peak at Anoshirvan’s time. In Jundaishapur Greek (Egyptian & Byzantine), Indian and Persian scientific traditions were assimilated. Indian scientific material in astronomy, astrology, mathematics and medicine were translated into Pahlavi along with Chinese Herbal medicine and religion. 
The books were kept at the university and the royal libraries and Greek sciences flourished. The Arab conquest in the 7th century introduced many changes. The destruction of major cities, libraries, and eventual closure of universities in Alexandria, Antioch and Persia in the long run stalled development of science and technology except for the first 300 years.
The destruction of such major centers of learning with the compulsory use of Arabic made it clear to the scholars and intellectuals that all preIslamic knowledge and national identities were in danger of total obliteration and they had to be preserved. Massive and heroic efforts were made to save the ancient knowledge. The result was the formation of a dynamic and significant translation movement for almost two hundred years until the 10th century. The movement started in Damascus in Umayyad times and flourished in Abbasid Baghdad (754 AD). This is the period that is known as the Golden age of Islam. All major Greek Syriac Persian and some Indian texts were translated into Arabic and Neo Persian. PreAbbasid translations from Pahlavi included major religious, literary and historical texts. Greek and Indian texts translated into Pahlavi were retranslated into Arabic and Neo Persian.
With the Abbasid the translation of scientific texts was added. Nawbakht the court astrologer and his son Abu Sahl and other colleagues Fazari and Umar Tabari and many others sponsored by the Barmakid family (the chief ministers to the early Abbasids who were murdered later) translated and promoted Pahlavi texts into Arabic and NeoPersian. They were all Iranians and aimed to incorporate Sasanian culture into Abbasid ideology and guarantee the continuity of the Iranian heritage. Christian and Jewish learned families of Sasanian Persia such as Bukhtishu and Hunyan families were also great translators of Syriac Greek Pahlavi and other texts into Arabic. Both families had served at the Jundaishapur University for generations and were instrumental in founding the Adudi Hospital and Medical School in Baghdad.
Baghdad a suburb of Ctesiphon was chosen as the site of the New Abbasid capital (Baghdad is Persian and means God given, it was founded in 762 by Mansur). The Royal library was based on the Sasanian model and was called the same name (house of knowledge, Bayt alHikmat). Even at Caliph Mamun’s time when the persecution of Iranian elements had started, the director of the library was the great Persian nationalist and Pahlavi expert, Musa Sahl ibnHarun (9th century). The famed Iranian mathematician and astronomer Musa Khawrazmi was employed full time by the library at this time. IbnanNadim, the author of Alfihrist (the index), one of the most famous associates of the library listed all the books and their origins in his famous index. A great part of the index has survived and is a valuable source of information.
Before Islam, Hellenistic Greek knowledge was preserved in Alexandria, home of Ptolemy (85 to 165 AD). His great Book "Mathematike Syntaxis" was translated into Arabic and was titled the "Greatest," Greek "Megiste," which became "almajisti," (Almagest in Latin). Ptolemy’s knowledge was kept alive by Hypatia (died 415AD), the first great woman of science. She was a wellknown professor of philosophy, mathematics and astronomy at Alexandria. With her father Theon, she edited and wrote commentaries on Ptolemy’s work. Some sources mention that Caliph alMamun acquired Almagest (813833) in a peace treaty with the Byzantine emperor. Once translated into Arabic it influenced Islamic and Western cosmology, astronomy and astrology for centuries to come.
Muslims had great interest in astronomy in order to find the direction to Mecca for praying. While latitude (northsouth location) is easy to find, longitude (eastwest location) requires accurate time. Without accurate portable clocks, longitude can only be found by sighting a star in two different places at the same time. A lunar eclipse gives astronomers in two places a natural way of adjusting their clocks to the same time. The great Iranian scientist and mathematician Khawrazmi was the first to publish astronomical tables to address the quest.

In fact most of the major scientists of the era were nonArabs and mostly Iranians and although they traveled extensively in the Muslim world many carried out their research in the Iranian territories. Khawrazmi’s tables were used to find days of new moon, rising and setting times of the sun, moon, and planets, and to predict eclipses. Because they made these calculations easier, the tables served the same function as today’s computers. He also adapted Ptolemy’s Geographike Hyphegesis and composed the first independent textbook for algebra; as a result his name survives in the term algorithm (Al Khawrazmi) for the formulation of a calculating method. His book of tables introduced the Indian system of decimal numbers to the west. The tables were laborsaving devices for astronomical calculations. He also improved astrolabe (Ostorlab), Ptolemy had used the device for observing and computing but its use was limited before it was improved. Trigonometry was improved since it was essential to the computation of planetary orbits as well as to terrestrial mapping, and consequently medieval ‘qibla’ tables attained great accuracy. 
Major observatories were built in Persian territories such as Maragheh and Samarkand over the centuries. At these observatories, astronomers gathered to refine Ptolemy’s coordinates for the stars and, eventually, to revise Ptolemy’s catalog of stars. His catalogue gave the positions of 1,022 stars by magnitude, or brightness. The l0thcentury astronomer alSufi (Azophil) heavily revised the book. Azophil’s Book of the fixed Stars is the earliest illustrated astronomical manuscript known; the earliest copy, the work of the author’s son, is dated 1009 and the author expressly states that he traced the drawings from a celestial globe. The Persian astrologer AbuMa’shar Balkhi (787886 AD) was one of the most influential figures in the field. His works were translated into Latin in the twelfth century and exerted a powerful influence on the development of Western Astrology. A student of alKindi (Latin Alkindi) his works represent a fusion of Sabian, Hermeticism, Persian chronology and Islamic religious doctrine plus Greek science and Mesopotamian astrology. He was an extremely successful practitioner of the Art of astrology and traveled throughout the area in service to numerous Indian, Persian, Arab, and Egyptian heads of states. With his Iranian student Abu Sa’id Schadsan, who recorded his teachers answers and astrological deeds they were very popular in Medieval Europe’s scholarly circles.
Aburayhan Biruni was another Brilliant Iranian scientist who has made great contributions to sciences in general and mathematics and astronomy in particular. Born in Khawrazm (ruled by Iranian Samanids) by 990 AD, at age 17 he computed the latitude of his city Kath by observing the maximum altitude of the sun and shortly afterwards produced his Cartography, a work on map projections. He corrected Khujandi’s astronomical calculations at the observatory in Ray near Tehran. In Gilan near Caspian area he observed a major eclipse in 997 and by comparing his results with another astronomer in Baghdad was able to calculate the difference in longitude between the cities.
BY 1000 AD he was observing more eclipses at Gurgan and dedicated his work Chronology to Qabus, the Ziyarid ruler of the area. The Chronology refers to seven earlier works which he had written: one on the decimal system, one on the astrolabe, one on astronomical observations, three on astrology, and two on history. He also produced major astronomical works for the Ghaznavid ruler, Sultan Mahmoud. Biruni’s contribution to science, astronomy and social studies are enormous. His massive work India, covers many aspects of life in this country while traveling with Mahmoud’s army. He describes literature, religion and philosophy of India, its caste system and marriage customs. He then studies the Indian systems of writing and numbers before going on to examine the geography of the country. He studied Indian literature in the original, translating several Sanskrit texts into Arabic. He also wrote several treatises devoted to Indian astronomy, mathematics, geography and grammar. He produced around 146 works in his lifetime (around 13000 pages) covering all the sciences of his time and made corrections to Ptolemy’s calculations. He shows no prejudice against different religions or sects and very strongly criticized the Arab conquers for destroying the ancient books and texts at the libraries in the cities. ‘Shadows’ is one of his most important texts written around 1021. The contents of the work include the Arabic nomenclature of shade and shadows, applications of the shadow functions to the astrolabe and to other instruments, shadow observations for the solution of various astronomical problems, and the shadowdetermined times of Muslim prayers. The book is an extremely important source for the history of mathematics, astronomy, and physics.
He made valuable contributions to theoretical and practical arithmetic, summation of series, combinatorial analysis, the rule of three, irrational numbers, ratio theory, algebraic definitions, method of solving algebraic equations, geometry, Archimeds’ theorems, trigonometry, the sine theorem in the plane, and solving spherical triangles. He corresponded with other brilliant Iranian scientists Avicenna (Ibn Sina) and Sijzi about various scientific topics such as heat and light. One fifth of his works have survived. His most important astrological textbook, ‘Elements of the Art of Astrology’ was published in Ghaznah in 1029. It included detailed rules for the interpretation of nativity and horoscope charts for the time of birth.
Avicenna himself was an accomplished mathematician with a number of works in astronomy. He lived during the Samanid, Buyid and Ghaznavid rulers of Iran and worked as physician at a number of courts. His famous book ‘The Book of Healing’ is a scientific encyclopedia covering logic, natural sciences, psychology, geometry, astronomy, arithmetic and music. One quarter of the work is devoted to mathematics with astronomy and music included as branches of mathematics. He divided astronomy into astronomical and geographical tables, and the calendar. Ibn Sina made astronomical observations at Isfahan and Hamden. He observed Venus as a spot against the surface of the Sun and correctly deduced that Venus must be closer to the Earth than the Sun. He invented an instrument for observing the coordinates of a star. Another of Avicenna’s contributions to astronomy was his attempt to calculate the difference in longitude between Baghdad and Gurgan by observing the moon at the later location.
Omar Khayyam (10441123ad) is another celebrated Iranian mathematician, philosopher, astronomer and poet who made great contributions to both science and literature. He was born at Nishapur, the provincial capital of Khurasan. He also visited Samarqand and other centers of learning such as Bukhara, Balkh and Isfahan. He was an expert in Algebra and made an attempt to classify most algebraic equations.
He has been considered to be the first to find the binomial theorem and determine binomial coefficients. In geometry, he studied generalities of Euclid and contributed to the theory of parallel lines. He was invited to Ray by the Saljuq Sultan, Malikshah to work at the new observatory around 1074 and started the task of producing a new and more accurate solar calendar. His calendar is still in use today and it called Jalali calendar. It had an error of one day in 3770 years and was thus superior to the Georgian calendar (error of 1 day in 3330 years). His contributions to other fields of science include a study of generalities of Euclid, development of methods for the accurate determination of specific gravity. He became very popular in the Western world, when Edward Fitzgerald in 1839 published an English translation of his (quatrains) Ruba’iyat. 