<div dir="ltr"><div><div><div>Hi, Matt<br><br></div>Yes, changing the limits as you suggested, e.g.<br>C = np.array([0.5,0.5,0.5]) * pf.domain_width + pf.domain_left_edge<br>
LE = np.array([0.0,0.0,0.4]) * pf.domain_width + pf.domain_left_edge<br>
RE = np.array([1.0,1.0,0.6]) * pf.domain_width + pf.domain_left_edge<br><br></div>worked. Thanks!!<br><br></div>kathy<br><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 27, 2013 at 7: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:1px solid rgb(204,204,204);padding-left:1ex">Hi Kathy,<br>
<div class="im"><br>
On Tue, Nov 26, 2013 at 2:41 PM, Kathy Eastwood <<a href="mailto:kathy.eastwood@nau.edu">kathy.eastwood@nau.edu</a>> wrote:<br>
> Hi, helpful folks. Another issue I have been struggling with, which is<br>
> similar to this thread<br>
> <a href="http://lists.spacepope.org/pipermail/yt-users-spacepope.org/2013-May/003652.html" target="_blank">http://lists.spacepope.org/pipermail/yt-users-spacepope.org/2013-May/003652.html</a><br>
><br>
> I am working on some FLASH data with the current version of yt using MacOS<br>
> 10.7.5.  Using this exact same data set, I managed to create some nice<br>
> phaseplots using spheres centered on the densest spot. However, I now want<br>
> to make some plots for a much larger volume of scientific interest...<br>
> Here is the code<br>
><br>
> from yt.mods import *<br>
> %matplotlib inline<br>
> import matplotlib.pyplot as plt<br>
> import numpy as np<br>
> pf = load("Strat_Box_hdf5_plt_cnt_0064")<br>
> pc = PlotCollection(pf, [0.5, 0.5, 0.5])<br>
> plane = pf.h.region([0.5,0.5,0.5],[0.0,0.0,0.4],[1.0,1.0,0.6])<br>
> pc.save("plane_cnt_0064")<br>
<br>
</div>Hmm, is there a line missing here, where you create a profile or phase object?<br>
<div><div class="h5"><br>
><br>
> I then get the following error<br>
><br>
> ValueError: Data has no positive values, and therefore can not be log-scaled<br>
><br>
><br>
> Following the advice in the thread listed above, John Wise suggested<br>
> "For your "empty" plot, do you have any gas with densities between<br>
> 1e-26 and 1e-27 g/cm^3 in this sphere?  If there's no gas in this<br>
><br>
> range, then CellVolume will be zero and will give you that error<br>
> message when it tries to take the log of CellVolume.  If you want<br>
> to manually inspect the CellVolume field, you can print out the following<br>
> variable<br>
> pc.plots[-1].data['CellVolume']<br>
> which will give you the CellVolume as a function of the x-variable<br>
> for the last plot you have added to your PlotCollection."<br>
><br>
> The writer did not respond in the next thread, so I'm not sure if<br>
><br>
> this worked.  But when I try it, I get the following:<br>
> KeyError                                  Traceback (most recent call last)<br>
> <ipython-input-18-71f93f9e2cb6> in <module>()<br>
> ----> 1 pc.plots[-1].data["CellVolume"]<br>
><br>
> /Users/kde/yt-x86_64/src/yt-hg/yt/data_objects/profiles.pyc in<br>
> __getitem__(self, key)<br>
>     160         # This raises a KeyError if it doesn't exist<br>
>     161         # This is because we explicitly want to add all fields<br>
> --> 162         return self.field_data[key]<br>
>     163<br>
>     164     def __setitem__(self, key, value):<br>
><br>
> KeyError: 'CellVolume'<br>
><br>
> Even though CellVolume is explicitly listed in my list of derived fields...<br>
><br>
> Also, I did try the same command for Density rather than CellVolume,<br>
><br>
> and the numbers were in the e-24 g cm-3 range...in fact, all the numbers<br>
> were exactly the same. So I don't know if I've screwed up my data container<br>
> somehow, or if the density values really are too low?<br>
<br>
</div></div>Well, one thing that immediately comes to mind is that your region<br>
object looks smaller than what I'm used to in FLASH datasets, which<br>
are typically in cgs.  If you want to take the relative units<br>
(relative to the box width) and scale them to be absolute in your<br>
domain, you could do this like so:<br>
<br>
C = np.array([0.5,0.5,0.5]) * pf.domain_width + pf.domain_left_edge<br>
LE = np.array([0.0,0.0,0.4]) * pf.domain_width + pf.domain_left_edge<br>
RE = np.array([1.0,1.0,0.6]) * pf.domain_width + pf.domain_left_edge<br>
<br>
You can try making a plane again with these C, LE, RE values, but you<br>
can also check the existing one by looking at<br>
<br>
plane["Ones"]<br>
<br>
and seeing how many values are returned there.  Do you get anything back?<br>
<br>
Hope that helps,<br>
<br>
Matt<br>
<div class="im"><br>
><br>
><br>
> any ideas?<br>
> thanks SO much<br>
> kathy<br>
><br>
><br>
><br>
> --<br>
> Kathy DeGioia Eastwood, Ph.D.<br>
> Professor of Physics and Astronomy<br>
> Northern Arizona University<br>
> Flagstaff, AZ 86011-6010<br>
> Ph: <a href="tel:928-523-7159" value="+19285237159">928-523-7159</a>   FX: <a href="tel:928-523-1371" value="+19285231371">928-523-1371</a><br>
> <a href="mailto:Kathy.Eastwood@nau.edu">Kathy.Eastwood@nau.edu</a><br>
> deliveries: 602 S. Humphreys St., Bldg 19 Rm 209<br>
><br>
</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>
</blockquote></div><br><br clear="all"><br>-- <br>Kathy DeGioia Eastwood, Ph.D.<br>Professor of Physics and Astronomy<br>Northern Arizona University<br>Flagstaff, AZ 86011-6010<br>Ph: 928-523-7159   FX: 928-523-1371<br><a href="mailto:Kathy.Eastwood@nau.edu" target="_blank">Kathy.Eastwood@nau.edu</a><br>
deliveries: 602 S. Humphreys St., Bldg 19 Rm 209
</div></div></div></div>