The mass of a star can be determined by studying