[yt-users] velocity vectors on a projection

Nathan Goldbaum nathan12343 at gmail.com
Tue Feb 4 08:50:46 PST 2014


There is actually a callback specifically for quiver arrows on off-axis
data objects.  I think it will only work for off-axis slices though.

See:

https://bitbucket.org/yt_analysis/yt/src/ae241d57d2f49527998ce5fc56271345fef038a8/yt/visualization/plot_modifications.py?at=yt#cl-630

Nathan

On Tuesday, February 4, 2014, Mike Butler <mbutler.astro at gmail.com> wrote:

> Hi Andrew,
>
> Thanks a lot - I got it working now.
>
> -Mike
>
>
> On Tue, Feb 4, 2014 at 12:40 PM, Andrew Myers <atmyers2 at gmail.com<javascript:_e(%7B%7D,'cvml','atmyers2 at gmail.com');>
> > wrote:
>
>> Hi Mike,
>>
>> I think that annotate_velocity should work for axis-aligned slices and
>> projections. If you're doing off-axis, then the velocity and magnetic field
>> callbacks don't work out of the box (last time I checked anyway), but it's
>> still possible to use yt to compute the velocity vectors and manually add
>> them to your projection via matplotlib's quiver command. Here<http://paste.yt-project.org/show/4272/>is a script I wrote that does this for the magnetic field. In the image it
>> produces, the colorscale shows the density-weighted temperature projection
>> and the arrows show the density-weighted mean magnetic field vectors.
>>
>> Hope this helps,
>> Andrew
>>
>>
>> On Tue, Feb 4, 2014 at 12:42 AM, Mike Butler <mbutler.astro at gmail.com<javascript:_e(%7B%7D,'cvml','mbutler.astro at gmail.com');>
>> > wrote:
>>
>>> Hello,
>>>
>>> I was wondering if there is any way in yt to display the weighted
>>> average velocity vectors onto a mass-weighted density projection of a small
>>> region from one of my Enzo simulations.  As far as I can tell,
>>> annotate_velocity only works on slices.  Is there some other way to do it?
>>>
>>> Thanks,
>>>
>>> Mike
>>>
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org<javascript:_e(%7B%7D,'cvml','yt-users at lists.spacepope.org');>
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>
>>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org<javascript:_e(%7B%7D,'cvml','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/20140204/9eaa5c3f/attachment.htm>


More information about the yt-users mailing list