fix est_ap() in search/compare.py