[yt-users] Issues with code_length versus physical lengths for positions in x, y, z space

Devin Silvia devin.silvia at gmail.com
Mon Apr 20 10:12:07 PDT 2015


Hi all,

I've been trying to do some data analysis of an Enzo dataset to
extract information about volumes contained with the virial radius of
rockstar identified halos.

As a test, I've identified the most massive halo and created sphere at
that halo position using a bit of code that looks like this:

sp = data_ds.sphere([most_massive.quantities['particle_position_x'],
                     most_massive.quantities['particle_position_y'],
                     most_massive.quantities['particle_position_z']],
                    most_massive.quantities['virial_radius'])

Then, when I actually try to use the sphere to analyze data or make
plots, it seems like there is something screwy going on with the
position information, which you can see if you look at the
calculations done here:

http://paste.yt-project.org/show/5522/

When you look at the "center" based on a calculation of the positions
with respect to the domain, you get a different center than the one
that just comes of sp.center in "code_length".  Specifically, the
"code_length" center values all seem to be off from the actual
position of the halo by a factor of 1.4:

In [98]: sp.center.in_units("kpc")/data_ds.domain_width.in_units("kpc")
/ sp.center.d
Out[98]: YTArray([ 1.40845077,  1.40845077,  1.40845077]) (dimensionless)

I'm not sure where this factor is coming from, but it seems to be
buried in some sort of unit conversion step somewhere.

Thanks,
Devin

-- 
Devin W. Silvia
NSF Astronomy and Astrophysics Postdoctoral Fellow
Department of Physics and Astronomy
Michigan State University
www.devinsilvia.com
_______________________________________________
yt-users mailing list
yt-users at lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org




More information about the yt-users mailing list