Annular pupil filter under shot-noise condition for linear and non linear microscopy