# How do people derive ionized gas mass from optical emission lines in a galaxy spectrum?

Suppose you had an optical spectrum of a galaxy, and you unambiguously detected emission lines from cooling ionized gas -- both forbidden lines like [O II] 3727AA and [O III] 4959,5007AA, as well as recombination lines like H$\beta$. So you have measured things like the integrated flux, equivalent width ($\equiv$ integrated flux / local continuum flux density), FWHM, etc. for your emission lines. Now, you want to know how much warm ionized gas is in the galaxy (or at least in the region in which your spectrum was taken) -- i.e., you want to go from your aforementioned Gaussian parameters like integrated flux to a gas mass in solar masses. How do people typically do this, and what assumptions do you have to make? Any references would be greatly appreciated!