[yt-users] How to take log of a user defined field ?

Reju Sam John rejusamjohn at gmail.com
Tue Aug 18 01:18:24 PDT 2015


Hi,

I have a user defined field with the following definition.

def _epsilon(field, data):
    return (4.0/3.0)*(data['vShock']/data["VelocityMagnitude"])
add_field("epsilon", function=_epsilon, take_log=False, units=r" " )

Now I would like take ln(1 + data["epsilon"]). I am trying with the
following definition. Is this the correct way of doing this ?

def _lnepsilon(field, data):
    return 1 + data["epsilon"]
add_field("lnepsilon", function=_lnepsilon, *take_log=True*, units=r" " )

Thank you
-- 
Reju Sam John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150818/c49f2528/attachment.htm>


More information about the yt-users mailing list