Hey Matt.<div><br></div><div>I think this would be a big improvement, but I was wondering how it interacts with other yt pieces. Does each output have geometry and coordinate_handler objects as attributes?</div><div><br></div>

<div>Is it possible to replace <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">axis_name, </span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">axis_id, </span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">x_axis, and </span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">y_axis with only axis_names = ['x', ...]?</span></div>

<div><font color="#222222" face="arial, sans-serif"><br></font></div><div><font color="#222222" face="arial, sans-serif">- Casey</font></div><div><font color="#222222" face="arial, sans-serif"><br></font><br><div class="gmail_quote">

On Wed, Aug 29, 2012 at 7:28 AM, 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">

Hi all,<br>
<br>
I've issued a pull request to the 3.0 repository, as I think it<br>
warrants discussion.  It's here:<br>
<br>
<a href="https://bitbucket.org/yt_analysis/yt-3.0/pull-request/5/initial-import-of-coordinate-handler-class" target="_blank">https://bitbucket.org/yt_analysis/yt-3.0/pull-request/5/initial-import-of-coordinate-handler-class</a><br>


<br>
This includes a first pass at a coordinate handling system.  This is<br>
distinct from a geometry handling system; the coordinates here refer<br>
to how we handle coordinates and spatial locations internally, whereas<br>
geometry refers to how data is distributed throughout a domain and<br>
throughout places on disk.  For instance, coordinate handling would be<br>
cartesian, polar, spherical.<br>
<br>
The reason I'm bringing it up for discussion is that I believe we want<br>
to move as much coordinate handling and transformation into a<br>
separate, well-defined class as possible.  Periodicity, distances and<br>
so on are all currently scattered throughout the code, and I'd like to<br>
try to consolidate them.  Additionally, as new coordinate systems<br>
(polar, spherical) are added, we'll need clear ways to delegate<br>
responsibility for things like "How do I calculate path length as I<br>
integrate?" or "What's the way to turn this into an image?"  I believe<br>
the best way to do that is to attach a coordinate system to the<br>
dataset object itself.  (We now have a polar pixelizer<br>
<a href="http://i.imgur.com/a4UGg.png" target="_blank">http://i.imgur.com/a4UGg.png</a> !)<br>
<br>
The interface is currently set such that you need to define these<br>
methods and properties in order to implement a coordinate system:<br>
<br>
coordinate_fields (this may go away, but it's for the analogs of 'x',<br>
'y', 'z', as well as volume)<br>
pixelize<br>
convert_from_cartesian<br>
convert_to_cartesian<br>
axis_name<br>
axis_id<br>
x_axis<br>
y_axis<br>
period<br>
<br>
Some of these currently live in dictionaries in<br>
yt/utilities/definitions.py, which is pretty sub-optimal.  I'd like to<br>
ask for feedback:<br>
<br>
1) Do these methods sufficiently cover everything we need to know in<br>
yt about a coordinate system?  Should any be added?<br>
2) Do we need to directly address dimensionality as a separate subclass?<br>
3) Should any of these be removed?<br>
<br>
This will also help address these issues:<br>
<br>
<a href="https://bitbucket.org/yt_analysis/yt/issue/418/use-a-right-handed-coordinate-system" target="_blank">https://bitbucket.org/yt_analysis/yt/issue/418/use-a-right-handed-coordinate-system</a><br>
<a href="https://bitbucket.org/yt_analysis/yt/issue/422/ray-casting-in-cylindrical-coordinates" target="_blank">https://bitbucket.org/yt_analysis/yt/issue/422/ray-casting-in-cylindrical-coordinates</a><br>
<a href="https://bitbucket.org/yt_analysis/yt/issue/421/refactor-non-cartesian-geometry" target="_blank">https://bitbucket.org/yt_analysis/yt/issue/421/refactor-non-cartesian-geometry</a><br>
<a href="https://bitbucket.org/yt_analysis/yt/issue/345/non-cartesian-geometry" target="_blank">https://bitbucket.org/yt_analysis/yt/issue/345/non-cartesian-geometry</a><br>
<a href="https://bitbucket.org/yt_analysis/yt/issue/205/periodicity" target="_blank">https://bitbucket.org/yt_analysis/yt/issue/205/periodicity</a><br>
<br>
-Matt<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>
</blockquote></div><br></div>