Obtaining effective pair potentials in colloidal monolayers using a thermodynamically consistent inversion scheme.