I never did understand the signs in this section, which worried me, and in the end my only solution was to unit test the problem to death, including writing a new KS inversion code for comparison and an independent test for this independent KS inversion (a KS inversion which doesn't have this sign flip that I can't explain...!!)

This is discussed a bit in the notes for the unit tests in test_lensing.py.  Could someone with fresher eyes see if they can see what is wrong?