function ipr = sort(ipr, e_sort)
    % reorder particles in reconstruction so that they are arranged in
    % increasing order of distance along the axis e_sort
    
    re_sort = e_sort(:).' * ipr.re_part;
    [~,reidx]= sort(re_sort, 'ascend');
    ipr.select(reidx);
end