[yt-users] light ray woes

Cameron Hummels chummels at gmail.com
Wed May 25 20:41:24 PDT 2016


Stephanie,

It looks like there are two problems you're encountering.  One, you're
trying to include a field "velocity", when there is no such field in your
dataset, only 3 scalar fields for "velocity_x", "velocity_y"...  These will
be included by default when you set use_peculiar_velocity=True as you are
doing.  So for one, remove the velocity field from your list of fields.
The second problem, as you quite rightly identify, is that yt is messing up
the order that it's getting the redshifts of the outputs, so it's jumping
straight from 0.4 to 0.1.  I can't dig into the code right now to see why
it is ordering it weirdly, but I might be able to look at it in the next
day or two.  Britton may also have an idea on what is going on here.

Also of note is that there are some nice wrapper functions on the LightRay
functionality in the new Trident code.  In particular, the
make_compound_ray function wraps this cleanly.  That said, it will not fix
this problem, as it is just using the underlying yt LightRay
infrastructure:
http://trident.readthedocs.io/en/latest/generated/trident.make_compound_ray.html#trident.make_compound_ray

Cameron

On Wed, May 25, 2016 at 1:47 PM, Stephanie Tonnesen <stonnes at gmail.com>
wrote:

> Hi all,
>
> I am trying to make a light ray using a few redshift outputs from z=0.4 to
> z=0.1.  Right now I just have two commands in my code taken basically
> directly from the docs:
>
> lr = LightRay("CBOX.enzo",simulation_type="Enzo",near_redshift=0.1,
>
> far_redshift=0.4,time_data=False,redshift_data=True,find_outputs=True)
>
>
> lr.make_light_ray(seed=8934876,fields=['temperature','density','velocity'],use_peculiar_velocity=True)
>
> My current problem is that the first command "LightRay" doesn't seem to be
> using any of my outputs between 0.4 and 0.1!  I am attaching the error
> file, and you can see that it finds 9 outputs, 7 of which are between and
> including 0.4 to 0.1.  However, then it claims that I am asking it to go
> straight from 0.399996 to 0.1.
>
> I do only have redshift dumps to work with, but I think that those should
> be used since redshift_data=True
>
> Does anyone have any advice for making this work?
>
> Thanks,
> Stephanie
> --
> Dr. Stephanie Tonnesen
> Alvin E. Nashman Postdoctoral Fellow
> Carnegie Observatories, Pasadena, CA
> stonnes at gmail.com
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>


-- 
Cameron Hummels
NSF Postdoctoral Fellow
Department of Astronomy
California Institute of Technology
http://chummels.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160525/08fbe974/attachment.html>


More information about the yt-users mailing list