[yt-users] YTFieldUnitError

Elizabeth Tasker tasker at astro1.sci.hokudai.ac.jp
Mon Nov 23 22:41:34 PST 2015


Hi everyone,

While using yt-3, I created a derived field:

@derived_field(name=‘Temp’, units=“K”)
def _Temp …..

It crashes with a YTFieldUnitError because it believes the units should be cm**2/s**2. I understand why yt thinks this — I’m using thermal_energy in the definition for Temp. However, the units are truly Kelvin and I think I should be able to specify whatever I like in “units”! 

Is there a way to stop yt crashing when it disagrees with your life choices?

Elizabeth 


More information about the yt-users mailing list