In a typical RHEED setup, one magnetic and one electric field focus the incident beam of electrons. A negatively biased Wehnelt electrode positioned between the cathode filament and anode applies a small electric field, which focuses the electrons as they pass through the anode. An adjustable magnetic lens focuses the electrons onto the sample surface after they pass through the anode. A typical RHEED source has a focal length around 50 cm. The beam is focused to the smallest possible point at the detector rather than the sample surface so that the diffraction pattern has the best resolution.