From 4c4ed3866583358a186138896aa9d484aa1f49ee Mon Sep 17 00:00:00 2001 From: Daniel Cox Date: Fri, 15 Nov 2024 15:58:11 +0100 Subject: [PATCH] Fix default value. Refactor. --- openwfs/calibration/fringe_analysis_slm_calibrator.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openwfs/calibration/fringe_analysis_slm_calibrator.py b/openwfs/calibration/fringe_analysis_slm_calibrator.py index 0230c04..b8cc800 100644 --- a/openwfs/calibration/fringe_analysis_slm_calibrator.py +++ b/openwfs/calibration/fringe_analysis_slm_calibrator.py @@ -65,7 +65,7 @@ def __init__( self.reference_slices = reference_slices if gray_values is None: - self.gray_values = np.arange(0, 255) + self.gray_values = np.arange(0, 256) else: self.gray_values = gray_values @@ -98,10 +98,10 @@ def analyze(self, frames): @staticmethod def get_dominant_frequency(fft_data, dc_skip): - fft_data[..., :dc_skip, :dc_skip] = 0 # Remove DC peak - fft_data[..., :dc_skip, -dc_skip:] = 0 # Remove DC peak - fft_data[..., -dc_skip:, -dc_skip:] = 0 # Remove DC peak - fft_data[..., -dc_skip:, :dc_skip] = 0 # Remove DC peak + fft_data[..., :dc_skip, :dc_skip] = 0 # Remove DC peak + fft_data[..., :dc_skip, -dc_skip:] = 0 # Remove DC peak + fft_data[..., -dc_skip:, -dc_skip:] = 0 # Remove DC peak + fft_data[..., -dc_skip:, :dc_skip] = 0 # Remove DC peak # Find the index of the maximum value along the last axis s = fft_data.shape