[yt-users] velocity vectors on a projection

Matthew Turk matthewturk at gmail.com
Tue Feb 4 08:52:23 PST 2014


On Tue, Feb 4, 2014 at 11:50 AM, Nathan Goldbaum <nathan12343 at gmail.com> wrote:
> 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
>

The velocity callback -- I believe -- will autodetect if you're on a
slice or cutting plane and use the correct setup.

> 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> 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 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>
>>> 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
>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>
>>>
>>>
>>> _______________________________________________
>>> yt-users mailing list
>>> 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
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list