[yt-dev] Issue #1292: Add the equivalency keyword argument to `PlotWindow.set_unit` (yt_analysis/yt)

Hsi-Yu Schive issues-reply at bitbucket.org
Mon Oct 24 07:16:17 PDT 2016


New issue 1292: Add the equivalency keyword argument to `PlotWindow.set_unit`
https://bitbucket.org/yt_analysis/yt/issues/1292/add-the-equivalency-keyword-argument-to

Hsi-Yu Schive:

Currently set_unit() does not support converting units using the "equivalency" keyword. So one cannot convert, for example, a temperature field stored in kelvin to keV even though there is a well-defined conversion. As @ngoldbaum suggests, it might be convenient to support something like
```
#!python
import yt
ds = yt.load(…)

plot = yt.SlicePlot(ds, 2, 'temperature')
plot.set_unit('temperature', 'keV', equivalency='thermal')
```





More information about the yt-dev mailing list