fixed issue that causes test.py to fail on different systems, and a few cosmetic bugs. it was caused by phase calibration parameters not being nan when all the input data slice are 0 or -0.