Calculation of spatial correlation function

Hello,

I am using python API ovito.modifiers.SpatialCorrelationFunctionModifier to calculate spatial correlation function Cr of Voronoi volume for a disorder system.
I follow the tutorial. The code I used and traj file is uploaded.
Cr.py (1.0 KB)
test.dump (307.3 KB)

However, the calculated Cr shows an approximately exponential decay but is not normalized between 0 and 1, and at r = 0, Cr ≠ 1, which seems inconsistent with the expected definition.

The refereced parper is “Cubuk et al., Science 358, 1033–1037 (2017)”.
I’m not sure how to correctly normalize the result — any advice or examples would be greatly appreciated!

I am not exactly sure what you want to do but I think maybe you need to normalize by both RDF and covariance. From the documentation Spatial correlation function — OVITO User Manual 3.14.1 documentation

For example, when both particle properties (P1 and P2) are constant and unity for all particles in the system, the modifier returns the pair distribution function. The reciprocal space representation is then the structure factor.