functions for making the distortion correction. Everything is now in the header
Distortion correction class definition.