Skip to content

Commit

Permalink
Fix default value. Refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
dedean16 committed Nov 15, 2024
1 parent fff52c6 commit 4c4ed38
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions openwfs/calibration/fringe_analysis_slm_calibrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4c4ed38

Please sign in to comment.