How to find the amount of gas in a galaxy

If every hydrogen gas atom in a galaxy gives off a certain amount of radio light, then the total intensity of the hydrogen spectral line is proportional to the amount of hydrogen gas:

Number of Hydrogen Atoms = 3.3 x 1018 x Distance2 x Number of boxes within the spectral line

Since the mass of a Hydrogen atom = 2 x 10-24 grams:

Mass of Hydrogen gas in a galaxy (in grams) = 2 x 10-24 x Number of Hydrogen Atoms

Since our Sun has a mass of 2 x 1033 grams, one can use the mass of hydrogen to compare how many Sun's worth of hydrogen gas there is in a galaxy.


Example:

From previous exercise: Distance = 3.3 x 1025 cm

If you counted 150 boxes within the spectral line, then Number of Hydrogen atoms = 5.4 x 1066 atoms
This is a mass of 1.1 x 1043 grams

Which is equivalent to 5.4 x 109 times the mass of the Sun