yt
yt copied to clipboard
units_override should replace unit_base for SPH datasets
Bug report
Most of our datasets have the ability to use the units_override
functionality to change units. Most of our SPH datasets don't allow this, and instead have something called unit_base
which does the same thing. This is especially needed when your dataset is not self-descripting.
It turns out that setting unit_base
by hand does not even work for Arepo and EAGLE/OWLS datasets--it's simply ignored.
For yt-4.0 we should just rip off the band-aid and make units_override
the default user-facing way to do this, while touching as little internal code as possible.
I like the idea of making our API as consistent as possible across different datasets.
It seems like this could create a backwards incompatible change. Do you think it would be a good idea to deprecate unit_base
and have an interim with both, or simply switch to units_override
since it seems it isn't working as expected now?
@munkm it's possible we could do this without breaking backwards-compatibility--we could leave unit_base
in and if it is something other than None
we can issue a deprecation warning and then pass its contents to units_override
I'm coming around to the idea that this is probably too disruptive--we should leave unit_base
in and just make sure it works for Arepo and EAGLE/OWLS
So since this is now yt-4.1, should we untag it from #3125 ?
Yes
@jzuhone I think the 4.1 release is the ideal time to do this. Not clear when that's going to happen but it could be soon. Do you wish to work on this ? Otherwise I'm game to do it.