Partial blanking of an electron beam using a quadrupole lens