Closed drphilmarshall closed 9 years ago
Hi Phil and Roger,
Roger's playing around with transforming the |alm|'s from |healpy.map2alm| into 3D potential, which you can see we've extracted here:
https://github.com/drphilmarshall/Music/blob/master/Planck_Demo.ipynb
Looks like the units are microkelvin, is that correct? Or are they delta T / T? It's also a bit odd how the imaginary parts of the |alm| coefficients are all exactly zero: is that something you get to choose? Or a bug somewhere? I double checked the |map2alm| outputs, they really do seem to be integer zero...
The units are indeed thermodynamic microkelvin, yes, not dT/T. However, the imaginary parts should not be all zero, no. Only the elements with m=0 should be zero, while all others should have equal variance in the real and imaginary part, both given by C_l/2. So if you're actually seeing zeros everywhere (not just for m=0), then you do have a bug, yes :-)
Hans Kristian
Many thanks, Hans Kristian. This is what we were expecting. Will try to locate bug. Best, Roger
On Aug 27, 2015, at 11:21 AM, Hans Kristian Eriksen notifications@github.com<mailto:notifications@github.com> wrote:
Hi Phil and Roger,
Roger's playing around with transforming the |alm|'s from |healpy.map2alm| into 3D potential, which you can see we've extracted here:
https://github.com/drphilmarshall/Music/blob/master/Planck_Demo.ipynb
Looks like the units are microkelvin, is that correct? Or are they delta T / T? It's also a bit odd how the imaginary parts of the |alm| coefficients are all exactly zero: is that something you get to choose? Or a bug somewhere? I double checked the |map2alm| outputs, they really do seem to be integer zero...
The units are indeed thermodynamic microkelvin, yes, not dT/T. However, the imaginary parts should not be all zero, no. Only the elements with m=0 should be zero, while all others should have equal variance in the real and imaginary part, both given by C_l/2. So if you're actually seeing zeros everywhere (not just for m=0), then you do have a bug, yes :-)
Hans Kristian
— Reply to this email directly or view it on GitHubhttps://github.com/rogerblandford/Music/issues/9#issuecomment-135513338.
Yes, thanks Hans Kristian! I'll point the healpy developers at this issue thread, if it's my misuse of their code they have probably seen it before, and if its a genuine bug they'll want to know about it!
On Thu, Aug 27, 2015 at 11:30 AM, Roger Blandford notifications@github.com wrote:
Many thanks, Hans Kristian. This is what we were expecting. Will try to locate bug. Best, Roger
On Aug 27, 2015, at 11:21 AM, Hans Kristian Eriksen < notifications@github.commailto:notifications@github.com> wrote:
Hi Phil and Roger,
Roger's playing around with transforming the |alm|'s from |healpy.map2alm| into 3D potential, which you can see we've extracted here:
https://github.com/drphilmarshall/Music/blob/master/Planck_Demo.ipynb
Looks like the units are microkelvin, is that correct? Or are they delta T / T? It's also a bit odd how the imaginary parts of the |alm| coefficients are all exactly zero: is that something you get to choose? Or a bug somewhere? I double checked the |map2alm| outputs, they really do seem to be integer zero...
The units are indeed thermodynamic microkelvin, yes, not dT/T. However, the imaginary parts should not be all zero, no. Only the elements with m=0 should be zero, while all others should have equal variance in the real and imaginary part, both given by C_l/2. So if you're actually seeing zeros everywhere (not just for m=0), then you do have a bug, yes :-)
Hans Kristian
— Reply to this email directly or view it on GitHub< https://github.com/rogerblandford/Music/issues/9#issuecomment-135513338>.
— Reply to this email directly or view it on GitHub https://github.com/rogerblandford/Music/issues/9#issuecomment-135515659.
OK, well, that was embarrassing - I have now implemented a get_alm
function that interprets the healpy
alm
array correctly, and now the imaginary parts look good.
elif m >= 0:
index = hp.Alm.getidx(self.lmax, l, m)
prefactor = 1.0
value = self.alm[index]
else:
index = hp.Alm.getidx(self.lmax, l, -m)
prefactor = -1.0**m
value = np.conjugate(self.alm[index])
return prefactor * value
I'm thinking this could be a nice addition to healpy
actually, for others who are trying to use the spherical harmonic components that healpy
produces. I'll suggest it, so that reading my issue won't be a total waste of their time!
Roger: look out for an email with new alm
s in it.
Hi @hke,
Roger's playing around with transforming the
alm
's fromhealpy.map2alm
into 3D potential, which you can see we've extracted here:https://github.com/drphilmarshall/Music/blob/master/Planck_Demo.ipynb
Looks like the units are microkelvin, is that correct? Or are they delta T / T? It's also a bit odd how the imaginary parts of the
alm
coefficients are all exactly zero: is that something you get to choose? Or a bug somewhere? I double checked themap2alm
outputs, they really do seem to be integer zero...Thanks!
Phil