<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr">Matt had a proposal to support general grids, and somewhere inbetween that and what yt does now are logical Cartesian curvilinear / quadralaterial grids (some people use eta and xi for the coordinate names in 2-d for these).  Should those types of grids be address in the field naming proposal or Matt's unstructured proposal (technically, these are structured, but ...)</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 23, 2014 at 2:01 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I've just issued a pull request that bears some developer discussion.</div><div><br></div><div>Right now yt is a bit of a wild west in terms of the field naming convention for fields that reference a coordinate system.  See for example, see issue 947:</div><div><br></div><div><a href="https://bitbucket.org/yt_analysis/yt/issue/947/consistent-field-naming-for-spherical-and" target="_blank">https://bitbucket.org/yt_analysis/yt/issue/947/consistent-field-naming-for-spherical-and</a></div><div><br></div><div>I'd like to propose a naming convention for fields that reference a coordinate system.  Gas and particle fields should be of the form:</div><div><br></div><div>(field_type, "<particle?>_<vector_field_name>_<coordinate>")</div><div><br></div><div>while index fields for coordinates should be of the form:</div><div><br></div><div>("index", "<coordinate>")</div><div><br></div><div>This fits within our existing field naming convention for cartesian coordinates, e.g.:</div><div><br></div><div>("gas", "velocity_x")</div><div>(ptype, "particle_velocity_y")</div><div><br></div><div>as well as our convention for index coordinate fields, e.g.:</div><div><br></div><div>("index", "x")</div><div>("index", "spherical_theta")</div><div><br></div><div>This means that index fields do not need to explicitly reference themselves as positions.  So we *won't* have field names like:</div><div><br></div><div>("index", "position_x")</div><div><br></div><div>I don't like the above construction because it's a bit redundant ("index" implies that we are talking about a position or something similar).</div><div><br></div><div>Some existing field names will need to be changed to fit this.  In particular, some of the index fields will need to be renamed to be more verbose ("index", "spherical_r") becomes ("index", "spherical_radius") and (ptype, "particle_spherical_position_radius") becomes (ptype, "particle_position_spherical_radius").</div><div><br></div><div>Wherever an existing field name needs to change, I propose we mark the existing field name for deprecation, stub it out, and make it an alias for the field with the new field name.  In a future release, we can then remove the deprecated fields.</div><div><br></div><div>I've implemented this for the particle fields (for the most part) in PR 1378:</div><div><br></div><div><a href="https://bitbucket.org/yt_analysis/yt/pull-request/1378" target="_blank">https://bitbucket.org/yt_analysis/yt/pull-request/1378</a><br></div><div><br></div><div>I'm happy to update the field naming YTEP if this proposed field naming scheme gets approval in this thread.</div><div><br></div><div>What do you all think?  Question, concerns?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Nathan</div><div><br></div><div><br></div></font></span></div>
<br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div>Michael Zingale</div><div>Associate Professor</div><div><br></div><div>Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800</div><div><i>phone</i>:  631-632-8225</div><div><i>e-mail</i>: <a href="mailto:Michael.Zingale@stonybrook.edu" target="_blank">Michael.Zingale@stonybrook.edu</a></div><div><i>web</i>: <a href="http://www.astro.sunysb.edu/mzingale" target="_blank">http://www.astro.sunysb.edu/mzingale</a></div></div>
</div>