[yt-users] creating gradient of a field as a derived field
turhan nasri
turhannasri at gmail.com
Fri Jun 24 00:45:54 PDT 2016
Hi yt people,
I need a little help creating a derived field which will return me the
negative gradient of gravitational potential
*@derived_field(name = "gradient_gravpot", units = " cm/s**2")*
*def _gradient (field, data):*
* G = add_gradient_fields(("gas"," gravitational_potental"))*
* return (- data["gravitational_potential_gradient_x"])*
and I got this error
*NameError: global name 'add_gradient_fields' is not defined*
please suggest the right method to define the field. thanks
Best
Turhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160624/04412725/attachment.htm>
More information about the yt-users
mailing list