How to make the new drived-fields work?
Hi, I have written some new fields in yt/yt/fileds file named as XXX.py, but I have no idea how to make it work correctly like kinetic-energy, thermal-energy etc which can be projected and sliced. Please help me to work it out!!!
Hi, I think you will have more luck if you put them in your plugins file -- putting them into the yt/fields/ subdirectory will require they get imported, which touches a few places in the code. http://yt-project.org/doc/reference/configuration.html#the-plugin-file -Matt On Mon, Sep 17, 2018 at 8:48 PM <lianxiaoli87@sjtu.edu.cn> wrote:
Hi, I have written some new fields in yt/yt/fileds file named as XXX.py, but I have no idea how to make it work correctly like kinetic-energy, thermal-energy etc which can be projected and sliced. Please help me to work it out!!! _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
Hi Matt: Following your advice, I put my new fields in the plugins file, and they can be compiled correctly. While when I loaded file (eg.ds = yt.load(RD0022/RD0022)) and listed all fields using ds.derived_field, then I found that some of my new fields are missing and others can be seen.I have no ideals about this problems. Do you meet this trouble before?
Hi Matt: Following your advice, I put my new fields in the plugins file, and they can be compiled correctly. While when I loaded file (eg.ds = yt.load(RD0022/RD0022)) and listed all fields using ds.derived_field, then I found that some of my new fields are missing and others can be seen.I have no ideals about this problems. Do you meet this trouble before?
Hi -- usually that means there's an error in them somewhere. Do they run properly if you put them in a python file? Maybe you're missing some imports in the derived fields file? On Wed, Oct 10, 2018 at 6:12 AM <lianxiaoli87@sjtu.edu.cn> wrote:
Hi Matt: Following your advice, I put my new fields in the plugins file, and they can be compiled correctly. While when I loaded file (eg.ds = yt.load(RD0022/RD0022)) and listed all fields using ds.derived_field, then I found that some of my new fields are missing and others can be seen.I have no ideals about this problems. Do you meet this trouble before? _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
participants (2)
-
lianxiaoli87@sjtu.edu.cn
-
Matthew Turk