A method of reducing atom ejection from a sample during electron beam bombardment.
An electron beam is directed through a low pressure environment toward a surface
of the sample. The electron beam thereby impinges on the sample at a target location,
and thereby causes characteristic x-ray emission from the target location of the
sample. A capping precursor is introduced into the low pressure environment, where
the capping precursor forms a capping layer on the surface of the sample at the
target location when contacted by the electron beam. The capping layer thereby
reduces atom ejection from the sample at the target location, while not appreciably
impeding and confounding the characteristic x-ray emission from the target location
of the sample.