Hey, Matt--
Here's my $0.02
I'd say that interpolating (field*weight) should be the primary
option, but I would leave both as an option. As you say, they can
give different answers, but have different utility.
I think that this method (option 1) is more physical, since that's
what I would get if I were making an observation of some convolved
quantity, say rotation measure = \int{ n B dz }. I then need a second
independent measurement of \int{n dz} to get B alone.
I'd also leave in the second option, since one might be weighting
purely for visual emphasis of a more "pure" quantity.
I'd call it "combined_interpolation" and default it to True.
d.
On Fri, Sep 30, 2011 at 7:30 AM, Matthew Turk
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 _______________________________________________ Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
-- Sent from my computer.