Mass of a galaxy via luminosity Is there a general formula for calculating the mass of a galaxy, or even a nebula from the luminosity? Or, is there a way of calculating the total mass of a galaxy from its energy output?
Is there a Hertzsprung–Russell diagram equivalent for galaxies?
I know about gravitational lensing or velocity dispersion via the virial equation, and the Schechter function, and using doppler spread to calculate a mass.
 A: It sounds like you already have a pretty comprehensive answer in hand, but I would mention that galactic clusters are often classified by the mass or luminosity of their Nth-biggest or brightest member, where N is a smallish integer like 5. The idea is that the biggest couple might be weird outliers, but by the time you get down to the "rank and file" galaxies in a cluster, you should have a good handle on how big the cluster is. The strength of that scheme is that it can be difficult to determine if every galaxy in your image is actually a member, so that it is difficult to arrive at a good estimate of total mass directly. ...And you only have to take detailed data on a handful of the easiest galaxies anyway.
EDIT: I knew there was another, more direct answer, but I couldn't remember the authors' names. The Tully-Fisher Relation and the Faber-Jackson Relation describe empirically the relation between galactic luminosity and velocity-dispersion for spiral and elliptical galaxies, respectively. It is usually used to infer the former from the latter, but if for some reason you had luminosity in-hand already, velocity dispersion is related to the strength of the gravitational field of the galaxy and thus its mass.
A: There is not a straightforward relation between a galaxy's luminosity and its mass. The luminosity depends on how much present and recent star formation there has been. Some very massive elliptical galaxies have little star formation going on, so they are not particularly luminous for their mass.
To understand why this is so, consider stars converting hydrogen to helium, and lying on the "Main Sequence" (see Wikipedia) in the Luminosity-Color (Hertzsprung-Russell) diagram. On the Main Sequence, stars burn with a luminosity which is proportional to their mass to about the 3.5 power. The Sun is a Main Sequence star, and a blue B-type star on the Main Sequence might have 30 times the Sun's mass and 100,000 times the luminosity, and a red M-type star on the Main Sequence might only one-tenth the Sun's mass and less than a thousandth of the luminosity. Since the lifetime of a star depends on the mass divided by the luminosity, stars much more massive than the Sun will have short lifetimes (millions of years) and stars much less massive than the Sun will have very long lifetimes (trillions of years).
After they exhaust the hydrogen, the stars will go through a relatively brief giant phase where they are even more luminous for a short while, but then gradually fade into a white dwarf that still has a lot of mass but very little luminosity. The upshot is that soon after a burst of star formation,a galaxy will glow brightly with massive main sequence stars and stars in the giant phase. But a long time later, the luminosity will be dominated by white dwarfs and red main sequence stars, both of which give off very little luminosity for their mass.
