[yt-users] Derived field conflicts

Nathan Goldbaum nathan12343 at gmail.com
Mon Mar 13 14:10:25 PDT 2017


Is this yt.add_field call happening your script or in a plugins file?

If it's in a script one simple way to do it would be to replace the call to
yt.add_field with a call to ds.add_field that's inside an if statement that
checks to see if a needed field is in ds.field_list first.

On Mon, Mar 13, 2017 at 4:05 PM, David Collins <dcollins4096 at gmail.com>
wrote:

> Hi, Everybody!
>
> Every now and then I'll add a new field using yt.add_field() that includes
> the magnetic field.  If I then load another dataset that doesn't have the
> magnetic field, it chokes when it parses the hierarchy because it tries to
> validate my new field against the dataset that doesn't have B.  Is there a
> simple way I can fix my field definition to prevent this?
>
> I'd like to avoid adding every field manually to each dataset, since I
> have a lot of fields, and a lot of dataset, and some have B and some dont,
> etc.  but I see that's probably the most obvious fix.
>
> Thanks!
> d.
>
> --
> -- Sent from a computer.
>
> _______________________________________________
> 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/20170313/0e44daa6/attachment.htm>


More information about the yt-users mailing list