Autotuning of a TEM using minimum electron dose