[yt-users] Profile Plot range question

Nathan Goldbaum nathan12343 at gmail.com
Tue May 19 13:36:08 PDT 2015


On Tue, May 19, 2015 at 11:49 AM, Stephanie Tonnesen <stonnes at gmail.com>
wrote:

> Hi all,
>
> I am trying to make a profile plot of a cylindrical radial value.  So I
> politely ask:
>
> ds =
> yt.load("/data/stonnes/dwarf_test_rhopress_extrarot/DD"+sys.argv[1]+"/DD44sMBherlr"+sys.argv[1])
> ....
> my_disk = ds.disk([0.5,0.5,0.5],[0,0,1],(30,"kpc"),(0.1,"kpc"))
> ....
>
> profiles.append(yt.create_profile(my_disk,"cylindrical_r","density",weight_field="cell_mass"))
> ....
> plot=yt.ProfilePlot.from_profiles(profiles,labels=labels)
> plot.set_unit('cylindrical_r','kpc')
> plot.set_log('cylindrical_r',False)
> plot.save()
>
> And when my box is 96 kpc across, with a root 512 512 512 grid, 2 levels
> of refinement at 20.0 times initial density, I get what I wanted, a nice
> profile out to 30 kpc.
>
> BUT, when I ask the same thing starting with a lower resolution root
> grid:  256 256 256, my profile only goes out to 15 kpc!
>

Is the problem that the plot not displaying correctly or is the issue with
the raw profile data?  ProfilePlot has a set_xlim method that might be
useful here.

If you have

profile
= yt.create_profile(my_disk,"cylindrical_r","density",weight_field="cell_mass")

it might be illustrative to look at profile.x, and profile['density'].  You
might also need to manually set the extrema for the profile by passing in
an extrema dictionary to create_profile.


>
> I changed my disk to have a 40 kpc radius and it made no difference.
>
> Can anyone tell me why this is happening?  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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150519/47dda116/attachment.htm>
-------------- next part --------------
_______________________________________________
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