<meta http-equiv="Content-Type" content="text/html; charset=utf-8">Hi all, I agree with Britton here that it would be good to table this until folks have time to read through this carefully. Thanks, Sam<br><br><div class="gmail_quote">On Tue Dec 23 2014 at 2:40:41 PM Britton Smith <<a href="mailto:brittonsmith@gmail.com">brittonsmith@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I choose option #1.<div><br></div><div>Also, let's not be too quick to make big decisions here.  Many people are on break right now and so are unavailable, or are wanting to be.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 23, 2014 at 3:42 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"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Dec 23, 2014 at 1:33 PM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@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 Cameron,<div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Dec 23, 2014 at 11:56 AM, Cameron Hummels <span dir="ltr"><<a href="mailto:chummels@gmail.com" target="_blank">chummels@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 Nathan,<div><br></div><div>Thanks for your hard work on this PR (along with Ben Thompson).  The naming convention that I suggested in the issue a few weeks back (<a href="https://bitbucket.org/yt_analysis/yt/issue/947/consistent-field-naming-for-spherical-and" style="font-size:13px" target="_blank">https://bitbucket.org/yt_analysis/yt/issue/947/consistent-field-naming-for-spherical-and</a>) and in the discussion on your PR also matches with past convention.  It is slightly different than what you propose, but seems (to me at least) to be more easy to read because the adjective comes before the noun (e.g. spherical position) instead of the reverse (e.g. position spherical).</div><div><br></div></div></blockquote><div><br></div></span><div>I'm neutral to both of these, in that I am broadly neutral about the increasingly nested set of modifiers.  If forced, I think I'd go with your proposed convention.</div></div></div></div></blockquote><div><br></div></span><div>That's two votes against my convention (Cameron and Matt).  If no one else pipes up in favor of my convention in the next day or so, I'll go ahead and create a YTEP PR and update my PR to match.  This means we need to deprecate fewer fields, so it's probably simpler in the end...</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>What would be a lot nicer, in my opinion, would be if we had a way to do this more generically.  Like,</div><div><br></div><div>with data_object.rotate( ... ):</div><div>    prof1d = create_profile(data_object, "particle_position_x", "particle_mass")</div></div></div></div></blockquote><div><br></div></span><div>This is a much nicer syntax.  We should consider this for a future release.  If someone puts together a prototype for using data objects with context managers like this, I think we can have a big usability win for a lot of use cases.</div><div><br></div><div>Unfortunately we would probably still need to accept the names with modifiers for backward compatibility.</div><div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>and then just get rid of all the nested modified field names.  But I don't really think this is feasible.</div><div><br></div><div>-Matt</div><div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div>Where proposed naming convention #1 is:</div><div><br></div><div><span style="font-size:13px">(field_type, "<particle?>_<position/velocity>_<coordinate_system</span><span style="font-size:13px">>_<coordinate>") e.g. ('all', 'particle_position_spherical_phi')</span><br></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">Proposed naming convention #2 is:</span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">(field_type, "<particle?>_<coordinate_system</span><span style="font-size:13px">>_<position/velocity>_<coordinate>") </span><span style="font-size:13px">e.g. ('all', 'particle_spherical_position_phi')</span><span style="font-size:13px"><br></span></div><div><br></div><div>Here are all of the relevant gas and particle fields each convention:</div><div><br></div><div><b>Cartesian</b> (convention #1 & #2 are the same)</div><span><div><br></div><div>('index', 'x')</div></span><div>('index', 'y')</div><div>('index', 'z')</div><span><div>('gas', 'velocity_x')</div></span><div>('gas', 'velocity_y')</div><div>('gas', 'velocity_z')</div><div><br></div><div>('all', 'particle_position_x')</div><div><div>('all', 'particle_position_y')</div></div><div><div>('all', 'particle_position_z')</div></div><div><div>('all', 'particle_velocity_x')</div></div><div><div>('all', 'particle_velocity_y')</div></div><div><div>('all', 'particle_velocity_z')</div></div><div><br></div><div>Convention #1 & #2 differ for the fields of cartesian position relative to the 'center' and 'normal' field parameters for the origin and z-vector:</div><div><br></div><div>#1 vs #2</div><div>('all', 'particle_position_relative_x')  vs. ('all', 'particle_relative_position_x')</div><div><div>('all', 'particle_position_relative_y')  vs. ('all', 'particle_relative_position_y')</div></div><div><div>('all', 'particle_position_relative_z')  vs. ('all', 'particle_relative_position_z')</div></div><div><div>('all', 'particle_velocity_relative_x')  vs. ('all', 'particle_velocity_position_x')</div><div>('all', 'particle_velocity_relative_y')  vs. ('all', 'particle_velocity_position_y')</div><div>('all', 'particle_velocity_relative_z')  vs. ('all', 'particle_velocity_position_z')</div><div><br></div><div><b>Spherical</b>:</div><div>#1 vs #2</div><div><br></div><div>('index', 'spherical_phi')</div><span><div>('index', 'spherical_radius')</div></span><span><div>('index', 'spherical_theta')</div></span><div>('gas', 'velocity_spherical_phi') vs      ('gas', 'spherical_velocity_phi')</div><div>('gas', 'velocity_spherical_theta') vs   ('gas', 'spherical_velocity_theta')</div><div>('gas', 'velocity_spherical_radius') vs ('gas', 'spherical_velocity_radius')</div><div><br></div><div>('all', 'particle_position_spherical_phi') vs      ('all', 'particle_spherical_position_phi')</div><div><div><div>('all', 'particle_position_spherical_theta') vs   ('all', 'particle_spherical_position_theta')</div></div></div></div><div><div>('all', 'particle_position_spherical_radius') vs ('all', 'particle_spherical_position_radius')</div><div><div><div>('all', 'particle_velocity_spherical_phi') vs       ('all', 'particle_spherical_velocity_phi')</div><div>('all', 'particle_velocity_spherical_theta') vs    ('all', 'particle_spherical_velocity_theta')</div></div><div><div>('all', 'particle_velocity_spherical_radius') vs  ('all', 'particle_spherical_velocity_radius')</div><div><br></div><div><b>Cylindrical</b>:</div><div>#1 vs #2</div><div><br></div><div><div>('index', 'cylindrical_phi') </div><div>('index', 'cylindrical_radius')</div><div>('index', 'cylindrical_theta')</div><div>('gas', 'velocity_cylindrical_phi') vs      ('gas', 'cylindrical_velocity_phi')</div><div>('gas', 'velocity_cylindrical_theta') vs   ('gas', 'cylindrical_velocity_theta')</div><div>('gas', 'velocity_cylindrical_radius') vs ('gas', 'cylindrical_velocity_radius')</div></div><div><br></div><div><div><div>('all', 'particle_position_cylindrical_phi') vs      ('all', 'particle_cylindrical_position_phi')</div><div>('all', 'particle_position_cylindrical_theta') vs   ('all', 'particle_cylindrical_position_theta')</div></div><div><div>('all', 'particle_position_cylindrical_radius') vs ('all', 'particle_cylindrical_position_radius')</div><div><div><div>('all', 'particle_velocity_cylindrical_phi') vs       ('all', 'particle_cylindrical_velocity_phi')</div><div>('all', 'particle_velocity_cylindrical_theta') vs    ('all', 'particle_cylindrical_velocity_theta')</div></div><div>('all', 'particle_velocity_cylindrical_radius') vs  ('all', 'particle_cylindrical_velocity_radius')</div></div></div></div><div><br></div><div><br></div><div><div>So what does the community think would be the best system here?  #1 or #2?  Either way it goes, I think this is a big improvement over the previous naming convention that had general inconsistencies.</div><div><br></div></div></div></div></div><div>Cameron</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Dec 23, 2014 at 11:01 AM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><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><font color="#888888"><div><br></div><div>-Nathan</div><div><br></div><div><br></div></font></span></div>
<br></div></div><span>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">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></span></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Cameron Hummels<div>Postdoctoral Researcher</div><div>Steward Observatory</div><div>University of Arizona</div><div><a href="http://chummels.org" target="_blank">http://chummels.org</a></div></div>
</font></span></div></div>
<br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">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></div></div><br></div></div>
<br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">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></div></div><br></div></div>
<br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">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></div>
______________________________<u></u>_________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">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/<u></u>listinfo.cgi/yt-dev-spacepope.<u></u>org</a><br>
</blockquote></div>