change in add_projection/add_thin_projection for unweighted projections?
Hi all, Has there been a change to the add_projection or add_thin_projection routines for unweighted projections? I have some projection scripts from ~a month ago that are all off by like 20 orders of magnitude on the color bar limits for unweighted projections. The only thing that makes sense to me is that yt is now dividing the line of sight integration by the depth of the projection. So it is sum(f(i)*dl(i))/sum(dl(i)) instead of sum(f(i)*dl(i)). Is that right? I don't think it used to do that. It's fine if that is now what it is doing, but I just want to make sure. I'm a little confused. Christine
Hi Christine, The behavior should be the same; for weighted: v = sum( f(i) * w(i) * dl(i) ) / sum( w(i) * dl(i) ) For unweighted: v = sum( f(i) * dl(i) ) Looking over the code, it looks like your assessment is correct; the weighting is taken and performed correctly, but the dls are not converted into cm or the otherwise appropriate unit. I have just pushed out a fix in hash 3becbdffbc30; please test it and let me know if it works for you. Thanks very much for bringing this to my attention, Matt On Mon, Aug 15, 2011 at 12:21 AM, Christine Simpson <csimpson@astro.columbia.edu> wrote:
Okay, I tested it. The unweighted projections still have the same problem, but now the weighted projections are affected too, although somewhat differently. The unweighted projections are many orders of magnitude less than they should be and the weighted projections are many orders of magnitude more than they should be. To clarify, I working with a script that does thin projections of density and temperature weighted by density and unweighted projections of dark matter density and star density. On Aug 15, 2011, at 10:15 AM, Matthew Turk wrote:
Hi Christine, There was a mistaken conditional. (It actually showed up in the testing results, but I stepped away and did not see them for a while.) It's fixed now in 5f8245bc1f9b. The issue was that I was multiplying by the conversion factor if the weight was *not* None. It should be multiplying by the conversion factor if the weight *was* None. -Matt On Mon, Aug 15, 2011 at 10:39 AM, Christine Simpson <csimpson@astro.columbia.edu> wrote:
participants (2)
-
Christine Simpson
-
Matthew Turk