Translate the logic in [processImage.m](https://github.com/uw-loci/curvelets/blob/master/src/CurveAlign_CT-FIRE/processImage.m) to python.