[yt-users] cut_region: can I make an expression dimensionless?
Stuart Levy
salevy at illinois.edu
Wed Jan 14 08:26:49 PST 2015
Hello yt people,
I'm hoping to write a cut_region expression that (a) depends on position
and (b) does it in a nonlinear way - I'd like to do a sort of
paraboloidal cut, like
ds.cut_region(dd, "obj['z'] - (obj['x']**2 + obj['y']**2)/2.0 < 0.78")
But this runs afoul of the unit-checking - obj['z'] doesn't have the
same units as obj['x']**2.
Somehow I either need to cast all the obj[] terms to be dimensionless
("trust me, I promise it's right"), or else give dimensions of length to
the constants. Should there be a way to do either one?
More information about the yt-users
mailing list