I had the cd4 arrays back to front in calibration.cpp