An X-ray fluorescence analyzer has a structure that defines a chamber
(102). There is a window (103) to the chamber in a surface that is to
come next to a sample (101) outside the chamber. The window (103)
comprises a foil that is permeable to X-rays. A detector (104) receives
fluorescent X-rays through said window (103). A low pressure source (508)
is coupled to the chamber (102) and configured to controllably lower the
pressure of a gaseous medium in the chamber (102) to a pressure value
between 760 torr and 10 torr. The X-ray fluorescence analyzer maintains a
lowered pressure of a value between 760 torr and 10 torr in the chamber
(102) for the duration of an X-ray fluorescence measurement.