the code works but there is obviously an error in the way correction are
applies: their effect should be small (<1 pixel) and their effect looks
of the order of 10 pixels.