@@ -263,7 +263,7 @@ def _ellip(self, xp=np):
263263 return xp .min (xp .array ([ellip , MAX_ELLIP ]))
264264
265265 @aa .grid_dec .to_vector_yx
266- @aa .grid_dec .transform
266+ @aa .grid_dec .transform ( rotate_back = True )
267267 def deflections_yx_2d_from (self , grid : aa .type .Grid2DLike , xp = np , ** kwargs ):
268268 """
269269 Calculate the deflection angles on a grid of (y,x) arc-second coordinates.
@@ -283,12 +283,7 @@ def deflections_yx_2d_from(self, grid: aa.type.Grid2DLike, xp=np, **kwargs):
283283 deflection_x = zis .real
284284 deflection_y = zis .imag
285285
286- # And here we convert back to the real axes
287- return self .rotated_grid_from_reference_frame_from (
288- grid = xp .multiply (factor , xp .vstack ((deflection_y , deflection_x )).T ),
289- xp = xp ,
290- ** kwargs ,
291- )
286+ return xp .multiply (factor , xp .vstack ((deflection_y , deflection_x )).T )
292287
293288 def _convergence (self , radii , xp = np ):
294289
@@ -418,7 +413,7 @@ def _ellip(self, xp=np):
418413 return xp .min (xp .array ([ellip , MAX_ELLIP ]))
419414
420415 @aa .grid_dec .to_vector_yx
421- @aa .grid_dec .transform
416+ @aa .grid_dec .transform ( rotate_back = True )
422417 def deflections_yx_2d_from (self , grid : aa .type .Grid2DLike , xp = np , ** kwargs ):
423418 """
424419 Calculate the deflection angles on a grid of (y,x) arc-second coordinates.
@@ -443,12 +438,7 @@ def deflections_yx_2d_from(self, grid: aa.type.Grid2DLike, xp=np, **kwargs):
443438 deflection_x = zis .real
444439 deflection_y = zis .imag
445440
446- # And here we convert back to the real axes
447- return self .rotated_grid_from_reference_frame_from (
448- grid = xp .multiply (factor , xp .vstack ((deflection_y , deflection_x )).T ),
449- xp = xp ,
450- ** kwargs ,
451- )
441+ return xp .multiply (factor , xp .vstack ((deflection_y , deflection_x )).T )
452442
453443 def _convergence (self , radii , xp = np ):
454444
@@ -594,7 +584,7 @@ def __init__(
594584 self .b0 = b0
595585
596586 @aa .grid_dec .to_vector_yx
597- @aa .grid_dec .transform
587+ @aa .grid_dec .transform ( rotate_back = True )
598588 def deflections_yx_2d_from (self , grid : aa .type .Grid2DLike , xp = np , ** kwargs ):
599589 """
600590 Calculate the deflection angles on a grid of (y,x) arc-second coordinates.
@@ -627,12 +617,7 @@ def deflections_yx_2d_from(self, grid: aa.type.Grid2DLike, xp=np, **kwargs):
627617 deflection_x = grid .array [:, 1 ] * factor
628618 deflection_y = grid .array [:, 0 ] * factor
629619
630- # And here we convert back to the real axes
631- return self .rotated_grid_from_reference_frame_from (
632- grid = xp .multiply (1.0 , xp .vstack ((deflection_y , deflection_x )).T ),
633- xp = xp ,
634- ** kwargs ,
635- )
620+ return xp .vstack ((deflection_y , deflection_x )).T
636621
637622 @aa .grid_dec .to_array
638623 @aa .grid_dec .transform
0 commit comments