I don't think that actually answer the question. It definitely has an answer, bt just throwing around scientific fields isn't it.
Also, don't you mean stellar spectroscopy? Mass spectrometry is when you fire ions through an electric field to determine their mass-to-charge ratio. Doesn't seem even a little bit applicable to far-away objects.