Doubts about correctness of `calculate_reliability!` implementation in Unwrap
As mentioned in #576, copying here for convenience. It would be nice if any past contributors could shed some light on the algorithm, and even if there's nothing wrong a bit more documentation would be nicer.
For non-border regions, reliability is calculated over a cube around the pixel (
3^Npixels, described in the comments as "nearest neighbours"), although there are only2NEdgesinvolving one pixel inpopulate_edges!, which are the nearest neighbours in the context of lattices. But if there are circular dims / faces are connected, thenpixel_shifts_bordercontains duplicate shifts. This makes more sense if only2Nneighbours should have been included in the reliability calculation, since then there would only be 1 shift per border pixel that wraps around. Also, the reliability of pixels on the edges, including corners, are just rand(rng) and are not calculated. I don't have access to the cited publications, so I can't check whether the current implementation is actually correct.