Hi Desika,<div><br></div><div>Looking over the code, if you have a *particle* quantity, you should be able to add a *smoothed* quantity using this type of construction:</div><div><br></div><div>from yt.fields.particle_fields import add_volume_weighted_smoothed field</div><div><br></div><div>The API for this function is:</div><div><br></div><div><div>def add_volume_weighted_smoothed_field(ptype, coord_name, mass_name,</div><div>        smoothing_length_name, density_name, smoothed_field, registry,</div><div>        nneighbors = None)</div></div><div><br></div><div>so you should be able to supply particle type, "particle_position", "particle_mass", "smoothing_length", the density name ("density" probably), the name of the field to smooth, and then the ds.field_info.  I believe this should do it, and it may require another step but I don't think so.</div><div><br></div><div>-Matt</div><br><div class="gmail_quote">On Mon Nov 10 2014 at 8:22:08 AM Desika Narayanan <<a href="mailto:dnarayan@haverford.edu" target="_blank">dnarayan@haverford.edu</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div>Hey All,<div><br></div><div>I'm trying to figure out how to add a new smoothed field to a data set.  Specifically, I want to add a (particle) field, and then be able to access the smoothed mesh quantities (the same way I would access the mesh quantities of density as below, for example)</div><div>







<p>ad = ds.all_data()</p>
<p>ad["deposit","PartType0_<u></u>smoothed_desnsity"]</p><p>(in this case PartType0 is gas).   I'm adding a field prior to loading the data set as described here:</p><p><a href="http://yt-project.org/doc/developing/creating_derived_fields.html#defining-a-new-field" target="_blank">http://yt-project.org/doc/<u></u>developing/creating_derived_<u></u>fields.html#defining-a-new-<u></u>field</a><br></p><p>thanks,</p><p>desika</p><p><br></p></div></div>
______________________________<u></u><u></u>_________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">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/<u></u>lis<u></u>tinfo.cgi/yt-users-<u></u>spacepope.<u></u>org</a><br>
</blockquote></div>