A generalized procedure for reducing interferometric data