[Yt-dev] Stumped on off-axis projections

Cameron Hummels chummels at astro.columbia.edu
Fri Sep 30 06:58:27 PDT 2011


Hey Matt,

It seems like the first method avoids any crazy double-interpolation 
errors that you might get from weird spots in the values of the grid.  
You could always offer both options in the final function call with 
flags, but I think the first method is more accurate.

Cameron


On 9/30/11 9:30 AM, Matthew Turk wrote:
> 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 at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>



More information about the yt-dev mailing list