[yt-users] Problem with BinnedProfile1D
trobolo dinni
trobolo.trobolo.dinni5 at gmail.com
Mon Apr 1 20:37:03 PDT 2013
Dear yt users,
I would like to ask you a suggestion about an error I am getting.
I have a set of outputs from an Enzo simulation and the basis of my code is
the following:
*from yt.mods import **
*import matplotlib.pyplot as plt*
*import numpy as np*
*import math*
*import os*
*
*
*pf = load("/home/cthulhu/Downloads/DD0000/data0000")*
*
*
*common_envelope = pf.h.all_data()*
*
*
*radial_profile = BinnedProfile1D(common_envelope, 200, "Radius", 0.0, 0.5,
log_space=False)*
*
*
*
*
but when creating the binned profile yt gives me this error:
*EmptyProfileData Traceback (most recent call last)
*
*
*
*/home/cthulhu/Repository/Python/yt
scripts/5.common_envelope_INCOMPLETE.pyin <module>()
*
* 12 *
* 13 #creating binned profiles to evaluate v,rho,P,T in function of the
radius*
*
*
*---> 14 radial_profile = BinnedProfile1D(common_envelope, 200, "Radius",
0.0, 0.5, log_space=False)*
* 15 *
* 16 *
*
*
*/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)*
* 251 # and the inverse indices right now.*
*
*
* 252 if not lazy_reader:*
*--> 253 self._args = self._get_bins(data_source)*
* 254 *
* 255 def _get_empty_field(self):*
*
*
*/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)*
* 53 old_params = source.field_parameters*
* 54 source.field_parameters =
prof._data_source.field_parameters*
*---> 55 tr = func(*args, **kwargs)*
* 56 source.field_parameters = old_params*
* 57 else:*
*
*
*/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)*
* 300 sd = source_data[mi]*
* 301 if sd.size == 0:*
*--> 302 raise EmptyProfileData()*
* 303 # Stick the bins into our fixed bins, set at initialization
*
*
*
* 304 bin_indices = np.digitize(sd, self._bins)*
*
*
*EmptyProfileData: *
*
*
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?
Thanks,
Roberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130402/05516f09/attachment.htm>
More information about the yt-users
mailing list