For a face on Galaxy, the width of the spectral line is due to the Brownian motion of the gas in the galaxy.
½ m v2 = 3/2 k T
where m = mass of the hydrogen atom = 2 x 10-24 grams and k = Boltzman's constant = 1.4 x 10-16 ergs / Kelvin. Thus:
T = m v2 / 3 k
T = 4.8 x 10-9 v2
For NGC628, the line width = 40 km/s = 4 x 106 cm/sThen, T = 76, 000 K