rectN defines the size of the smoothing stencil in N-th dimension.
Theory in Appendix B of:
S. Fomel, 2009,
Velocity analysis using AB semblance: Geophysical Prospecting, v. 57, 311-321.
Reproducible version in RSFSRC/book/tccs/avo http://ahay.org/RSF/book/tccs/avo/paper_html/