[yt-users] add_field in the spectral frequency integrator

Sam Skillman samskillman at gmail.com
Thu Dec 2 15:56:15 PST 2010


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20101202/54239127/attachment.html>


More information about the yt-users mailing list