  (Abridged):
  We define and test a new technique to accurately measure the cavity defects
of air-spaced FPIs, including distortions due to the spectral tuning process
typical of astronomical observations. We further develop a correction technique
to maintain the shape of the cavity as constant as possible during the spectral
scan. These are necessary steps to optimize the spectral transmission profile
of a two-dimensional spectrograph using one or more FPIs.
  We devise a generalization of the techniques developed for the so-called
phase-shifting interferometry to the case of FPIs. The technique is applicable
to any FPI that can be tuned via changing the cavity spacing ($z$-axis), and
can be used for any etalon regardless of the coating' reflectivity. The major
strength of our method is the ability to fully characterize the cavity during a
spectral scan, allowing for the determination of scan-dependent modifications
of the plates. As a test, we have applied this technique to three 50 mm
diameter interferometers, with cavity gaps ranging between 600 micron and 3 mm,
coated for use in the visible range.
  We obtain accurate and reliable measures of the cavity defects of air-spaced
FPIs, and of their evolution during the entire spectral scan. Our main, and
unexpected, result is that the relative tilt between the two FPI plates varies
significantly during the spectral scan, and can dominate the cavity defects; in
particular, we observe that the tilt component at the extremes of the scan is
sensibly larger than at the center of the scan. Exploiting the capability of
the electronic controllers to set the reference plane at any given spectral
step, we develop a correction technique that allows the minimization of the
tilt during a complete spectral scan. The correction remains highly stable over
long periods, well beyond the typical duration of astronomical observations.
