Astrophotography, also known as astronomical imaging, is the photography or imaging of astronomical objects, celestial events, or areas of the night sky. The first photograph of an astronomical object (the Moon) was taken in 1840, but it was not until the late 19th century that advances in technology allowed for detailed stellar photography. Besides being able to record the details of extended objects such as the Moon, Sun, and planets, modern astrophotography has the ability to image objects outside of the visible spectrum of the human eye such as dim stars, nebulae, and galaxies. This is accomplished through long time exposure as both film and digital cameras can accumulate and sum photons over long periods of time or using specialized optical filters which limit the photons to a certain wavelength.
Photography using extended exposure-times revolutionized the field of professional astronomical research, recording hundreds of thousands of new stars, and nebulae invisible to the human eye. Specialized and ever-larger optical telescopes were constructed as essentially big cameras to record images on photographic plates. Astrophotography had an early role in sky surveys and star classification but over time it has used ever more sophisticated image sensors and other equipment and techniques designed for specific fields.
Since almost all observational astronomy today uses photography, the term "astrophotography" usually refers to its use in amateur astronomy, seeking aesthetically pleasing images rather than scientific data. Amateurs use a wide range of special equipment and techniques.