Structures, or spatial arrangements of matter and energy, including some fields (e.g., velocity or pressure) are ubiquitous in research applications and frequently require description for subsequent analysis, or stochastic reconstruction from limited data. The classical descriptors are two-point correlation functions (CFs), but the computation of three-point statistics is known to be advantageous in some cases as they can probe non-Gaussian signatures, not captured by their two-point counterparts. Moreover, n-point CFs with n≥3 are believed to possess larger information content and provide more information about studied structures. In this paper, we have developed algorithms and code to compute S_{3},C_{3},F_{sss},F_{ssv},and F_{svv} with a right-angle and arbitrary triangle pattern. The former was believed to be faster to compute, but with the help of precomputed regular positions we achieved the same speed for arbitrary pattern. In this work we also implement and demonstrate computations of directional three-point CFs-for this purpose right-triangular pattern seems to be superior due to explicit orientation and high coverage. Moreover, we assess the errors in CFs' evaluation due to image or pattern rotations and show that they have minor effect on accuracy of computations. The execution times of our algorithms for the same number of samples are orders of magnitude lower than in existing published counterparts. We show that the volume of data produced gets unwieldy very easily, especially if computations are performed in frequency domain. For these reasons until information content of different sets of correlation functions with different "n-pointness" is known, advantages of CFs with n>3 are not clear. Nonetheless, developed algorithms and code are universal enough to be easily extendable to any n with increasing computational and random access memory (RAM) burden. All results are available as part of open-source package correlationfunctions.jl [V.Postnicov et al., Comput. Phys. Commun. 299, 109134 (2024)10.1016/j.cpc.2024.109134.]. As described in this paper, three-point CFs computations can be immediately applied in a great number of research applications, for example: (1) flow and transport velocity fields analysis or any data with non-Gaussian signatures, (2) deep learning for structural and physical properties, and (3) structure taxonomy and categorization. In all these and numerous other potential cases the ability to compute directional three-point functions may be crucial. Notably, the organization of the code functions allows computation of crosscorrelation, i.e., one can compute three-point CFs for multiphase images (while binary structures were used in this paper for simplicity of explanations).
Read full abstract