[Yt-dev] Stumped on off-axis projections
Matthew Turk
matthewturk at gmail.com
Fri Sep 30 07:48:00 PDT 2011
Hi David and Cameron,
Okay, you have both convinced me. I have opted not to include an
option, as I prefer that we provide the "better" answer by default and
not clutter up too much with additional options that will likely
result in what we have already decided are sub-optimal results. (It
is not terribly challenging to get back out the behavior I described,
as it is all accessible without modifying any yt internals, it just
won't be part of the helper function.)
I've pushed to my private repo and opened pull request #3, and since
Cameron asked me to write it I've addressed my PR to him, but anybody
else should feel free to test it out, comment, reject, whatever.
https://bitbucket.org/yt_analysis/yt/pull-request/3/off-axis-projection-helper-function
Thanks for helping me clarify this in my head.
-Matt
On Fri, Sep 30, 2011 at 9:58 AM, david collins <antpuncher at gmail.com> wrote:
> 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 <matthewturk at gmail.com> 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
>>
>
>
>
> --
> Sent from my computer.
> _______________________________________________
> 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