[yt-users] Problem with BinnedProfile1D
trobolo dinni
trobolo.trobolo.dinni5 at gmail.com
Mon Apr 1 21:42:24 PDT 2013
Thanks Nathan,
that solved the problem.
Cheers,
Roberto
On 2 April 2013 14:42, Nathan Goldbaum <nathan12343 at gmail.com> wrote:
> Hi Roberto,
>
> By default yt uses CGS units. If you want to use enzo's internal unit
> system, try replacing 'Radius' with 'RadiusCode'.
>
>
> On Apr 1, 2013, at 8:37 PM, trobolo dinni <
> trobolo.trobolo.dinni5 at gmail.com> wrote:
>
> 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.py <http://5.common_envelope_incomplete.py/>in <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
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130402/73a6b8c1/attachment.htm>
More information about the yt-users
mailing list