<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 20, 2015 at 10:57 AM, David Collins <span dir="ltr"><<a href="mailto:dcollins4096@gmail.com" target="_blank">dcollins4096@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 and Everybody--<div><br></div><div>I've tried several iterations of quantities with and without units and keep getting errors.  Here are the things I've tried, perhaps there's something dumb I'm doing.  I won't have any free space for deeper debugging for a few weeks, but I can look for a fix then. Low priority, I can simply flag out the zeros for now, but this is where I"m at right now:</div><div><br></div><div>Thanks a ton!</div><div><br></div><div>>>>  proj = ds.proj("density","z")</div><div>>>>  Delta = (0.1,'code_length')</div><div>>>>  dx = (1./512,'code_length')</div><div>>>> frb=proj.to_frb(Delta,dx)</div><div>works great!</div><div>>>> frb=proj.to_frb( [Delta, Delta],[dx,dx])</div><div><div>raceback (most recent call last):</div><div>  File "<stdin>", line 1, in <module></div><div>  File "tmp.py", line 22, in <module></div><div>    frb=proj.to_frb( [Delta, Delta],[dx,dx])</div><div>  File "/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/data_objects/data_containers.py", line 909, in to_frb</div><div>    width = self.ds.quan(w, input_units = u)</div><div>  File "/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/units/yt_array.py", line 1153, in __new__</div><div>    raise RuntimeError("YTQuantity values must be numeric")</div><div>RuntimeError: YTQuantity values must be numeric</div></div><div><br></div><div><br></div><div>Also I tried using a ds.arr:</div><div>>>> Delta = ds.arr([0.1,0.1],'code_length')<br></div><div>>>> dx = ds.arr([1./512, 1./512], 'code_length')</div><div>>>> frb=proj.to_frb( Delta, dx)</div><div><div>Traceback (most recent call last):</div><div>  File "<stdin>", line 1, in <module></div><div>  File "tmp.py", line 26, in <module></div><div>    frb=proj.to_frb( Delta, dx)</div><div>  File "/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/data_objects/data_containers.py", line 909, in to_frb</div><div>    width = self.ds.quan(w, input_units = u)</div><div>  File "/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/units/yt_array.py", line 1155, in __new__</div><div>    dtype=dtype)</div><div>  File "/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/units/yt_array.py", line 308, in __new__</div><div>    input_array.units = Unit(input_units, registry=registry)</div><div>  File "/home/dcollins4096/local-yt-2014-08-27/src/yt-hg/yt/units/unit_object.py", line 169, in __new__</div><div>    % (unit_expr, type(unit_expr)))</div><div>yt.units.unit_object.UnitParseError: Unit representation must be a string or sympy Expr. 0.1 code_length has type <class 'yt.units.yt_array.YTQuantity'>.</div></div><div><br></div><div><br></div></div></blockquote><div><br></div><div>Any chance you can create issues for these examples so we don't drop them?</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><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 20, 2015 at 1:36 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 Mon, Apr 20, 2015 at 10:32 AM, David Collins <span dir="ltr"><<a href="mailto:dcollins4096@gmail.com" target="_blank">dcollins4096@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">Sorry, I should clarify--<div><br></div><div>I tried doing</div><div>>>> frb=proj( (W1,W2), (dx1, dx2)) </div><div>and it complained that the second value wasn't a string.  Is there a way to tell the frb that the tuple isn't a (value, unit) pair?</div><div><br></div></div></blockquote><div><br></div></span><div>This should be accounted for internally.  If it's not doing that right now it's should be a straightforward fix.  Can you create a short example that's not working for you and file an issue about it, or if you're feeling ambitious, submit a PR with a fix?</div><div><br></div><div>That said, I think a tuple like `((3, 'pc'), (2, 'pc'))` will work.</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>Thanks!</div><span><font color="#888888"><div>d.</div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 20, 2015 at 1:31 PM, David Collins <span dir="ltr"><<a href="mailto:dcollins4096@gmail.com" target="_blank">dcollins4096@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, Matt and Everybody--<div><br>I have another dumb question.  If I want a non-square FRB, is that possible? </div><span><font color="#888888"><div><br></div><div>d.</div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 20, 2015 at 12:38 PM, David Collins <span dir="ltr"><<a href="mailto:dcollins4096@gmail.com" target="_blank">dcollins4096@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">Great.  Thanks, Matt!<span><font color="#888888"><div><br></div><div>d.</div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 20, 2015 at 11:44 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"><p dir="ltr">Hi Dave,</p>
<p dir="ltr">That's how it works by default, except at the boundaries of pixels that don't line up with cell boundaries, where it computes partial contributions. That can be turned off by setting antialias to false.</p>
<p dir="ltr">Matt</p>
<br><div class="gmail_quote"><div><div>On Mon, Apr 20, 2015, 10:42 AM David Collins <<a href="mailto:dcollins4096@gmail.com" target="_blank">dcollins4096@gmail.com</a>> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi, Everybody!<br clear="all"><div><br></div><div>If I make an FRB and have the resolution that of the finest zones, how doe the coarser zones get filled?  Is it possible for them to be forced to be piecewise-constant sampling of the coarse data?</div><div><br></div><div>d.</div><div><br></div>-- <br><div><div dir="ltr">-- Sent from a computer.<br></div></div>
</div></div></div>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">-- Sent from a computer.<br></div></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">-- Sent from a computer.<br></div></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">-- Sent from a computer.<br></div></div>
</div>
</div></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div></div></div><br></div></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">-- Sent from a computer.<br></div></div>
</div>
</div></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div></div>