I am working on a high school physics assignment and am trying to figure out a method to determine if the star is a giant or main sequence from its spectral and photometric data (from SDSS). I picked two stars of the same spectral class K1 a giant and a dwarf, and to compare their flux graphs I needed to fix the axis as the stars are not the same distance away. Here's the two graphs
Using hubble's law $v=Hd$, and that red shift is calculated by $z=v/c$ I attempted calculating the distance of the stars from their red shift then used the inverse square law to scale up the flux of the star that was further away based on its red shift. This happened to be the main sequence star as its red shift is about 8 times higher than the giant, but scaling up by what I calculated as 67.5 times (about 8 squared) the main sequence star would have much more flux than the giant based on the graph which didn't make sense to me. Thus, I am assuming that the expansion due to distance is not the major cause of red shift in this case but peculiar velocity, leading to this error. To overcome this I thought to pick stars so far away that peculiar velocity is negligible compared to expansion, but I don't know what range of red shifts to look for. It may be too late to change questions now but is this a correct way of determining whether a star is a giant or dwarf. Also is there any other ways. For example, I believe the width of absorption valleys should decrease as the star's size increases, due to decreasing pressure and rotational velocity, but looking at the two spectra I can't tell if there is a difference, especially when the vertical axes are not the same. What to look for?