<div dir="ltr"><div><br></div>Thank you for your help John.<div><br></div><div>Alex</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Sep 21, 2013 at 12:21 PM, John ZuHone <span dir="ltr"><<a href="mailto:jzuhone@gmail.com" target="_blank">jzuhone@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Alex,<br>
<br>
Something like the following field definitions at the top of this notebook are probably what you're looking for:<br>
<br>
Raw notebook: <a href="https://hub.yt-project.org/go/vjn5x2" target="_blank">https://hub.yt-project.org/go/vjn5x2</a><br>
<br>
View as HTML: <a href="https://hub.yt-project.org/nb/vjn5x2" target="_blank">https://hub.yt-project.org/nb/vjn5x2</a><br>
<br>
(you'll get a certificate warning but you can ignore it--it's the yt website and it's safe)<br>
<br>
These field definitions use CICDeposit_3 to cloud-in-cell deposit particle quantities onto grid cells. This is how the "particle_density" field is generated. As you can see, what I actually deposit into the grid cells is the particle momentum and then divide that by the gridded particle mass. I also have to call numpy.nan_to_num to take care of the places where there are no particles and we have 0/0.<br>

<br>
I illustrated what this looks like on a FLASH dataset of two galaxy clusters colliding. The problem here is that in yt we only map particles to grids that are owned by that specific grid, so contributions from particles on neighboring grids are left out. What you'll end up with is gaps at grid boundaries which are sometimes noticeable where portions of the particle mass have simply been clipped out. They'll probably only really be noticeable in slices, but that might be annoying enough.<br>

<br>
This is an oversight, but one that would not be trivial to correct. If you're interested in taking a whack at that problem, I can help you have a look at it.<br>
<br>
Best,<br>
<br>
John Z<br>
<div><div class="h5"><br>
On Sep 18, 2013, at 7:22 PM, Alex Bogert <<a href="mailto:bogart.alex@gmail.com">bogart.alex@gmail.com</a>> wrote:<br>
<br>
> Hi all,<br>
><br>
> I was wondering if yt has the ability to map particle velocities to an evenly divided field or grid. I was unable to resolve this using resources on the website. Does anyone have any suggestions on how to accomplish this using yt?<br>

><br>
> Thanks,<br>
> Alex<br>
</div></div>> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br></div>