[yt-users] velocity annotation dark matter

Nathan Goldbaum nathan12343 at gmail.com
Fri Jan 16 17:04:44 PST 2015


On Wed, Jan 14, 2015 at 6:39 PM, Long Do Cao <
docao at vega.ess.sci.osaka-u.ac.jp> wrote:

> Hi all yt-users,
>
> I'm running into a simple problem I think, but can't find the correct
> documentation.
>
> I want to make a slice plot of dark matter density with velocity vectors
> overlaid, using Gadget HDF5 data. I have uploaded my script here :
>
> http://paste.yt-project.org/show/5347/
>

Hi Long,

This is a bit confusing in our API, and we should probably make an effort
to improve our naming here, but the velocity callback ('annotate_velocity')
is really the *gas* velocity callback.  It's not working in your case
because you do not have any gas in your simulation.

Instead, you should call the quiver callback ('annotate_quiver'), and
specify the deposited dark matter velocity fields as your field_x and
field_y:

http://yt-project.org/docs/dev/reference/api/generated/yt.visualization.plot_modifications.QuiverCallback.html?highlight=quivercallback

Hope that helps, please let us know if you have any additional questions.

-Nathan


>
> The slice plot works fine. However, I got an error message for the
> velocity overlay:
>
> http://paste.yt-project.org/show/5349/
>
> The bottom line is the following :
>
> YTFieldNotFound: Could not find field '('all', 'velocity_x')' in snapshot_000.
>
>
> The error is pretty obvious, I think YT is looking for the default field,
> whereas it should look for a deposit of the dark matter data. Somehow I
> should specify that yt should look for this deposit, but I don't know how ?
>
> Thank you by advance for your help,
>
> Long
>
> --------------------------------------------------------------
> Long DO CAO (Office F617)
> Office phone: +81 6-6850-5482
> Osaka University, Graduate School of Science
> Department of Earth and Space Science
> 1-1 Machikaneyama-cho
> Toyonaka, Osaka, 560-0043, Japan
> ---------------------------------------------------------------
>
>
> _______________________________________________
> 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/20150116/f764c3ed/attachment.htm>


More information about the yt-users mailing list