Spectroscopy can be used to derive many properties of distant stars and galaxies , such as their chemical composition , temperature , density , mass , distance , luminosity , and relative motion using Doppler shift measurements .
It can find out their chemical composition , temperature , density , mass , distance , luminosity , and relative motion using doppler effect measurements .