Skip to content

Commit

Permalink
fixed HURA alignment so that center is now true
Browse files Browse the repository at this point in the history
  • Loading branch information
bpops committed Aug 2, 2023
1 parent b88b2f0 commit aac0371
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 16 deletions.
8 changes: 6 additions & 2 deletions codedapertures/codedapertures.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,9 @@ def __init__(self, rank=4, r=5, radius=5, quiet=False):
self.l = np.zeros((self.rx,self.ry), dtype=np.int16)
for i in range(self.rx):
for j in range(self.ry):
self.l[i,j] = (i + r*j) % self.v
i_idx = i - self.radius
j_idx = j - self.radius
self.l[i,j] = (i_idx + self.r*j_idx) % self.v

# calculate mask
self.mask = np.zeros(self.l.shape, dtype=np.int16)
Expand Down Expand Up @@ -656,7 +658,9 @@ def __init__(self, rank=4, radius=5, quiet=False):
self.l = np.zeros((self.rx,self.ry), dtype=np.int16)
for i in range(self.rx):
for j in range(self.ry):
self.l[i,j] = (i + self.r*j) % self.v
i_idx = i - self.radius
j_idx = j - self.radius
self.l[i,j] = (i_idx + self.r*j_idx) % self.v

# calculate mask
self.mask = np.zeros(self.l.shape, dtype=np.int16)
Expand Down
Loading

0 comments on commit aac0371

Please sign in to comment.