A method of analytical transmission electron microscopy is described that has been successfully applied to study dopant segregation to inversion domain boundaries in zinc oxide, to quantify the thicknesses of sub-nanometre thin epitaxial layers grown by molecular beam epitaxy of indium arsenide (InAs) on gallium arsenide (GaAs) or silicon/germanium on silicon and proved the absence of any gettering of As or Ga dopants at Sigma=3 {111} grain boundaries in silicon, with a precision of <1 atom/nm2 in each case. Here, the case study of InAs/GaAs is reviewed in detail and the procedure for quantification of full hyperspectral data sets is explained.