Skip to content

Commit

Permalink
Fix PR feeedback
Browse files Browse the repository at this point in the history
  • Loading branch information
viljarjf committed Apr 21, 2024
1 parent ae8be66 commit 58baa3a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pyxem/signals/polar_diffraction2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def subtract_diffraction_background(
For 'radial median' no extra parameters are necessary.
For 'radial percentile' the 'percentile' argument decides
For 'radial percentile' the 'percentile' argument decides
which percentile to substract.
**kwargs :
To be passed to the chosen method.
Expand All @@ -296,7 +296,13 @@ def subtract_diffraction_background(
)
subtraction_function = method_dict[method]

return self.map(subtraction_function, inplace=inplace, **kwargs)
return self.map(
subtraction_function,
inplace=inplace,
output_dtype=self.data.dtype,
output_signal_size=self.axes_manager._signal_shape_in_array,
**kwargs,
)


class LazyPolarDiffraction2D(LazySignal, PolarDiffraction2D):
Expand Down

0 comments on commit 58baa3a

Please sign in to comment.