Mitigating ringing artifacts in diffraction calculations using average subtractions