Pupil mask diversity for image correction in microscopy