How to find the temperature of the gas in a Galaxy

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  

or:

T = 4.8 x 10-9 v2


Example:

For NGC628, the line width = 40 km/s = 4 x 106 cm/s

Then, T = 76, 000 K