[yt-users] syntax error when defining a new field
Mike Butler
mbutler.astro at gmail.com
Fri Jun 6 04:28:01 PDT 2014
Hello, I am using the latest version of yt-3.0 and am having some problems
defining a new field. Here is an example of a field that produces an error:
def _Sigm(field,data): return data["Density"]
add_field("Sigma",function=_Sigm,units=r"\rm{g}/\rm{cm}^{2}",display_name=r"\Sigma")
and this is the error I get when I try to do a projection of it:
File "<string>", line 1
\Symbol ('rm' ,positive =True ){Symbol ('g' ,positive =True )}/\Symbol
('rm' ,positive =True ){Symbol ('cm' ,positive =True )}^{Integer (2 )}
^
SyntaxError: unexpected character after line continuation character
It works fine on the stable and dev versions of yt. Has something changed
for defining fields in 3.0?
Thanks,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140606/f8c81317/attachment.htm>
More information about the yt-users
mailing list