Wavelength measured from stars suppose we have a star that's moving away from the Earth. we measure its wavelength at which it gives maximum energy output. now how do we understand that this wavelength is overestimated  due to red shift and not due to decrease in surface temperature or vice versa?