use nanmedian for CIMEDIAN errors