[yt-users] Gadget: Isolated galaxy visualization
Kim, Ji-hoon
mornkr at slac.stanford.edu
Fri Nov 15 14:03:10 PST 2013
Hi Keita,
Thank you so much for sharing the figure.
(1) As for shifting field of views as the disk moves, one could re-center the image at centers-of-mass of the inner 20 kpc-radius sphere. You may try something like this:
- my_sphere = pf.h.sphere([0.5, 0.5, 0.5], 20.0/pf["kpc"])
- center = my_sphere.quantities["CenterOfMass"](use_cells=True, use_particles=True)
- p=pc.add_projection("Sigma", ax, center=center, figure=fig, axes=axes[ax][0], use_colorbar=False)
(2) As for the white background (I guess this is what you meant?), you may try to employ set_under() to replace white pixels with the color at the colorbar's lower limit.
http://matplotlib.org/examples/pylab_examples/contourf_demo.html
(3) I understand that: the ways to improve the smoothing in Gadget images is being actively investigated now (for example, see below). It would be great if Matt or anybody could say what Keita could do to test the new features with Gadget datasets.
https://bitbucket.org/yt_analysis/yt-3.0/pull-request/122/fixing-smoothing-to-rather-than-normalize/diff
Best regards,
Ji-hoon
On Nov 15, 2013, at 12:48 PM, Keita Todoroki wrote:
> Hi,
>
> I managed to visualize gadget's isolated galaxy sims, and I'm wondering if
> I can improve the resolution of the image, especially the background,
> somehow.
> The image and the script can be found below:
>
> http://www.physics.unlv.edu/~keitee/isolated_low-res.png
> http://www.physics.unlv.edu/~keitee/gadget_agora.py
>
>
> Also, the disk moves a bit as time progresses (as you can see on the
> right-most column), and I'm wondering if yt can adjust that shift as well.
>
>
> -Keita
>
---------------------------------------------------------------
Ji-hoon Kim
Postdoctoral Scholar in Astrophysics
www.jihoonkim.org
me at jihoonkim.org / 1(650)714-2879
---------------------------------------------------------------
More information about the yt-users
mailing list