  Transmission electron microscopy specimens typically exhibit local distortion
at thin foil edges, which can influence the absorption of X-rays for
quantitative energy dispersive X-ray spectroscopy (EDS). Here, we report a
numerical, three-dimensional approach to model the geometry of general
specimens and its influence on quantification when using single and multiple
detector configurations. As a function of specimen tilt, we show that the model
correctly predicts the asymmetric nature of X-ray counts and ratios. When using
a single detector, we show that complex specimen geometries can introduce
significant uncertainty in EDS quantification. Further, we show that this
uncertainty can be largely negated by collection with multiple detectors placed
symmetrically about the sample such as the FEI Super-X. Finally, based on
guidance provided by the model, we propose methods to reduce quantification
error introduced by the sample shape. The source code is available at
https://github.com/subangstrom/superAngle.
