make pixel-chi-square NaN to zero