[yt-users] add_field in the spectral frequency integrator
Matthew Turk
matthewturk at gmail.com
Thu Dec 2 16:11:24 PST 2010
Hi Sam,
We don't import yt.mods anywhere inside yt, or we at least try to
avoid it at all costs. I have replaced this with:
from yt.data_objects.field_info_container import add_field
-Matt
On Thu, Dec 2, 2010 at 3:56 PM, Sam Skillman <samskillman at gmail.com> wrote:
> Hi Stephen,
> I just ran into this as well and just pushed the fix (2e69ac29577d) of
> adding:
> from yt.mods import add_field
> to the top of spectral_frequency_integrator.py.
> Sam
> On Thu, Dec 2, 2010 at 4:36 PM, Stephen Skory <stephenskory at yahoo.com>
> wrote:
>>
>>
>> Hi all,
>>
>> I'm getting an error like this in the spectral frequency integrator:
>>
>> 74 'Temperature' : na.log10(data["Temperature"])}
>> 75 return 10**interp(dd)
>> ---> 76 add_field(name, function=frequency_bin_field,
>> 77 projection_conversion="cm",
>> 78
>> units=r"\rm{ergs}\/\rm{cm}^{-3}\/\rm{s}^{-1}",
>>
>> NameError: global name 'add_field' is not defined
>>
>> Was something missed in this file when it was converted to the new API
>> scheme? I've already added a "import numpy as na" to it, so I'm guessing
>> this is the case. If I'm correct, what is missing? Thanks!
>>
>>
>> Stephen Skory
>> stephenskory at yahoo.com
>> http://stephenskory.com/
>> 510.621.3687 (google voice)
>> _______________________________________________
>> 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
>
>
More information about the yt-users
mailing list