This is hilarious, because there is also one in yt/utilities/math_utils.py. I wonder which one is better? :)
Stephen Skory
stephenskory(a)yahoo.com
http://stephenskory.com/
510.621.3687 (google voice)
>
>From: Britton Smith <brittonsmith(a)gmail.com>
>To: Discussion of the yt analysis package <yt-users(a)lists.spacepope.org>
>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 <hallman13(a)gmail.com> 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(a)gmail.com
>>
>>
>>
>>
>>>>_______________________________________________
>>>>yt-users mailing list
>>yt-users(a)lists.spacepope.org
>>>>http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>
>
>
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(a)gmail.com
Hi,
This might be a dumb question, but how do you get YT to work with
RAMSES? I tried naively following the guidelines in the Quick Start
guide, and it didn't work:
---
In [5]: pf = load("../output_00001")
yt ERROR 2010-11-25 09:58:43,587 Couldn't figure out output
type for ../output_00001
---
I couldn't find anything by searching the online documentation, paper on
arXiv or the mailing list archives. Any advice on how to get it working?
Thanks,
Sam
Hi All,
With the new configuration setup, I'm having issues with parallel analysis:
simple_proj.py:
from yt.mods import *
pf = load('DD1701')
pc = PlotCollection(pf,center=[0.5]*3)
pc.add_projection('Density',0,weight_field='Density')
Below is the full error message. I'm not sure if this is due to my
implementation somehow or something to do with the config change. Any help
would be appreciated.
Sam
32Mpc64grid/DD1701:mpirun -np 2 python simple_proj.py --parallel
yt DEBUG 2010-11-24 02:24:24,890 Set log level to 0
yt DEBUG 2010-11-24 02:24:24,890 Set log level to 0
yt DEBUG 2010-11-24 02:24:24,944 SIGUSR1 registered for
traceback printing
yt DEBUG 2010-11-24 02:24:24,945 SIGUSR2 registered for IPython
Insertion
yt DEBUG 2010-11-24 02:24:24,944 SIGUSR1 registered for
traceback printing
yt DEBUG 2010-11-24 02:24:24,945 SIGUSR2 registered for IPython
Insertion
yt INFO 2010-11-24 02:24:26,127 Parallel computation enabled:
0 / 2
yt INFO 2010-11-24 02:24:26,127 Parallel computation enabled:
1 / 2
Traceback (most recent call last):
File "simple_proj.py", line 1, in <module>
from yt.mods import *
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/yt-2.0dev-py2.6-macosx-10.6-i386.egg/yt/mods.py",
line 42, in <module>
from yt.data_objects.api import \
Traceback (most recent call last):
File "simple_proj.py", line 1, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/yt-2.0dev-py2.6-macosx-10.6-i386.egg/yt/data_objects/api.py",
line 34, in <module>
from hierarchy import \
from yt.mods import *
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/yt-2.0dev-py2.6-macosx-10.6-i386.egg/yt/mods.py",
line 42, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/yt-2.0dev-py2.6-macosx-10.6-i386.egg/yt/data_objects/hierarchy.py",
line 40, in <module>
from yt.data_objects.api import \
from yt.utilities.parallel_tools.parallel_analysis_interface import \
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/yt-2.0dev-py2.6-macosx-10.6-i386.egg/yt/utilities/parallel_tools/parallel_analysis_interface.py",
line 52, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/yt-2.0dev-py2.6-macosx-10.6-i386.egg/yt/data_objects/api.py",
line 34, in <module>
from hierarchy import \
ytcfg["yt","__parallel_rank"] = str(MPI.COMM_WORLD.rank)
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/yt-2.0dev-py2.6-macosx-10.6-i386.egg/yt/data_objects/hierarchy.py",
line 40, in <module>
AttributeError: ConfigParser instance has no attribute '__setitem__'
from yt.utilities.parallel_tools.parallel_analysis_interface import \
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/yt-2.0dev-py2.6-macosx-10.6-i386.egg/yt/utilities/parallel_tools/parallel_analysis_interface.py",
line 52, in <module>
ytcfg["yt","__parallel_rank"] = str(MPI.COMM_WORLD.rank)
AttributeError: ConfigParser instance has no attribute '__setitem__'
Hi,
I updated yt to the new release, and now I'm getting 'NameError: name
'Camera' is not defined' for Camera and HomogenizedVolume (these were
both part of the volume_rendering extension previously). Did these get
renamed or do I need to import something else?
Thanks!
Stella
Hi all,
I just wanted to announce that the new kd-Tree rendering framework is now in
the 'yt' branch of the repository. There are a couple things I wanted to
point to if you are interested.
The changeset itself:
http://yt.enzotools.org/changeset/c7947fef16ac/
A post on blog.enzotools.org highlighting some recent successes:
http://blog.enzotools.org/amr-kd-tree-rendering-added-to-yt
A simple script, where you should just have to change the parameter file
name:
http://paste.enzotools.org/show/1367/
A more advanced script that exposes a few new options:
http://paste.enzotools.org/show/1368/
Both of these scripts should be able to be run in parallel (as long as N is
a power of 2 for now) transparently as:
mpirun -np N python script.py --parallel
Parallel performance will depend on the structure of your data, but the docs
for the Camera object have some suggestions.
If you find any problems or have any thoughts, let me know!
Best,
Sam
Hi all,
I'm writing about upgrading the "stable" version of yt to the a new
naming scheme. Before I say anything else, let me start out and say
that because of the potentially disruptive nature of this change, you
should feel free to either refrain from upgrading your yt installation
or emailing me directly (off-list) to get assistance with the upgrade
process.
We're planning on moving the "stable" version of the code to be the
2.0 API in the next few weeks, where we have removed the names lagos,
raven, etc, in favor of more informative names like visualization,
data_objects, and so on. This change was described by Jeff in an
email to the list a few months ago, which has been summarized here:
http://yt.enzotools.org/wiki/yt-2.0 . I would like to encourage you
to upgrade now, rather than later, so that we can try to work out any
potential issues in advance of the upgrade of the title "stable."
Documentation is almost completely update and will be done before the
"stable" branch reflects the new API.
I've updated the homepage to now encourage new users to use the
development version, which features the new module names, etc. If you
would like to continue using the version you are on, you should be
able to continue to do so by not upgrading.
If you would like to upgrade, a new installation may be the easiest
way, or otherwise you should be able to get the directory name of the
current yt installation from "yt instinfo" and execute: "hg pull ; hg
up -C yt ; hg purge ; python2.6 setup.py develop" in that directory.
I'm working on updating the documentation to reflect this, but the
upshot of all of the API changes is that *everything* that is needed
to do all the standard analysis tasks is still available just with the
command:
from yt.mods import *
If you are executing anything that requires directly calling "lagos"
or "raven", please contact me directly (off-list) and I will assist
you with the upgrade of your scripts. If you think it's a relatively
broad concern about module naming and so on, feel free to email the
list.
Thanks very much,
Matt
Howdy folks,
I'd like to calculate the 'lambda' field parameter: <r|v|> / ( r
sqrt(v^2+sigma^2) ) (Emsellem et. al. http://arxiv.org/abs/astro-ph/0703531).
All of the quantities in question are viewed in projection - as an observer
would see. As a result, my lambda field depends on the 'camera location' and
requires the projected velocity and dispersion fields, as well as the
projected radius, to be computed.
Is this possible, or rather, how much elbow grease do I have to put in to
calculate this stuff?
Thanks,
chris
Hi all,
I just wanted to let you know that we posted a yt method paper on the
arXiv today, which may be of some interest.
http://arxiv.org/abs/1011.3514
Best,
Matt
Elizabeth,
>There's code to calculate two-point functions (like structure functions and two-point correlation functions). That's almost what you want - you could calculate the 2-point correlation function and do a fourier transform of it with numpy to get the power spectrum of your desired quantity. See:
>
>http://yt.enzotools.org/doc/extensions/two_point_functions.html
Let me add to Brian's response and say that, even as the author of the two-point functions framework, I often get confused on how to use it. It's very flexible and powerful, but not entirely intuitive (which are generally opposing things). I put two examples at the bottom of that page on how to do two-point correlations, where the second one is probably closer to what you want. Let me know if you want help on adapting the example to what you want.
Good luck!
Stephen Skory
stephenskory(a)yahoo.com
http://stephenskory.com/
510.621.3687 (google voice)