Hi Libby, Matt,<div><br></div><div>Britton and I have worked on some 2x2 (and tentative NxN) plotting mechanisms of fixed resolution buffers.  Let me try to package it up and post it somewhere.  I should be able to do so fairly quickly once I'm done with a few other things this morning.</div>

<div><br></div><div>Sam<br><br><div class="gmail_quote">On Mon, Feb 28, 2011 at 10:14 AM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com">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 Libby,<br>
<br>
I guess I don't really know what kind of behavior you'd like?  If yous<br>
et the zlim manually, it should still work; what should it be set to,<br>
on a log scale, if everything is zero?<br>
<br>
-Matt<br>
<div><div></div><div class="h5"><br>
On Mon, Feb 28, 2011 at 11:02 AM, Elizabeth Harper-Clark<br>
<<a href="mailto:h-clark@astro.utoronto.ca">h-clark@astro.utoronto.ca</a>> wrote:<br>
> Hi guys,<br>
><br>
> one more thing. I want to calculate the radiation pressure force, and when<br>
> there is some then plot it with a log scale. However if I set:<br>
><br>
> def _ConvertAccel(data):<br>
>     return data.convert("Length") / (data.convert("Time"))**2.0<br>
> def _RadiationAccelerationMagnitude(field, data):<br>
>     return ( (data["RadAccel1"])**2.0 + \<br>
>              (data["RadAccel2"])**2.0 + \<br>
>              (data["RadAccel3"])**2.0 )**(1.0/2.0)<br>
> add_field("RadiationAccelerationMagnitude",<br>
> function=_RadiationAccelerationMagnitude,<br>
> take_log=True,convert_function=_ConvertAccel, units=r"\rm{cm}/\rm{s}^{2}")<br>
> def _RadiationForceMagnitude(field, data):<br>
>     return ( data["RadiationAccelerationMagnitude"] * data["Density"] *<br>
> data["CellVolume"])<br>
> add_field("RadiationForceMagnitude", function=_RadiationForceMagnitude,<br>
> take_log=True, units=r"\rm{dynes}")<br>
><br>
><br>
> before the stars switch on when the radiation acceleration baryon fields are<br>
> all 0.0 everywhere I get the following error:<br>
><br>
><br>
> Traceback (most recent call last):<br>
>   File "MultiPlotProj.py", line 65, in <module><br>
>     s = pc.add_projection("RadiationForceMagnitude", ax,<br>
> weight_field="Density", figure=fig, axes=axes[0][3], use_colorbar=False)<br>
>   File "/home/h-clark/YT/src/yt-hg/yt/visualization/plot_collection.py",<br>
> line 742, in add_projection<br>
>     size=fig_size, periodic=periodic))<br>
>   File "/home/h-clark/YT/src/yt-hg/yt/visualization/plot_types.py", line<br>
> 310, in __init__<br>
>     self.__init_temp_image(use_colorbar)<br>
>   File "/home/h-clark/YT/src/yt-hg/yt/visualization/plot_types.py", line<br>
> 347, in __init_temp_image<br>
>     self.set_width(1,'unitary')<br>
>   File "/home/h-clark/YT/src/yt-hg/yt/visualization/plot_types.py", line<br>
> 436, in set_width<br>
>     self._refresh_display_width()<br>
>   File "/home/h-clark/YT/src/yt-hg/yt/visualization/plot_types.py", line<br>
> 454, in _refresh_display_width<br>
>     self._redraw_image()<br>
>   File "/home/h-clark/YT/src/yt-hg/yt/visualization/plot_types.py", line<br>
> 384, in _redraw_image<br>
>     newmin = na.nanmin(buff[bI])<br>
>   File<br>
> "/home/h-clark/YT/lib/python2.6/site-packages/numpy/lib/function_base.py",<br>
> line 1494, in nanmin<br>
>     return _nanop(np.min, np.inf, a, axis)<br>
>   File<br>
> "/home/h-clark/YT/lib/python2.6/site-packages/numpy/lib/function_base.py",<br>
> line 1355, in _nanop<br>
>     res = op(y, axis=axis)<br>
>   File<br>
> "/home/h-clark/YT/lib/python2.6/site-packages/numpy/core/fromnumeric.py",<br>
> line 1829, in amin<br>
>     return amin(axis, out)<br>
> ValueError: zero-size array to ufunc.reduce without identity<br>
><br>
><br>
> Is there a way to set it so I get a log scale when plotting projections that<br>
> does not break when the fields are all zero?<br>
><br>
> Many thanks,<br>
><br>
> Libby<br>
><br>
><br>
><br>
> --<br>
> Elizabeth Harper-Clark MA MSci<br>
> PhD Candidate, Canadian Institute for Theoretical Astrophysics, UofT<br>
> Sciences and Engineering Coordinator, Teaching Assistants' Training Program,<br>
> UofT<br>
><br>
> <a href="http://www.astro.utoronto.ca/~h-clark" target="_blank">www.astro.utoronto.ca/~h-clark</a><br>
> <a href="mailto:h-clark@cita.utoronto.ca">h-clark@cita.utoronto.ca</a><br>
> Astronomy office phone: +1-416-978-5759<br>
><br>
</div></div>> _______________________________________________<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>
><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>
</blockquote></div><br></div>