yt-project / yt

Main yt repository
http://yt-project.org
Other
469 stars 278 forks source link

Units get lost in profiles #1849

Closed matthewturk closed 6 years ago

matthewturk commented 6 years ago

Making a 2D profile gives strange results on some sample datasets:

>>> import yt
>>> ds = yt.load("IsolatedGalaxy/galaxy0030/galaxy0030")
>>> prof = ds.r[:].profile(["density", "temperature"], "cell_volume", weight_field=None)
>>> prof["cell_volume"].units
code_length**3
>>> prof["cell_volume"].max()
2.7982080370624824e+73 code_length**3

I'm on the current master (following result of merging #1845). Plotting gives the same thing.

matthewturk commented 6 years ago

I should note, it's reporting that it's code_length but it's in cm.

ngoldbaum commented 6 years ago

I get the correct answer with yt 3.4.1, gonna attempt to bisect now.

ngoldbaum commented 6 years ago

This is due to #1799, I will work on a fix for this