import math


def peak_matched(pk_ch, pk_pf) :
    """Returns True if Cheetah peak is matched to the peakfinder peak, False othervise
    """
    #pk_pf.seg, pk_pf.row, pk_pf.col
    s, r, c = pk_ch.seg_row_col()
    if pk_pf.seg != s              : return False
    if math.fabs(pk_pf.row-r) > 5. : return False
    if math.fabs(pk_pf.col-c) > 5. : return False
    return True