Data reduction for the AMBER instrument

We present here the general formalism and data processing steps used in the data reduction pipeline of the AMBER instrument. AMBER is a three-telescope interferometric beam combiner in J, H and K bands installed at ESO's Very Large Telescope Interferometer. The fringes obtained on the 3 pairs of telescopes are spatially coded and spectrally dispersed. These are monitored on a 512x512 infrared camera at frame rates up to 100 frames per second, and this paper presents the algorithm used to retrieve the complex coherent visibility of the science target and the subsequent squared visibility, differential phase and phase closure on the 3 bases and in the 3 spectral bands available in AMBER.