Spatial Distribution Function

How to calculate the spatial distribution function from material studio trajectory file?