Skip to content

Commit

Permalink
Merge pull request #76 from abel-research/aopFixes
Browse files Browse the repository at this point in the history
Removed zipper effect on aop save due to poor interpolation
  • Loading branch information
JoshuaSteer committed Nov 1, 2022
2 parents 7a3d5f8 + 8277739 commit 8bf7184
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ampscan/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,12 +755,14 @@ def save_aop(self, filename, slices=100, spokes=72, sliceInterval = None, spokeI
z = slices[i] - minSl
rPoly = ((x ** 2) + (y ** 2)) ** 0.5
tPoly = np.rad2deg(np.arctan2(y, x))
tPoly[tPoly < -90] += 360
# Increase range for interpolation
idx = tPoly < 0
rPoly = np.append(rPoly, rPoly[idx])
tPoly = np.append(tPoly, tPoly[idx] + 360)
# Sort by angle
idx = np.argsort(tPoly)
rPoly = rPoly[idx]
np.append(rPoly, rPoly[0])
tPoly = tPoly[idx]
np.append(tPoly, 270)
rs = np.interp(spokes, tPoly, rPoly)
rs = np.flip(rs)
for j, r in enumerate(rs):
Expand Down

0 comments on commit 8bf7184

Please sign in to comment.