Skip to content

Commit 38fe2c1

Browse files
author
Niek Wielders
committed
multiplying with prefactor before vstack
1 parent a1f3604 commit 38fe2c1

File tree

1 file changed

+3
-1
lines changed
  • autogalaxy/profiles/mass/dark

1 file changed

+3
-1
lines changed

autogalaxy/profiles/mass/dark/nfw.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,15 @@ def deflections_2d_via_analytic_from(
8181
deflection_x = (x1 * ((x1**2 - e_hk24**2) * (1 - e_hk24**2) + x2**2 * (1 + e_hk24**2)) * nfw_hk24_util.small_f_1(x1, x2, e_hk24, xp=xp)
8282
+ x1 * (x1**2 + x2**2 - e_hk24**2) * nfw_hk24_util.small_f_2(x1, x2, e_hk24, xp=xp)
8383
- x2 * (x1**2 + x2**2 + e_hk24**2) * nfw_hk24_util.small_f_3(x1, x2, e_hk24, xp=xp))
84+
deflection_x *= prefactor
8485

8586
deflection_y = (x2 * (x1**2 * (1 - 2 * e_hk24**2) + x2**2 + e_hk24**2) * nfw_hk24_util.small_f_1(x1, x2, e_hk24, xp=xp)
8687
+ x2 * (x1**2 + x2**2 + e_hk24**2) * nfw_hk24_util.small_f_2(x1, x2, e_hk24, xp=xp)
8788
+ x1 * (x1**2 + x2**2 - e_hk24**2) * nfw_hk24_util.small_f_3(x1, x2, e_hk24, xp=xp))
89+
deflection_y *= prefactor
8890

8991
return self.rotated_grid_from_reference_frame_from(
90-
grid=xp.multiply(self.scale_radius, xp.multiply(prefactor, xp.vstack((deflection_y, deflection_x)).T)),
92+
xp.multiply(self.scale_radius, xp.vstack((deflection_y, deflection_x)).T),
9193
xp=xp,
9294
**kwargs,
9395
)

0 commit comments

Comments
 (0)