Procedure for robust assessment of cavity deformation in Fabry–Pérot based refractometers