<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 1, 2016 at 11:11 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Yi-Hao,<br>
<br>
The actual usage of _MPL.c shouldn't be user-facing.  So I think as<br>
long as the things that are public APIs (such as the data returned<br>
from a FixedResolutionBuffer object) remain the same, I am a strong +1<br>
on this.<br></blockquote><div><br></div><div>The trouble is, if we want to make the user interface match what people expect, i.e. buff_size is (nx, ny), where nx it the number of pixels along x and ny is the number of pixels along y, we'll need to change the behavior here.</div><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">
<br>
-Matt<br>
<div><div class="h5"><br>
On Fri, Apr 1, 2016 at 10:19 AM, Yi-Hao Chen <<a href="mailto:ychen@astro.wisc.edu">ychen@astro.wisc.edu</a>> wrote:<br>
> Hi all,<br>
><br>
> Running this test script<br>
> <a href="http://paste.yt-project.org/show/6379/" rel="noreferrer" target="_blank">http://paste.yt-project.org/show/6379/</a><br>
> will result in this image<br>
> <a href="https://slack-files.com/T042F73QM-F0X0YJE3V-4a579d9431" rel="noreferrer" target="_blank">https://slack-files.com/T042F73QM-F0X0YJE3V-4a579d9431</a><br>
><br>
> Apparently, the sequence of buff_size is switched so that<br>
><br>
> set_buff_size((8,4))<br>
><br>
> gives a 4 by 8 image.<br>
><br>
> I have traced down the codes and found the following lines are the cause of<br>
> the problem.<br>
> <a href="https://bitbucket.org/yt_analysis/yt/src/d18f33211199f71e2fac4d927307b015d513a328/yt/utilities/lib/pixelization_routines.pyx?at=yt&fileviewer=file-view-default#pixelization_routines.pyx-61" rel="noreferrer" target="_blank">https://bitbucket.org/yt_analysis/yt/src/d18f33211199f71e2fac4d927307b015d513a328/yt/utilities/lib/pixelization_routines.pyx?at=yt&fileviewer=file-view-default#pixelization_routines.pyx-61</a><br>
><br>
> <a href="https://bitbucket.org/yt_analysis/yt/src/d18f33211199f71e2fac4d927307b015d513a328/yt/utilities/lib/pixelization_routines.pyx?at=yt&fileviewer=file-view-default#pixelization_routines.pyx-216" rel="noreferrer" target="_blank">https://bitbucket.org/yt_analysis/yt/src/d18f33211199f71e2fac4d927307b015d513a328/yt/utilities/lib/pixelization_routines.pyx?at=yt&fileviewer=file-view-default#pixelization_routines.pyx-216</a><br>
><br>
> If rows=nx and cols=ny, the two functions (pixelize_cartesian and<br>
> pixelize_off_axis_cartesian) should take rows first and then cols.<br>
><br>
> The same API has been around in _MPL.c since 2010 and thus changing it will<br>
> be backward incompatible.<br>
><br>
> However, to be consistent with other parts of the code (e.g. here, here,<br>
> here, and here), in which buff_size = (nx, ny) is assumed and used, I<br>
> propose to change the behavior of the above two functions.<br></div></div></blockquote><div><br></div><div>I'm +0.5 on this, but am nervous that it will change the results of user scripts. I'd like the API to match naive expectations though...</div><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 class="h5">
><br>
> What do you think? Anyone has other suggestions?<br></div></div></blockquote><div><br></div><div>The other alternative is to document the current (annoyingly backwards) behavior.</div><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 class="h5">
><br>
> Thanks!<br>
> Yi-Hao<br></div></div></blockquote><div><br></div><div>Thank you for your detective work on this, Yi-Hao!<br></div><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 class="h5">
><br>
</div></div>> _______________________________________________<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" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
</blockquote></div><br></div></div>