Closed yt-fido closed 7 years ago
Original comment by John ZuHone (Bitbucket: jzuhone, GitHub: jzuhone):
Actually, I am thinking too hard--the issue here is that there is a conversion in the unit_lookup_table
for metallicity units to solar units. I'm not sure why the alias isn't handling the units correctly, but @chummels originally noted in his PR above that the field was being returned as dimensionless
instead of Zsun
.
Originally reported by: John ZuHone (Bitbucket: jzuhone, GitHub: jzuhone)
If one sets up a stream dataset with metallicity as an input field, the values get transformed. A simple script demonstrates this:
gives:
This happens regardless if one sets the units in the dict above. I am pretty sure that somehow the derived field for
metallicity
is being used instead, because that rescalesmetal_density
by the solar value, and somehow the input field is getting interpreted asmetal_density
.This bug got accidentally introduced in yt 3.3.2 with this PR:
https://bitbucket.org/yt_analysis/yt/pull-requests/2331/adding-metallicity-to-alias-fields-in/
I'll see if I can track it down.