Skip to content

Commit

Permalink
fixed max amplitude
Browse files Browse the repository at this point in the history
  • Loading branch information
zonca committed Jun 17, 2011
1 parent f41fc82 commit 2ea82b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Expand Up @@ -176,7 +176,7 @@ def get(self, ch, vec, maximum=False):
beta = vel / physcon.c
gamma=1/np.sqrt(1-beta**2)
if maximum:
cosdir = 0
cosdir = 1
else:
cosdir = qarray.arraylist_dot(qarray.norm(self.satellite_v), vec).flatten()
T_dipole_CMB = T_CMB / (gamma * ( 1 - beta * cosdir ))
Expand Down
4 changes: 2 additions & 2 deletions test_beamconvdipole.py
Expand Up @@ -22,7 +22,7 @@
theta_dip, phi_dip = dip.get_theta_phi_dip(satellite_v) # 1.75322403 3.01457638

# max dipole amplitude
Dmax = np.abs(dip.get(ch, None, maximum=True)[0]) # 2.4341368325409007e-06
Dmax = np.abs(dip.get(ch, None, maximum=True)[0]) # 0.0036446949082749036

theta_bar, psi_bar = dip.get_psi_theta_bar(theta_dip, phi_dip, theta, phi) # 0.19149457 0.85664949

Expand All @@ -35,4 +35,4 @@
np.cos(m_b * (psi_bar - psi)) * ch.get_beam_real(m_b) -
np.sin(m_b * (psi_bar - psi)) * ch.get_beam_imag(m_b)
)
dip *= np.sqrt(4*np.pi/3) * Dmax # (18) # 1.19476726e-06 WRONG!!
dip *= np.sqrt(4*np.pi/3) * Dmax # (18) # 0.00178896 WRONG

0 comments on commit 2ea82b5

Please sign in to comment.