FF: rewritten and tested deg2cm with support for flat-correction