<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Geoffrey,</div><div><br></div><div>Well, if you look at Sam's formula and convert it into the discrete version, what you're really doing is:</div><div><br></div><div>(Density1**2 * L1 + Density2**2 * L2 +...)/(Density1*L1 + Density2*L2 + ...) =  units of g/cm^3</div><div><br></div><div>Unweighted projections always have column density units.  So, if you're projecting a field with units of T-rex, you'll get back an image with units of T-rex*cm.</div><div><br></div><div>Hope that helped,</div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Nathan Goldbaum<br>Graduate Student<br>Astronomy & Astrophysics, UCSC<br><a href="mailto:goldbaum@ucolick.org">goldbaum@ucolick.org</a><br>http://www.ucolick.org/~goldbaum</div></span></div></span></div></span></span>
</div>
<br><div><div>On Jun 11, 2012, at 2:27 PM, Geoffrey So wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Thanks for the explanations, but I think I'm still confused about something and want a bit more clarifications,<div><br></div><div>I thought when I'm projecting density, I'm doing (Density1 + Density2 +...), which is obviously wrong because I forgot about the Length dimention, so it should be:</div>
<div><br></div><div>Density1 * L1 + Density2 * L2 + ... = units of g/cm^2</div><div><br></div><div>When I'm projecting density with density as weight, I would think I would then be doing:</div><div><br></div><div>(Density1**2 * L1 + Density2**2 * L2 +...)/(Density1 + Density2 + ...) =  units of g/cm^2</div>
<div><br></div><div>But according to Sam, the units of weighted should be g/cm^3, where the role of v and w is switched.  "v": O(Density) is the value, and "w": O(Density)*O(L) is the weight.  And thus we get a projection weighted Density cell value in units of g/cm^3 instead of g/cm^2.  Shouldn't the weighting not change the units, or am I confusing projection weighted density with density weighted projection?</div>
<div><br></div><div>I've never done unweighted projections, so I kept using the units of the field (g/cm^3 in case of Density), those units seems right or have I been wrong all along?</div><div><br></div><div>From</div>
<div>G.S.</div><div><br></div><br><div class="gmail_quote">On Mon, Jun 11, 2012 at 1:32 PM, Sam Skillman <span dir="ltr"><<a href="mailto:samskillman@gmail.com" target="_blank">samskillman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Geoffrey, if it helps, in the continuum limit, a weighted projection along the z direction is (v is the field, w is the weight):</div>
<img alt="Inline image 1"><br><div>whereas unweighted is:</div>


<div><img alt="Inline image 4"><br>
For your example, the order of magnitude of your result would be O(density)**2*O(L)/O(density)*O(L) = O(density) for the weighted projection.  The unweighted is just O(density)*O(L).</div><span class="HOEnZb"><font color="#888888"><div>
<br></div></font></span><div><span class="HOEnZb"><font color="#888888">Sam</font></span><div><div class="h5"><br><br><div class="gmail_quote">



On Mon, Jun 11, 2012 at 2:12 PM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




Hi Geoffrey,<br>
<div><div><br>
On Mon, Jun 11, 2012 at 4:10 PM, Geoffrey So <<a href="mailto:gsiisg@gmail.com" target="_blank">gsiisg@gmail.com</a>> wrote:<br>
> Hi, sorry for asking a dumb question, but when I do a projection of density<br>
><br>
> field = "Density"<br>
> proj = pf.h.proj(direction, field, weight_field=field)<br>
><br>
> the numbers I get are ~1e-28<br>
><br>
> but when I do<br>
> proj = pf.h.proj(direction, field, weight_field=None)<br>
><br>
> the numbers become ~1e-4<br>
><br>
> this is a 64 cube simulation, if I were to multiply 64 * 1e-28 for a<br>
> projection with no weighting, shouldn't I still get numbers on the order of<br>
> 1e-26 or 1e-27?  I'm guessing there's something I've misunderstood about<br>
> pf.h.proj.  Am I missing like a CGS conversion factor when I don't weight it<br>
> by some field?<br>
<br>
</div></div>Nope, weighting means to take the average with respect to some other<br>
field.  So when you don't weight it, you don't take an average, you<br>
get a line integral.  It's probably different by a factor of roughly<br>
the same OOM as the number of centimeters your box is across.<br>
<br>
-Matt<br>
<br>
><br>
> From<br>
> G.S.<br>
><br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br>


!DSPAM:10175,4fd662c1169022337211186!
_______________________________________________<br>yt-users mailing list<br><a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org<br><br><br>!DSPAM:10175,4fd662c1169022337211186!<br></blockquote></div><br></body></html>