Optimum defocus for stem imaging and microanalysis