Re: [yt-users] calculation of distance in periodic volume
This is hilarious, because there is also one in yt/utilities/math_utils.py. I wonder which one is better? :) Stephen Skory stephenskory@yahoo.com http://stephenskory.com/ 510.621.3687 (google voice)
From: Britton Smith
To: Discussion of the yt analysis package Cc: Sent: Tuesday, November 30, 2010 11:05:47 AM Subject: Re: [yt-users] calculation of distance in periodic volume Hi Eric,
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.
Britton
On Tue, Nov 30, 2010 at 12:24 PM, Eric Hallman
wrote: Hey,
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.
thanks!
Eric Hallman Google Voice: (774) 469-0278 hallman13@gmail.com
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi all,
I think it's worthwhile to reduce the number of points-of-failure we
have in the code. I think we should remove the light_ray periodic
distance and move to using the math_utils.py one. My reading is that
that one is better documented, covers a few more potential corner
cases, and I generally prefer we standardize on the one that's global
rather than specific to an individual analysis package.
-Matt
On Tue, Nov 30, 2010 at 10:14 AM, Stephen Skory
This is hilarious, because there is also one in yt/utilities/math_utils.py. I wonder which one is better? :)
Stephen Skory stephenskory@yahoo.com http://stephenskory.com/ 510.621.3687 (google voice)
From: Britton Smith
To: Discussion of the yt analysis package Cc: Sent: Tuesday, November 30, 2010 11:05:47 AM Subject: Re: [yt-users] calculation of distance in periodic volume Hi Eric,
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.
Britton
On Tue, Nov 30, 2010 at 12:24 PM, Eric Hallman
wrote: Hey,
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.
thanks!
Eric Hallman Google Voice: (774) 469-0278 hallman13@gmail.com
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (2)
-
Matthew Turk
-
Stephen Skory