<div dir="ltr">Hi Max,<div><br></div><div>This actually related to a new feature Bili Dong recently added:</div><div><br></div><div><a href="https://bitbucket.org/yt_analysis/yt/pull-requests/1769/add-add_smoothed_particle_field/diff">https://bitbucket.org/yt_analysis/yt/pull-requests/1769/add-add_smoothed_particle_field/diff</a><br></div><div><br></div><div>This PR adds new functionality to make it easier to define SPH smoothed fields. Maybe that will help?</div><div><br></div><div>-Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 6, 2015 at 1:48 AM, Max Grönke <span dir="ltr"><<a href="mailto:max.gronke@astro.uio.no" target="_blank">max.gronke@astro.uio.no</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Nathan.<br>
Thanks for your reply. Here's the new link:<br>
<a href="http://paste.yt-project.org/show/5930/" rel="noreferrer" target="_blank">http://paste.yt-project.org/show/5930/</a><br>
<br>
I think I figured out the problem -- at least in theory ;)  I guess<br>
what I need is a "smoothed field". This meant I played around with<br>
"add_volume_weighted_smoothed_field". But although<br>
<br>
> fn_smooth = add_volume_weighted_smoothed_field("all","particle_position", "particle_mass", "smoothing_length",<br>
>                                               "particle_density", "particle_density", ds.field_info, 64)<br>
<br>
(where `ds' is my YT Particle Data Set)<br>
<br>
seems to work, I cannot access the newly created field?<br>
("YTFieldNotFound: Could not find field '('deposit',<br>
'all_smoothed_particle_density')' in ParticleData.")<br>
<br>
Thanks for your help,<br>
Max<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On 5 October 2015 at 17:41, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>> wrote:<br>
> Hi Max,<br>
><br>
> I'm unable to load the pastebin link in your e-mail.  Can you re-send using<br>
> a different pastebin service? We have <a href="http://paste.yt-project.org" rel="noreferrer" target="_blank">paste.yt-project.org</a> set up for this<br>
> purpose.<br>
><br>
> Matt also has an open pull request that among other things adds support to<br>
> arbitrary_grid for fluid fields:<br>
><br>
> <a href="https://bitbucket.org/yt_analysis/yt/pull-requests/1763/numpy-like-operations/diff" rel="noreferrer" target="_blank">https://bitbucket.org/yt_analysis/yt/pull-requests/1763/numpy-like-operations/diff</a><br>
><br>
> -Nathan<br>
><br>
> On Fri, Oct 2, 2015 at 10:23 AM, Max Grönke <<a href="mailto:max.gronke@astro.uio.no">max.gronke@astro.uio.no</a>> wrote:<br>
>><br>
>> Hi Matthew,<br>
>><br>
>> thanks for your prompt response!<br>
>><br>
>> I tried the covering_grid first but as I said we had problems with a<br>
>> lot of zero-valued grid points. It seems the values from the coarser<br>
>> grid are not duplicated downwards?<br>
>> I tried to post a MWE to illustrate what I mean:<br>
>> <a href="http://pastebin.com/yishxbjW" rel="noreferrer" target="_blank">http://pastebin.com/yishxbjW</a><br>
>><br>
>> For the arbitrary_grid: It says it cannot deal with fluid variables?<br>
>><br>
>> Best,<br>
>> Max<br>
>><br>
>> On 2 October 2015 at 16:44, Matthew Turk <<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>> wrote:<br>
>> > Hi Max,<br>
>> ><br>
>> > Ah, I think I see the problem.  If you're doing any type of particle<br>
>> > deposition, including smoothing, you might be better suited to using<br>
>> > the arbitrary_grid or the covering_grid objects, as<br>
>> > smoothed_covering_grid is designed for situations where values need to<br>
>> > be interpolated through a cascade of refinements.  It'd probably end<br>
>> > up being faster to use either arbitrary_grid or covering_grid, too.<br>
>> > Can you try that and let us know if it meets your needs?<br>
>> ><br>
>> > -Matt<br>
>> ><br>
>> > On Fri, Oct 2, 2015 at 9:42 AM, Max Grönke <<a href="mailto:max.gronke@astro.uio.no">max.gronke@astro.uio.no</a>><br>
>> > wrote:<br>
>> >> Hi everybody!<br>
>> >><br>
>> >> I followed loosely the example provided here<br>
>> >><br>
>> >> <a href="http://yt-project.org/docs/dev/examining/low_level_inspection.html#examining-grid-data-in-a-fixed-resolution-array" rel="noreferrer" target="_blank">http://yt-project.org/docs/dev/examining/low_level_inspection.html#examining-grid-data-in-a-fixed-resolution-array</a><br>
>> >> but encountered an error message using a smoothed covering grid with<br>
>> >> SPH data instead of a covering grid. I posted an MWE here:<br>
>> >> <a href="http://pastebin.com/2sStpLmw" rel="noreferrer" target="_blank">http://pastebin.com/2sStpLmw</a> which leads to the error message<br>
>> >> "AttributeError: 'YTSmoothedCoveringGrid' object has no attribute<br>
>> >> '_pdata_source' "<br>
>> >><br>
>> >> I wanted to use a smoothed covering grid because I found that using<br>
>> >> SPH data a lot of "holes" are in `covering grid' (but not, e.g., in a<br>
>> >> slice plot). So I assumed there is some problem in duplicating the<br>
>> >> values from the coarser grids?<br>
>> >><br>
>> >> My yt version is 3.2-dev.<br>
>> >><br>
>> >> Thanks a lot for your time & help,<br>
>> >> Max<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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
><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" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</div></div></blockquote></div><br></div>