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 ...)

On Tue, Dec 23, 2014 at 2:01 PM, Nathan Goldbaum <nathan12343@gmail.com> wrote:
Hi all,

I've just issued a pull request that bears some developer discussion.

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:

https://bitbucket.org/yt_analysis/yt/issue/947/consistent-field-naming-for-spherical-and

I'd like to propose a naming convention for fields that reference a coordinate system.  Gas and particle fields should be of the form:

(field_type, "<particle?>_<vector_field_name>_<coordinate>")

while index fields for coordinates should be of the form:

("index", "<coordinate>")

This fits within our existing field naming convention for cartesian coordinates, e.g.:

("gas", "velocity_x")
(ptype, "particle_velocity_y")

as well as our convention for index coordinate fields, e.g.:

("index", "x")
("index", "spherical_theta")

This means that index fields do not need to explicitly reference themselves as positions.  So we *won't* have field names like:

("index", "position_x")

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).

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").

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.

I've implemented this for the particle fields (for the most part) in PR 1378:

https://bitbucket.org/yt_analysis/yt/pull-request/1378

I'm happy to update the field naming YTEP if this proposed field naming scheme gets approval in this thread.

What do you all think?  Question, concerns?

-Nathan



_______________________________________________
yt-dev mailing list
yt-dev@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org




--
Michael Zingale
Associate Professor

Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800
phone:  631-632-8225
e-mail: Michael.Zingale@stonybrook.edu
web: http://www.astro.sunysb.edu/mzingale