cosmo slice hdr

function ds = cosmo_slice(ds, to_select, dim, type_or_check)