Skip to content

Commit

Permalink
Set data type to 32-bit float for background corrections (#145)
Browse files Browse the repository at this point in the history
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
  • Loading branch information
hakonanes committed Feb 11, 2020
1 parent 888a1d5 commit 5f87b5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kikuchipy/signals/ebsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def static_background_correction(
f"Pattern {pat_shape} and static background {bg_shape} shapes "
"are not identical."
)
dtype = np.int16
dtype = np.float32
static_bg = static_bg.astype(dtype)

# Get min./max. input patterns intensity after correction
Expand Down Expand Up @@ -494,7 +494,7 @@ def dynamic_background_correction(self, operation="subtract", sigma=None):
"""

dtype_out = self.data.dtype.type
dtype = np.int16
dtype = np.float32

# Create dask array of signal patterns and do processing on this
dask_array = kp.util.dask._get_dask_array(signal=self, dtype=dtype)
Expand Down

0 comments on commit 5f87b5b

Please sign in to comment.