## Appendix A Stray Light Correction  
A transmission microscopy measurement consists in acquiring the incident intensity on sample \(I_{0}\) and the transmitted intensity \(I\) emerging from the sample on a two dimensional detector, typically a CCD camera. The transmission \(T\) at each pixel is then calculated as their ratio:  
\[T(x,y)=\frac{I(x,y)}{I_{0}(x,y)} \tag{1}\]  
It is generally considered that a transmission measurement is quantitative because it can be directly related to the properties of the sample via the Beer-Lambert law [22; 23]:  
\[T(x,y,\ E)=\frac{I(x,y,E)}{I_{0}(x,y,E)}=e^{(-\int u(x,y,E)dt)}=e^{(-\int \sigma(x,y,E)n(x,y)dt)} \tag{2}\]  
where \(\mu\) is the linear absorption coefficient and the integral is extended over the sample thickness \(t\). From Equation (2) the absorbance for each pixel can be calculated from the measured transmission as  
\[A(x,y,E)*ln(10)=-ln(T)=\mu t=\sigma nt \tag{3}\]  
where \(\mu\) was rewritten as the product of the photoelectric absorption cross section \(\sigma\) and the number of atoms or molecules per unit volume \(n\). Depending on the sample chemical composition, \(\sigma\) and therefore \(A\) will have peaks maxima around specific energy values, which can be predicted using various different theoretical approaches [24; 25] and that allow in principle to define the sample chemical state with spatial resolution. This information is available at MISTRAL, a state-of-the-art Fresnel Zone Plate (FZP) based full field transmission soft X-ray microscope installed at one of the bending magnet of the Alba Light Source [26], where the energy can be moved across the absorption edges of various interesting elements between 300 eV and 800 eV and chemical maps with a spatial resolution of few tenths of nanometers can be obtained, both for biological and nonbiological samples [27; 28; 29; 2]. The main limit of the technique is the small range of accessible sample thickness and concentration, due to the small X-ray penetration depths in the soft energy range and the resulting failure of the Beer-Lambert law. This limitation is even stronger if we consider the instrumental deviations from Equation (2), due to the way the transmission is acquired in any real full field soft X-ray transmission microscope. Indeed, at each intensity acquisition, also an unknown background, originating mainly from the unused -1 order of the FZP lens [30] is acquired. In the following, we will use the base 10 both for the exponential and the logarithm operations. The measured transmission \(T_{m}\) and the measured absorbance \(A_{m}\) taking the background \(B\) into account have to be rewritten as:  
\[T_{m}(x,y)=\frac{I(x,y)+B(x,y)}{I_{0}(x,y)+B(x,y)}\
eq T(x,y) \tag{4}\]  
\[A_{m}(x,y)=-\log(T)\
eq A(x,y) \tag{5}\]  
The presence of the background further limits the accessible range of thickness because only if it is fully negligible with respect to the measured intensities the validity of Equation (1) is kept. If it is not the case, the spectral shape will appear distorted with essentially the high-intensity peaks appearing flattened [31] (see Figure 1). This could be a problem when quantitative estimation based on the spectral shape has to be performed. Here we focus on oxygen K-edge measurements realized on Li-rich cathodes particles at various states of charge and propose a method, based on some simplifications, that allow us to estimate the background in Equation (4) and hence recover the real spectral shape A(E).