Since XAS forms the basis of traditional STXM, it can be thought of as a two-dimensional extension of XAS. For a mixture of different materials, XAS associated with each pixel on an absorption stack of images can be expressed as a linear combination of reference spectra of the components (Singular Value Decomposition method (SVD) . It is thus important to synthesize or obtain reference samples whenever possible. SVD analysis results in thickness maps of each component (chemical composition maps) in case the reference spectra are of known thickness. These maps can be used to obtain molar ratios and stoichiometry of the materials analyzed. This has been routinely used of organic photovoltaic materials and was recently applied to FIB sections of MAPbI3 samples .