Hi Eric,<br><br>I wrote some code to do this for the LightRay tool.  In your yt dir, have a look at yt/analysis_modules/light_ray/light_ray.py.  Near the bottom, there is a function called periodic_distance.  That should have what you need.<br>
<br>Britton<br><br><div class="gmail_quote">On Tue, Nov 30, 2010 at 12:24 PM, Eric Hallman <span dir="ltr"><<a href="mailto:hallman13@gmail.com">hallman13@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hey,<br>
  I am wondering if there is a simple routine in yt for calculating the minimum distance between two points in a periodic volume.  Somehow I wind up writing a new routine for this every time I do it, and it requires a bunch of loops to check which distance is right.  There is bound to be a faster easier way, wondering if anyone knows of one in yt, or has one they use that works fast.<br>

<br>
thanks!<br>
<br>
Eric Hallman<br>
Google Voice: (774) 469-0278<br>
<a href="mailto:hallman13@gmail.com" target="_blank">hallman13@gmail.com</a><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br>