cosmo tiedrank hdr

function ranks = cosmo_tiedrank(data, dim)