Hi, sorry for asking a dumb question, but when I do a projection of density
field = "Density" proj = pf.h.proj(direction, field, weight_field=field)
the numbers I get are ~1e-28
but when I do proj = pf.h.proj(direction, field, weight_field=None)
the numbers become ~1e-4
this is a 64 cube simulation, if I were to multiply 64 * 1e-28 for a projection with no weighting, shouldn't I still get numbers on the order of 1e-26 or 1e-27? I'm guessing there's something I've misunderstood about pf.h.proj. Am I missing like a CGS conversion factor when I don't weight it by some field?
From G.S.
Hi Geoffrey,
On Mon, Jun 11, 2012 at 4:10 PM, Geoffrey So gsiisg@gmail.com wrote:
Hi, sorry for asking a dumb question, but when I do a projection of density
field = "Density" proj = pf.h.proj(direction, field, weight_field=field)
the numbers I get are ~1e-28
but when I do proj = pf.h.proj(direction, field, weight_field=None)
the numbers become ~1e-4
this is a 64 cube simulation, if I were to multiply 64 * 1e-28 for a projection with no weighting, shouldn't I still get numbers on the order of 1e-26 or 1e-27? I'm guessing there's something I've misunderstood about pf.h.proj. Am I missing like a CGS conversion factor when I don't weight it by some field?
Nope, weighting means to take the average with respect to some other field. So when you don't weight it, you don't take an average, you get a line integral. It's probably different by a factor of roughly the same OOM as the number of centimeters your box is across.
-Matt
From G.S.
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Geoffrey, if it helps, in the continuum limit, a weighted projection along the z direction is (v is the field, w is the weight): [image: Inline image 1] whereas unweighted is: [image: Inline image 4] 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).
Sam
On Mon, Jun 11, 2012 at 2:12 PM, Matthew Turk matthewturk@gmail.com wrote:
Hi Geoffrey,
On Mon, Jun 11, 2012 at 4:10 PM, Geoffrey So gsiisg@gmail.com wrote:
Hi, sorry for asking a dumb question, but when I do a projection of
density
field = "Density" proj = pf.h.proj(direction, field, weight_field=field)
the numbers I get are ~1e-28
but when I do proj = pf.h.proj(direction, field, weight_field=None)
the numbers become ~1e-4
this is a 64 cube simulation, if I were to multiply 64 * 1e-28 for a projection with no weighting, shouldn't I still get numbers on the order
of
1e-26 or 1e-27? I'm guessing there's something I've misunderstood about pf.h.proj. Am I missing like a CGS conversion factor when I don't
weight it
by some field?
Nope, weighting means to take the average with respect to some other field. So when you don't weight it, you don't take an average, you get a line integral. It's probably different by a factor of roughly the same OOM as the number of centimeters your box is across.
-Matt
From G.S.
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Thanks for the explanations, but I think I'm still confused about something and want a bit more clarifications,
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:
Density1 * L1 + Density2 * L2 + ... = units of g/cm^2
When I'm projecting density with density as weight, I would think I would then be doing:
(Density1**2 * L1 + Density2**2 * L2 +...)/(Density1 + Density2 + ...) = units of g/cm^2
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?
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?
From G.S.
On Mon, Jun 11, 2012 at 1:32 PM, Sam Skillman samskillman@gmail.com wrote:
Geoffrey, if it helps, in the continuum limit, a weighted projection along the z direction is (v is the field, w is the weight): [image: Inline image 1] whereas unweighted is: [image: Inline image 4] 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).
Sam
On Mon, Jun 11, 2012 at 2:12 PM, Matthew Turk matthewturk@gmail.comwrote:
Hi Geoffrey,
On Mon, Jun 11, 2012 at 4:10 PM, Geoffrey So gsiisg@gmail.com wrote:
Hi, sorry for asking a dumb question, but when I do a projection of
density
field = "Density" proj = pf.h.proj(direction, field, weight_field=field)
the numbers I get are ~1e-28
but when I do proj = pf.h.proj(direction, field, weight_field=None)
the numbers become ~1e-4
this is a 64 cube simulation, if I were to multiply 64 * 1e-28 for a projection with no weighting, shouldn't I still get numbers on the
order of
1e-26 or 1e-27? I'm guessing there's something I've misunderstood about pf.h.proj. Am I missing like a CGS conversion factor when I don't
weight it
by some field?
Nope, weighting means to take the average with respect to some other field. So when you don't weight it, you don't take an average, you get a line integral. It's probably different by a factor of roughly the same OOM as the number of centimeters your box is across.
-Matt
From G.S.
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Geoffrey,
Well, if you look at Sam's formula and convert it into the discrete version, what you're really doing is:
(Density1**2 * L1 + Density2**2 * L2 +...)/(Density1*L1 + Density2*L2 + ...) = units of g/cm^3
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.
Hope that helped,
Nathan Goldbaum Graduate Student Astronomy & Astrophysics, UCSC goldbaum@ucolick.org http://www.ucolick.org/%7Egoldbaum
On Jun 11, 2012, at 2:27 PM, Geoffrey So wrote:
Thanks for the explanations, but I think I'm still confused about something and want a bit more clarifications,
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:
Density1 * L1 + Density2 * L2 + ... = units of g/cm^2
When I'm projecting density with density as weight, I would think I would then be doing:
(Density1**2 * L1 + Density2**2 * L2 +...)/(Density1 + Density2 + ...) = units of g/cm^2
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?
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?
From G.S.
On Mon, Jun 11, 2012 at 1:32 PM, Sam Skillman samskillman@gmail.com wrote: Geoffrey, if it helps, in the continuum limit, a weighted projection along the z direction is (v is the field, w is the weight):
whereas unweighted is:
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).
Sam
On Mon, Jun 11, 2012 at 2:12 PM, Matthew Turk matthewturk@gmail.com wrote: Hi Geoffrey,
On Mon, Jun 11, 2012 at 4:10 PM, Geoffrey So gsiisg@gmail.com wrote:
Hi, sorry for asking a dumb question, but when I do a projection of density
field = "Density" proj = pf.h.proj(direction, field, weight_field=field)
the numbers I get are ~1e-28
but when I do proj = pf.h.proj(direction, field, weight_field=None)
the numbers become ~1e-4
this is a 64 cube simulation, if I were to multiply 64 * 1e-28 for a projection with no weighting, shouldn't I still get numbers on the order of 1e-26 or 1e-27? I'm guessing there's something I've misunderstood about pf.h.proj. Am I missing like a CGS conversion factor when I don't weight it by some field?
Nope, weighting means to take the average with respect to some other field. So when you don't weight it, you don't take an average, you get a line integral. It's probably different by a factor of roughly the same OOM as the number of centimeters your box is across.
-Matt
From G.S.
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
!DSPAM:10175,4fd662c1169022337211186! _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
!DSPAM:10175,4fd662c1169022337211186!
So the weighted projection of density would use "density" as the value and "density * L" as the weight, and return units of Density?
From G.S.
On Mon, Jun 11, 2012 at 2:30 PM, Nathan Goldbaum goldbaum@ucolick.orgwrote:
Hi Geoffrey,
Well, if you look at Sam's formula and convert it into the discrete version, what you're really doing is:
(Density1**2 * L1 + Density2**2 * L2 +...)/(Density1*L1 + Density2*L2 + ...) = units of g/cm^3
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.
Hope that helped,
Nathan Goldbaum Graduate Student Astronomy & Astrophysics, UCSC goldbaum@ucolick.org http://www.ucolick.org/%7Egoldbaum
On Jun 11, 2012, at 2:27 PM, Geoffrey So wrote:
Thanks for the explanations, but I think I'm still confused about something and want a bit more clarifications,
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:
Density1 * L1 + Density2 * L2 + ... = units of g/cm^2
When I'm projecting density with density as weight, I would think I would then be doing:
(Density1**2 * L1 + Density2**2 * L2 +...)/(Density1 + Density2 + ...) = units of g/cm^2
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?
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?
From G.S.
On Mon, Jun 11, 2012 at 1:32 PM, Sam Skillman samskillman@gmail.comwrote:
Geoffrey, if it helps, in the continuum limit, a weighted projection along the z direction is (v is the field, w is the weight): [image: Inline image 1] whereas unweighted is: [image: Inline image 4] 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).
Sam
On Mon, Jun 11, 2012 at 2:12 PM, Matthew Turk matthewturk@gmail.comwrote:
Hi Geoffrey,
On Mon, Jun 11, 2012 at 4:10 PM, Geoffrey So gsiisg@gmail.com wrote:
Hi, sorry for asking a dumb question, but when I do a projection of
density
field = "Density" proj = pf.h.proj(direction, field, weight_field=field)
the numbers I get are ~1e-28
but when I do proj = pf.h.proj(direction, field, weight_field=None)
the numbers become ~1e-4
this is a 64 cube simulation, if I were to multiply 64 * 1e-28 for a projection with no weighting, shouldn't I still get numbers on the
order of
1e-26 or 1e-27? I'm guessing there's something I've misunderstood
about
pf.h.proj. Am I missing like a CGS conversion factor when I don't
weight it
by some field?
Nope, weighting means to take the average with respect to some other field. So when you don't weight it, you don't take an average, you get a line integral. It's probably different by a factor of roughly the same OOM as the number of centimeters your box is across.
-Matt
From G.S.
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
!DSPAM:10175,4fd662c1169022337211186! _______________________________________________
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
!DSPAM:10175,4fd662c1169022337211186!
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Yes, that's right. For myself, I prefer to weigh density by volume or by "ones", depending on the situation.
On Jun 11, 2012, at 5:32 PM, Geoffrey So wrote:
So the weighted projection of density would use "density" as the value and "density * L" as the weight, and return units of Density?
From G.S.
On Mon, Jun 11, 2012 at 2:30 PM, Nathan Goldbaum goldbaum@ucolick.org wrote: Hi Geoffrey,
Well, if you look at Sam's formula and convert it into the discrete version, what you're really doing is:
(Density1**2 * L1 + Density2**2 * L2 +...)/(Density1*L1 + Density2*L2 + ...) = units of g/cm^3
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.
Hope that helped,
Nathan Goldbaum Graduate Student Astronomy & Astrophysics, UCSC goldbaum@ucolick.org http://www.ucolick.org/%7Egoldbaum
On Jun 11, 2012, at 2:27 PM, Geoffrey So wrote:
Thanks for the explanations, but I think I'm still confused about something and want a bit more clarifications,
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:
Density1 * L1 + Density2 * L2 + ... = units of g/cm^2
When I'm projecting density with density as weight, I would think I would then be doing:
(Density1**2 * L1 + Density2**2 * L2 +...)/(Density1 + Density2 + ...) = units of g/cm^2
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?
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?
From G.S.
On Mon, Jun 11, 2012 at 1:32 PM, Sam Skillman samskillman@gmail.com wrote: Geoffrey, if it helps, in the continuum limit, a weighted projection along the z direction is (v is the field, w is the weight):
whereas unweighted is:
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).
Sam
On Mon, Jun 11, 2012 at 2:12 PM, Matthew Turk matthewturk@gmail.com wrote: Hi Geoffrey,
On Mon, Jun 11, 2012 at 4:10 PM, Geoffrey So gsiisg@gmail.com wrote:
Hi, sorry for asking a dumb question, but when I do a projection of density
field = "Density" proj = pf.h.proj(direction, field, weight_field=field)
the numbers I get are ~1e-28
but when I do proj = pf.h.proj(direction, field, weight_field=None)
the numbers become ~1e-4
this is a 64 cube simulation, if I were to multiply 64 * 1e-28 for a projection with no weighting, shouldn't I still get numbers on the order of 1e-26 or 1e-27? I'm guessing there's something I've misunderstood about pf.h.proj. Am I missing like a CGS conversion factor when I don't weight it by some field?
Nope, weighting means to take the average with respect to some other field. So when you don't weight it, you don't take an average, you get a line integral. It's probably different by a factor of roughly the same OOM as the number of centimeters your box is across.
-Matt
From G.S.
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
!DSPAM:10175,4fd662c1169022337211186! _______________________________________________
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
!DSPAM:10175,4fd662c1169022337211186!
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Wait. No, I think the correct terminology is:
Density is the value (v). Density is the weight (w). L comes in through the dz.
The units of a density-weighted projection of density is density.
Sam
On Mon, Jun 11, 2012 at 3:36 PM, John ZuHone jzuhone@gmail.com wrote:
Yes, that's right. For myself, I prefer to weigh density by volume or by "ones", depending on the situation.
On Jun 11, 2012, at 5:32 PM, Geoffrey So wrote:
So the weighted projection of density would use "density" as the value and "density * L" as the weight, and return units of Density?
From G.S.
On Mon, Jun 11, 2012 at 2:30 PM, Nathan Goldbaum goldbaum@ucolick.orgwrote:
Hi Geoffrey,
Well, if you look at Sam's formula and convert it into the discrete version, what you're really doing is:
(Density1**2 * L1 + Density2**2 * L2 +...)/(Density1*L1 + Density2*L2 + ...) = units of g/cm^3
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.
Hope that helped,
Nathan Goldbaum Graduate Student Astronomy & Astrophysics, UCSC goldbaum@ucolick.org http://www.ucolick.org/%7Egoldbaum
On Jun 11, 2012, at 2:27 PM, Geoffrey So wrote:
Thanks for the explanations, but I think I'm still confused about something and want a bit more clarifications,
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:
Density1 * L1 + Density2 * L2 + ... = units of g/cm^2
When I'm projecting density with density as weight, I would think I would then be doing:
(Density1**2 * L1 + Density2**2 * L2 +...)/(Density1 + Density2 + ...) = units of g/cm^2
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?
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?
From G.S.
On Mon, Jun 11, 2012 at 1:32 PM, Sam Skillman samskillman@gmail.comwrote:
Geoffrey, if it helps, in the continuum limit, a weighted projection along the z direction is (v is the field, w is the weight): [image: Inline image 1] whereas unweighted is: [image: Inline image 4] 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).
Sam
On Mon, Jun 11, 2012 at 2:12 PM, Matthew Turk matthewturk@gmail.comwrote:
Hi Geoffrey,
On Mon, Jun 11, 2012 at 4:10 PM, Geoffrey So gsiisg@gmail.com wrote:
Hi, sorry for asking a dumb question, but when I do a projection of
density
field = "Density" proj = pf.h.proj(direction, field, weight_field=field)
the numbers I get are ~1e-28
but when I do proj = pf.h.proj(direction, field, weight_field=None)
the numbers become ~1e-4
this is a 64 cube simulation, if I were to multiply 64 * 1e-28 for a projection with no weighting, shouldn't I still get numbers on the
order of
1e-26 or 1e-27? I'm guessing there's something I've misunderstood
about
pf.h.proj. Am I missing like a CGS conversion factor when I don't
weight it
by some field?
Nope, weighting means to take the average with respect to some other field. So when you don't weight it, you don't take an average, you get a line integral. It's probably different by a factor of roughly the same OOM as the number of centimeters your box is across.
-Matt
From G.S.
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
!DSPAM:10175,4fd662c1169022337211186! _______________________________________________
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
!DSPAM:10175,4fd662c1169022337211186!
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Ugh, sorry about that.
On Jun 11, 2012, at 5:38 PM, Sam Skillman wrote:
Wait. No, I think the correct terminology is:
Density is the value (v). Density is the weight (w). L comes in through the dz.
The units of a density-weighted projection of density is density.
Sam
On Mon, Jun 11, 2012 at 3:36 PM, John ZuHone jzuhone@gmail.com wrote: Yes, that's right. For myself, I prefer to weigh density by volume or by "ones", depending on the situation.
On Jun 11, 2012, at 5:32 PM, Geoffrey So wrote:
So the weighted projection of density would use "density" as the value and "density * L" as the weight, and return units of Density?
From G.S.
On Mon, Jun 11, 2012 at 2:30 PM, Nathan Goldbaum goldbaum@ucolick.org wrote: Hi Geoffrey,
Well, if you look at Sam's formula and convert it into the discrete version, what you're really doing is:
(Density1**2 * L1 + Density2**2 * L2 +...)/(Density1*L1 + Density2*L2 + ...) = units of g/cm^3
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.
Hope that helped,
Nathan Goldbaum Graduate Student Astronomy & Astrophysics, UCSC goldbaum@ucolick.org http://www.ucolick.org/%7Egoldbaum
On Jun 11, 2012, at 2:27 PM, Geoffrey So wrote:
Thanks for the explanations, but I think I'm still confused about something and want a bit more clarifications,
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:
Density1 * L1 + Density2 * L2 + ... = units of g/cm^2
When I'm projecting density with density as weight, I would think I would then be doing:
(Density1**2 * L1 + Density2**2 * L2 +...)/(Density1 + Density2 + ...) = units of g/cm^2
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?
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?
From G.S.
On Mon, Jun 11, 2012 at 1:32 PM, Sam Skillman samskillman@gmail.com wrote: Geoffrey, if it helps, in the continuum limit, a weighted projection along the z direction is (v is the field, w is the weight):
whereas unweighted is:
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).
Sam
On Mon, Jun 11, 2012 at 2:12 PM, Matthew Turk matthewturk@gmail.com wrote: Hi Geoffrey,
On Mon, Jun 11, 2012 at 4:10 PM, Geoffrey So gsiisg@gmail.com wrote:
Hi, sorry for asking a dumb question, but when I do a projection of density
field = "Density" proj = pf.h.proj(direction, field, weight_field=field)
the numbers I get are ~1e-28
but when I do proj = pf.h.proj(direction, field, weight_field=None)
the numbers become ~1e-4
this is a 64 cube simulation, if I were to multiply 64 * 1e-28 for a projection with no weighting, shouldn't I still get numbers on the order of 1e-26 or 1e-27? I'm guessing there's something I've misunderstood about pf.h.proj. Am I missing like a CGS conversion factor when I don't weight it by some field?
Nope, weighting means to take the average with respect to some other field. So when you don't weight it, you don't take an average, you get a line integral. It's probably different by a factor of roughly the same OOM as the number of centimeters your box is across.
-Matt
From G.S.
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
!DSPAM:10175,4fd662c1169022337211186! _______________________________________________
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
!DSPAM:10175,4fd662c1169022337211186!
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
If you want the average density along the line of sight you could use the weight field "Ones", which would simply integrate the density as without a weight and divide it by the total path length.
Of course, it would be even simpler if you took the unweighted projection and divided it by the path length, as I just realized while writing this response. :)
On Jun 11, 2012, at 5:27 PM, Geoffrey So wrote:
Thanks for the explanations, but I think I'm still confused about something and want a bit more clarifications,
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:
Density1 * L1 + Density2 * L2 + ... = units of g/cm^2
When I'm projecting density with density as weight, I would think I would then be doing:
(Density1**2 * L1 + Density2**2 * L2 +...)/(Density1 + Density2 + ...) = units of g/cm^2
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?
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?
From G.S.
On Mon, Jun 11, 2012 at 1:32 PM, Sam Skillman samskillman@gmail.com wrote: Geoffrey, if it helps, in the continuum limit, a weighted projection along the z direction is (v is the field, w is the weight):
whereas unweighted is:
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).
Sam
On Mon, Jun 11, 2012 at 2:12 PM, Matthew Turk matthewturk@gmail.com wrote: Hi Geoffrey,
On Mon, Jun 11, 2012 at 4:10 PM, Geoffrey So gsiisg@gmail.com wrote:
Hi, sorry for asking a dumb question, but when I do a projection of density
field = "Density" proj = pf.h.proj(direction, field, weight_field=field)
the numbers I get are ~1e-28
but when I do proj = pf.h.proj(direction, field, weight_field=None)
the numbers become ~1e-4
this is a 64 cube simulation, if I were to multiply 64 * 1e-28 for a projection with no weighting, shouldn't I still get numbers on the order of 1e-26 or 1e-27? I'm guessing there's something I've misunderstood about pf.h.proj. Am I missing like a CGS conversion factor when I don't weight it by some field?
Nope, weighting means to take the average with respect to some other field. So when you don't weight it, you don't take an average, you get a line integral. It's probably different by a factor of roughly the same OOM as the number of centimeters your box is across.
-Matt
From G.S.
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org