  We present a method to determine the static aberrations in a nearly
diffraction-limited spectrograph introduced, for example, by alignment or
manufacturing errors. We consider an instrument with two stages separated by a
slit or image slicer located in the intermediate focal plane. In such a
spectrograph, it is not trivial to distinguish aberrations in the first stage,
before the slit, from those in the second, after the slit. However, our method
achieves this. Measuring these aberrations separately opens the possibility of
reducing them, by realignment or other means, and thereby improving the optical
performance of the instrument. The method is based on fitting models to
multiple images of a point source, with controlled displacements of the source
perpendicular to the slit and controlled defocuses of the second stage or the
detector. Fitting models to these images allows the determination of the
aberrations in both stages. Our key discovery is that the displaced and
defocused images provide additional information which allows us to break the
ambiguity between the two stages. We present simulations that validate the
performance of the method.
