[yt-users] Point Pairs in the Two Point Function

Stephen Skory s at skory.us
Mon Sep 15 19:06:46 PDT 2014


Hi Piyanat,


>
> Would the random points be chosen out of these coordinates or from arbitrary coordinates, i.e. (0.2, 3.1, 5.8) instead of (0, 3, 6)?

The random points are random floats, but the field values used
correspond to the cell in which they fall.

> Now, if the random point coordinates are arbitrary, this implies an infinite number of points within a spherical volume for a given max separation. How does the TPF avoid overlapping voxels here, i.e. does it put a constraint on the lower limit of separation to avoid overlapping voxels?

I think that it checks to make sure that the smallest separation is
bigger than the smallest cells. This could present an issue if you
have an AMR dataset, so you'd have to account for that if this is the
case.

> If the random point coordinates are not arbitrary but chosen from the fixed rectangular coordinates, this implies a limited number of points for a given maximum separation, so how does total_values work here? Do I have to pre-estimate the number of pairs within a sphere of a given max separation and set it total_values to this number to avoid over counting the same pairs?

My thought is that if total_values is greater than N^2 where MxMxM=N
and M is the side of your grid, you will end up repeating pairs. I do
not think that any special care is taken for that case, so you may
have to think about that.

> I am not sure if my use here make sense. I have a temperature field in a big 3D numpy array that I would like to calculate an absolute difference in temperature between pixel pairs, so I load the data into the yt and run it with the tpf function. It seems to work although I have not gotten mpirun to work with the script., and I am not sure if this is actually the right thing to do.

If your array is not too big, it may be easiest to do this with a
simple double loop. And if your data is all numpy, you might look into
numba: http://numba.pydata.org/ for some speedups.


-- 
Stephen Skory
s at skory.us
http://stephenskory.com/
510.621.3687 (google voice)



More information about the yt-users mailing list