The value of adaptive optics (AO) for astronomy no longer needs to be
demonstrated. To match the extreme requirements of astronomy in terms
of resolution and sensitivity requires us to optimize an AO system to
a great variety of situations. In particular, this paper addresses the
case of low flux levels and shows that the final image quality can be
improved by adapting the spatial and temporal correction performance
of the AO system. The wavefront is considered as a weighted sum of spa
tial modes. Each mode has an individual behavior characterized by its
signal to noise ratio and correlation time. Taking this into account l
eads us to attribute a specific, optimized correction bandwidth to eac
h mode. To apply this optimization method to a practical use of adapti
ve optics, one proposes a scheme where all the required inputs are col
lected by the AO system itself. The method becomes entirely independen
t of theoretical assumptions about the turbulence.