Applying the kernel density approximation required careful choice of h, which defines the bandwidth size. The bandwidth acts as a smoothing parameter, controlling the trade-off between bias and variance in the result. The value of h (Table ) was chosen based on visual analysis and the ability to recreate the shape of the pore distributions (Supplementary Figure ). Materials with a combination of nanopores and mesopores required a large bandwidth to avoid spurious maxima whereas most materials with a tighter range of pore sizes a bandwidth of 1.0 Å is sufficient. From the KDE function the local minima and maxima were computed to give the limits and the comparable size for each pore (Fig. ).