Hey Matt.<div><br></div><div>Don't worry about removing it on account of my tastes, especially when you've already written it!</div><div><br></div><div>- Casey </div><div><br><br><div class="gmail_quote">On Wed, Aug 29, 2012 at 8:27 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 Casey,<br>
<br>
I've updated the PR:<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>
I think for now I'm going to leave the ABC in as a bookkeeping<br>
exercise while implementing the other handlers, and remove it later.<br>
<br>
-Matt<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, Aug 29, 2012 at 11:18 AM, Casey W. Stark <<a href="mailto:caseywstark@gmail.com">caseywstark@gmail.com</a>> wrote:<br>
> Hey Matt.<br>
><br>
> Sounds good. I would guess the dimensionality issue comes down to<br>
> implementation, but I think subclasses are fine.<br>
><br>
> I am -1 on using abstract classes in general. Completely a style thing, but<br>
> I think it ends up making things harder.<br>
><br>
> - Casey<br>
><br>
><br>
> On Wed, Aug 29, 2012 at 7:52 AM, Matthew Turk <<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>> wrote:<br>
>><br>
>> On Wed, Aug 29, 2012 at 10:43 AM, Casey W. Stark <<a href="mailto:caseywstark@gmail.com">caseywstark@gmail.com</a>><br>
>> wrote:<br>
>> > Hey Matt.<br>
>> ><br>
>> > I think this would be a big improvement, but I was wondering how it<br>
>> > interacts with other yt pieces. Does each output have geometry and<br>
>> > coordinate_handler objects as attributes?<br>
>><br>
>> Yup, that is the plan. The idea is that we move all of the IO and<br>
>> particle/fluid selection into the geometry handler, and the handling<br>
>> of spatial layout to the coordinate handler. This would mean, for<br>
>> instance, that we could push periodicity as well as path length into<br>
>> the coordinate handler; this would remove some of the need to<br>
>> constantly do wraparound checks and the like.<br>
>><br>
>> There is still somewhat the issue that *selection* of points to<br>
>> understand coordinate systems, which will require a bit more thought<br>
>> in the future but I think is still a tractable problem.<br>
>><br>
>> ><br>
>> > Is it possible to replace axis_name, axis_id, x_axis, and y_axis with<br>
>> > only<br>
>> > axis_names = ['x', ...]?<br>
>><br>
>> It is, but not with abc.abstractproperty. (Initially I figured the<br>
>> cost of creating the dicts was low enough that we could do this to<br>
>> avoid worrying about mutable, class-level properties, but I think<br>
>> perhaps I like yours better.) I'll remove some of the fancier<br>
>> ABC-stuff and slim it down.<br>
>><br>
>> ><br>
>> > - Casey<br>
>> ><br>
>> ><br>
>> > On Wed, Aug 29, 2012 at 7:28 AM, Matthew Turk <<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> 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>
>> >><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<br>
>> >> subclass?<br>
>> >> 3) Should any of these be removed?<br>
>> >><br>
>> >> This will also help address these issues:<br>
>> >><br>
>> >><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>
>> >><br>
>> >><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>
>> >><br>
>> >><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>
>> ><br>
>> ><br>
>> ><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>
>> _______________________________________________<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>
><br>
><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>
_______________________________________________<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>
</div></div></blockquote></div><br></div>