How is imaging spectroscopy used in astronomy?