<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><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">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">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><div><br></div><div>-Nathan</div><div><br></div><div><br></div></div>