CAP_LOESS_1D and CAP_LOESS_2D provide improved implementations of the one-dimensional (Clevelend 1979) and two-dimensional (Cleveland & Devlin 1988) Locally Weighted Regression (LOESS) methods to recover the mean trends of the population from noisy data in one or two dimensions. They include a robust approach to deal with outliers (bad data). The software is available in both IDL and Python versions.