In match_XMM, replaced all mean/std with median/mad.