<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Roberto,<div><br></div><div>By default yt uses CGS units.  If you want to use enzo's internal unit system, try replacing 'Radius' with 'RadiusCode'.</div><div><br></div><div><br><div><div>On Apr 1, 2013, at 8:37 PM, trobolo dinni <<a href="mailto:trobolo.trobolo.dinni5@gmail.com">trobolo.trobolo.dinni5@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Dear yt users,<div><br></div><div>I would like to ask you a suggestion about an error I am getting.</div><div><br></div><div>I have a set of outputs from an Enzo simulation and the basis of my code is the following:</div><div>
<br></div><div><br></div><div><div><i>from yt.mods import *</i></div><div><i>import matplotlib.pyplot as plt</i></div><div><i>import numpy as np</i></div><div><i>import math</i></div><div><i>import os</i></div><div><i><br>
</i></div><div><i>pf = load("/home/cthulhu/Downloads/DD0000/data0000")</i></div><div><i><br></i></div><div><i>common_envelope = pf.h.all_data()</i></div><div><i><br></i></div><div><i>radial_profile = BinnedProfile1D(common_envelope, 200, "Radius", 0.0, 0.5, log_space=False)</i></div>
</div><div><i><br></i></div><div><i><br></i></div><div>but when creating the binned profile yt gives me this error:</div><div><br></div><div><br></div><div><div><i>EmptyProfileData                          Traceback (most recent call last)</i></div>
<div><i><br></i></div><div><i>/home/cthulhu/Repository/Python/yt scripts/<a href="http://5.common_envelope_incomplete.py/">5.common_envelope_INCOMPLETE.py</a> in <module>()</i></div><div><i>     12 </i></div><div><i>     13 #creating binned profiles to evaluate v,rho,P,T in function of the radius</i></div>
<div><i><br></i></div><div><i>---> 14 radial_profile = BinnedProfile1D(common_envelope, 200, "Radius", 0.0, 0.5, log_space=False)</i></div><div><i>     15 </i></div><div><i>     16 </i></div><div><i><br></i></div>
<div><i>/usr/local/lib/python2.7/dist-packages/yt-2.5-py2.7-linux-x86_64.egg/yt/data_objects/profiles.pyc in __init__(self, data_source, n_bins, bin_field, lower_bound, upper_bound, log_space, lazy_reader, end_collect)</i></div>
<div><i>    251         # and the inverse indices right now.</i></div><div><i><br></i></div><div><i>    252         if not lazy_reader:</i></div><div><i>--> 253             self._args = self._get_bins(data_source)</i></div>
<div><i>    254 </i></div><div><i>    255     def _get_empty_field(self):</i></div><div><i><br></i></div><div><i>/usr/local/lib/python2.7/dist-packages/yt-2.5-py2.7-linux-x86_64.egg/yt/data_objects/profiles.pyc in save_state(*args, **kwargs)</i></div>
<div><i>     53             old_params = source.field_parameters</i></div><div><i>     54             source.field_parameters = prof._data_source.field_parameters</i></div><div><i>---> 55             tr = func(*args, **kwargs)</i></div>
<div><i>     56             source.field_parameters = old_params</i></div><div><i>     57         else:</i></div><div><i><br></i></div><div><i>/usr/local/lib/python2.7/dist-packages/yt-2.5-py2.7-linux-x86_64.egg/yt/data_objects/profiles.pyc in _get_bins(self, source, check_cut)</i></div>
<div><i>    300         sd = source_data[mi]</i></div><div><i>    301         if sd.size == 0:</i></div><div><i>--> 302             raise EmptyProfileData()</i></div><div><i>    303         # Stick the bins into our fixed bins, set at initialization</i></div>
<div><i><br></i></div><div><i>    304         bin_indices = np.digitize(sd, self._bins)</i></div><div><i><br></i></div><div><i>EmptyProfileData: </i></div></div><div><i><br></i></div><div>It is not clear to me what is the problem at the basis of this error, do you have an idea of what to do?</div>
<div><br></div><div>Thanks,</div><div>               Roberto</div><div><br></div>
_______________________________________________<br>yt-users mailing list<br><a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org<br></blockquote></div><br></div></body></html>