<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Matt:</div><div class=""><br class=""></div><a href="http://nbviewer.ipython.org/gist/jzuhone/469dad66c640c2fe25e2" class="">http://nbviewer.ipython.org/gist/jzuhone/469dad66c640c2fe25e2</a><div class=""><br class=""><div style=""><blockquote type="cite" class=""><div class="">On Oct 27, 2015, at 11:05 AM, Matthew Turk <<a href="mailto:matthewturk@gmail.com" class="">matthewturk@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi Britton,<br class=""><br class="">Yes -- in fact, I am going to try adding it to your PR.  Is there a<br class="">notebook or script that demonstrates how to make the setup fail as-is?<br class=""><br class="">On Tue, Oct 27, 2015 at 10:04 AM, Britton Smith <<a href="mailto:brittonsmith@gmail.com" class="">brittonsmith@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class="">Hi Matt,<br class=""><br class="">If we could do that, it would be the cleanest and most effective solution.<br class="">When you have time, can you lay out how this can be done?<br class=""><br class="">Thanks,<br class="">Britton<br class=""><br class="">On Tue, Oct 27, 2015 at 2:56 PM, Matthew Turk <<a href="mailto:matthewturk@gmail.com" class="">matthewturk@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class=""><br class="">Hi Britton,<br class=""><br class="">I've thought about this a bit, and I think this can be addressed.  In<br class="">the ytdata frontend, we should be able to make it recognize the index<br class="">fields; if we can't, we are overdue for having coordinate handlers<br class="">check things out.  There should be logic that prevents derived fields<br class="">overriding on-disk fields, so if there is an on-disk field that<br class="">presents "index" it should work.<br class=""><br class="">On Tue, Oct 27, 2015 at 9:35 AM, Britton Smith <<a href="mailto:brittonsmith@gmail.com" class="">brittonsmith@gmail.com</a>><br class="">wrote:<br class=""><blockquote type="cite" class="">Hi all,<br class=""><br class="">I have spent a while looking at the issue involving the derived<br class="">quantities<br class="">and I have come up with a solution for some of them, but not all of<br class="">them.  I<br class="">have pushed a couple changes to the PR that add a cell_volume and<br class="">cell_mass<br class="">field specific to YTDataContainerDatasets that makes use of their "dx",<br class="">"dy", and "dz" fields.  As of now, the following derived quantities<br class="">work:<br class="">- min location<br class="">- max location<br class="">- extrema<br class="">- bulk velocity<br class="">- total mass<br class="">- weighted average quantity<br class="">- weighted variance<br class="">- total quantity<br class=""><br class="">The ones that don't work are:<br class="">- spin parameter<br class="">- center of mass<br class="">- angular momentum vector<br class=""><br class="">The final three all don't work for the same reason, which is that they<br class="">require access to the "index" position fields.  Unfortunately, these<br class="">cannot<br class="">be overridden for reasons that have to do with the _determine_fields<br class="">function.  I have made a point during this development process to alter<br class="">as<br class="">little as possible outside of the ytdata frontend.  However, at this<br class="">point,<br class="">there is no more room to maneuver.  The only solutions I can come up<br class="">with<br class="">are ugly and would make it very difficult to smoothly swap in a proper<br class="">AMR<br class="">hierarchy when we get around to creating one and doing this properly.<br class=""><br class="">The last thing I can think of would be to swap in special derived<br class="">quantity<br class="">functions for this frontend only that use position fields appropriate<br class="">for<br class="">the frontend.  The functions themselves would be simple to implement,<br class="">but<br class="">because the derived quantity collection is added onto data container<br class="">objects<br class="">and not dataset objects, I have no idea how one would do the swap.  For<br class="">a<br class="">similar reason, I don't know how to simply not allow these problem cases<br class="">to<br class="">be called, or to fail in a clean way for them.<br class=""><br class="">If anyone has any ideas, I would love to hear them.<br class=""><br class="">Britton<br class=""><br class="">On Mon, Oct 26, 2015 at 10:12 PM, John ZuHone <<a href="mailto:jzuhone@gmail.com" class="">jzuhone@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class=""><br class="">No worries—the main issues now are the tests (which don’t run under<br class="">Python<br class="">2) and Python 3.<br class=""><br class="">Tomorrow I’ll point you at the head that I’ve been making changes on to<br class="">address these.<br class=""><br class="">On Oct 26, 2015, at 6:09 PM, Britton Smith <<a href="mailto:brittonsmith@gmail.com" class="">brittonsmith@gmail.com</a>><br class="">wrote:<br class=""><br class="">Hi John,<br class=""><br class="">At the PR hangout, we discussed the possibility of eventually creating<br class="">a<br class="">method to extract subsets of AMR hierarchies that would include only<br class="">grid<br class="">patches that are at least partially contained within the data<br class="">container.<br class="">With them, we would also include the mask arrays to be applied to each<br class="">grid<br class="">patch such that you would only get the cells within the container.<br class="">However,<br class="">this was deemed something that should not hold up this PR, but that<br class="">could<br class="">eventually subbed in to fill in any gaps in functionality created by<br class="">treating the grid data like particles.  We decided that patching the<br class="">existing machinery with a frontend-specific cell_volume field was the<br class="">best<br class="">thing as it would get this on front of users faster, especially since<br class="">it<br class="">contains a lot of other things that are fully working.  I may have<br class="">missed<br class="">some important parts of the discussion, but my memory faded a lot<br class="">faster<br class="">than I thought it would.<br class=""><br class="">I probably won't have much time to work on this until Friday, but I'll<br class="">try<br class="">to play around with the derived quantities when I can.<br class=""><br class="">Britton<br class=""><br class="">On Mon, Oct 26, 2015 at 9:45 PM, John ZuHone <<a href="mailto:jzuhone@gmail.com" class="">jzuhone@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class=""><br class="">Hi all,<br class=""><br class="">Matt asked someone to send a quick note about the current issues<br class="">regarding the ytdata frontend PR:<br class=""><br class=""><br class=""><br class=""><a href="https://bitbucket.org/yt_analysis/yt/pull-requests/1788/adding-ytdata-frontend" class="">https://bitbucket.org/yt_analysis/yt/pull-requests/1788/adding-ytdata-frontend</a><br class=""><br class="">I’m sending it because I’m working on it currently, but I was not able<br class="">to<br class="">attend today’s PR hangout so anyone else who was more to add or to<br class="">correct<br class="">should chime in.<br class=""><br class="">Currently, there are 3 issues, from most important to least important:<br class=""><br class="">1. Tests don’t work<br class="">2. Doesn’t support Python 3<br class="">3. Derived quantities don’t work<br class=""><br class="">I’m currently working on 1 and 2, and there have been some ideas about<br class="">3.<br class="">The main issue with the latter is that for non-gridded data containers<br class="">(like<br class="">sphere, disk, etc.) created from grid datasets, we treat the new<br class="">datasets as<br class="">“particle data”. For that reason there is an issue with calculating<br class="">the<br class="">cell_volume properly. Without that, we cannot use the total_mass()<br class="">quantity.<br class="">Given that we have the cell deltas in the dataset, we could have a<br class="">special<br class="">derived field for the cell_volume.<br class=""><br class="">There are other issues with some of the other derived quantities<br class="">(e.g.,<br class="">weighted_average_quantity returning the wrong units), but I haven’t<br class="">been<br class="">able to diagnose them yet.<br class=""><br class="">I’m working on some changes that will need to be merged into Britton’s<br class="">fork eventually to address at least 1 and 2.<br class=""><br class="">Best,<br class=""><br class="">John<br class=""><br class="">_______________________________________________<br class="">yt-dev mailing list<br class="">yt-dev@lists.spacepope.org<br class="">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org<br class=""><br class=""></blockquote><br class="">_______________________________________________<br class="">yt-dev mailing list<br class=""><a href="mailto:yt-dev@lists.spacepope.org" class="">yt-dev@lists.spacepope.org</a><br class="">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org<br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">yt-dev mailing list<br class="">yt-dev@lists.spacepope.org<br class="">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org<br class=""><br class=""></blockquote><br class=""><br class="">_______________________________________________<br class="">yt-dev mailing list<br class=""><a href="mailto:yt-dev@lists.spacepope.org" class="">yt-dev@lists.spacepope.org</a><br class="">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org<br class=""><br class=""></blockquote>_______________________________________________<br class="">yt-dev mailing list<br class=""><a href="mailto:yt-dev@lists.spacepope.org" class="">yt-dev@lists.spacepope.org</a><br class="">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org<br class=""></blockquote><br class=""><br class=""><br class="">_______________________________________________<br class="">yt-dev mailing list<br class=""><a href="mailto:yt-dev@lists.spacepope.org" class="">yt-dev@lists.spacepope.org</a><br class="">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org<br class=""><br class=""></blockquote>_______________________________________________<br class="">yt-dev mailing list<br class=""><a href="mailto:yt-dev@lists.spacepope.org" class="">yt-dev@lists.spacepope.org</a><br class="">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org<br class=""></div></div></blockquote></div><br class=""></div></body></html>