Reduced Chi-Square metric computation possible bug

Hello,

When performing some batch least-squares estimation and checking within withLeastSquaresOptimizer.Optimum of Orekit, we have noticed that the reduced chi-square metric returned when using the getReducedChiSquare(n) method (inherited from org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresProblem.Evaluation), was giving us different results as compared to our own analysis of the residuals. After some checks, it appears that the getReducedChiSquare(n) is using the total number of measurements for the computation of the RCS, whereas only the “used” measurements should be considered for such metric.

Could you confirm if this is the case?

Thank you very much for your time