formula for J corrected in te_pair.py