This is tangentially related, but one of my favourite little spectral analysis factoids is that because of it Helium was discovered on the Sun before any samples of it were found on Earth. There's an explanation of the process in this link:
https://socratic.org/questions/helium-was-discovered-on-the-...