[yt-dev] Off-axis projections -- Discrepancies between homogenized volume vs KDtree methods

Cameron Hummels chummels at astro.columbia.edu
Tue Nov 22 14:11:59 PST 2011


Problem solved everyone.  Britton and I tracked it down.

When you make a Homogenized Volume, you need to set the field explicitly 
that you are homogenizing.  By default it uses the "Density" field.  So 
effectively, I was comparing a projection of "Density" (from the 
homogenized volume method), and a projection of "CIV Number Density" 
(from the KDtree method)--of course these would differ.

This just goes to show you that one should always RTFM prior to emailing 
the list with problems.  Sorry everyone!

Cameron

On 11/22/11 3:31 PM, Cameron Hummels wrote:
> Hey Sam,
>
> When I run each method over the whole volume, the kd-tree and the HV 
> take the same duration to process, however, the ratio of the two is 
> still the same factor of 2e-8.
>
> Cameron
>
> On 11/22/11 3:26 PM, Sam Skillman wrote:
>> Hey Cameron,
>>
>> Are the answers similar if you do the entire volume?  The kd-tree can 
>> not accept things like spheres to homogenize over, so maybe it is 
>> because it is projecting the entire box?  I'll keep thinking...
>>
>> Sam
>>
>> On Tue, Nov 22, 2011 at 1:07 PM, Cameron Hummels <chummels at gmail.com 
>> <mailto:chummels at gmail.com>> wrote:
>>
>>     Hello peeps (mostly Britton, Matt and Sam),
>>
>>     I have recently been doing some off-axis projections in my
>>     cosmological runs (using the supercool new off_axis_projection
>>     helper function Matt wrote), and I've encountered some problems.
>>      I find different results when I do the off-axis projection using
>>     a homogenized volume versus when I do not use a homogenized volume
>>     (when it uses the default behavior for camera objects -- ie a 
>> KDtree).
>>
>>     Of course, these two results should be identical, and they are
>>     when I use a normal field like "Density".  However, I'm trying to
>>     use a derived field from some code Britton wrote, part of a
>>     package called ion_balance, which creates derived fields for
>>     different atomic ions.  So when I compare the CIV Number Density
>>     from these two methods, I get very different results.  Even when I
>>     do this on a normal vanilla yt field, like "Density", the KDtree
>>     method takes exceptionally longer than the homogenized volume
>>     method (I think this is because I'm only doing the HV for a small
>>     subsample of the overall volume).  On the other hand, they both
>>     take about the same amount of time when my sample volume is the
>>     entire box volume.
>>
>>     I've pastebinned a demonstration script which shows this
>>     discrepancy at: http://paste.yt-project.org/show/1953.  If you
>>     don't have ion_balance, you can comment that import out, and
>>     comment the line for defining the field as
>>     "CIV_Cloudy_eq_NumberDensity", and run it to see the time
>>     discrepancy between the two methods.  It should work on any sort
>>     of parameter file, not just the specific one I'm using.  What I do
>>     is take an off-axis projection using each method, then divide the
>>     two images against each other to form a ratio image, and then
>>     output the average and stddev for this ratio.  The average of the
>>     ratio is: 2e-8.
>>
>>     I've changed the width of the off-axis projection and it has a
>>     minimal (but nonzero) change on the overall ratio between the two.
>>
>>     So I'm not sure what to do.  It appears that the CIV field is
>>     initiated in the same way that a normal field is, with the
>>     projection_conversion set to 'cm', just as it is for "Density".
>>      Any ideas on what could be making this difference?  Any ideas on
>>     which is the value to trust?
>>
>>     Cameron
>>     _______________________________________________
>>     yt-dev mailing list
>>     yt-dev at lists.spacepope.org <mailto:yt-dev at lists.spacepope.org>
>>     http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>>
>>
>>
>>
>> _______________________________________________
>> yt-dev mailing list
>> yt-dev at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
> _______________________________________________
> 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