[Yt-dev] Stumped on off-axis projections

Matthew Turk matthewturk at gmail.com
Fri Sep 30 06:30:32 PDT 2011


Hi all,

I'm writing a helper function for off-axis projections.  I'm stuck on
deciding what to do for weighting.  For a weighted projection, we
integrate field * weight across the whole domain.  For on-axis, this
is well-defined.  For off-axis, we have two choices of what to do,
because we interpolate between vertices:

 * Construct a field that is everywhere field * weight, and
interpolate inside that to get our v's
 * Interpolate field, interpolate weight, and multiply the two
interpolated values to get our v's

These are different operations, and can give very different results.
(You can test this very easily in 1D; I was surprised at the magnitude
of the differences.)  I am not sure which one is more 'correct' for
our particular goal.  I can actually see arguments for both sides.
The arguments in favor of #1 are that we are constructing a valid
field everywhere in advance, and it will be more stable.  The
arguments for #2 are that it may more accurately reflect the local
value you would get compared to, say, a column density taken off axis
(which is what we ultimately divide by at the end of the calculation.)

Does anybody here have an opinion?

1D example code: http://paste.yt-project.org/show/1837/

-Matt



More information about the yt-dev mailing list