how did astronomers discover the relationship between spectral type and mass for main sequence stars?