I guess I don't understand why you say ``Therefore :math:`vmid = (m*vmin-vmax)/(m-1)`` - that's just a re-arranged version of the above equation, and doesn't have anything to do with ds9.