Convert from Relative Magnitude to Mass I have data which gives me the magnitude density (${\rm mag}\,{\rm arcsec}^{-2}$) of M31 as a function of radius.  How can I convert these data to the (enclosed) mass at a given radius (for velocity curve analysis)?
Here's a chart of the data.  The odd thing about the magnitude profile is that it looks exactly like a mass profile which leads me to believe there's a simple way to relate the two.

 A: A magnitude is a somewhat convoluted measurement of luminosity. You probably have relative magnitude $m$ per $\rm arcsec^2$.
You can start by using the distance modulus $m-M$ to calculate the absolute magnitude $M$:
$$m-M=5\left(\log_{10}\left(\frac{d}{\rm pc}\right) - 1\right)$$
where $d$ is the distance.
Once you have the absolute magnitude you can convert that to a luminosity using:
$$M-M_\odot=-2.5\log_{10}\left(\frac{L}{\rm L_\odot}\right)$$
$\rm L_\odot$ is the solar luminosity. $M_\odot$ is the absolute magnitude of the Sun (not to be confused with $\rm M_\odot$, the solar mass, notice the italic/upright characters). Note that this formula is only technically correct for the bolometric luminosity, that is integrated over all wavelengths, but if you have a sufficiently broad filter, or make some correction to your magnitude, it can still be used.
And finally a luminosity can be related to a (stellar) mass $M_*$ as:
$$\frac{L}{\rm L_\odot}=\Upsilon\frac{M_*}{\rm M_\odot}$$
The mass to light ratio $\Upsilon$ is its own art form. Crudely you can set it to $1$ (a solar mass of stars emits a solar luminosity of light, makes sense as a rough guess), but to get beyond that you'll have to dig through the literature as choosing accurate $\Upsilon$ is quite involved (you'll need, at a minimum, measurements in at least two filters).
Putting all that together you should now have converted your ${\rm mag}\,{\rm arcsec}^{-2}$ measurements to ${\rm M}_\odot\,{\rm arcsec}^{-2}$. From there you can just integrate over solid angle to get a radial mass profile.
