begin to port sampling_ppm_f_search_set_by_pss from matlab to here. temporary save