what is the formula for stellar magnitudes