Skip to content

Commit

Permalink
Merge pull request #123 from computational-psychology/bugfix_cornswee…
Browse files Browse the repository at this point in the history
…t_edge

fix: cornsweet edge intensity is now exactly as in intensity_edges
  • Loading branch information
JorisVincent authored Apr 23, 2024
2 parents a93fff7 + cc701a3 commit 9e8bbbb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stimupy/components/edges.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ def cornsweet(
dist = np.round(base["oblique"] / ramp_width, 6)
d1 = copy.deepcopy(dist)
d2 = copy.deepcopy(dist) * (-1)
d1 = d1 - np.abs(d1).min()
d2 = d2 - np.abs(d2).min()
d1[d1 < 0] = -1
d1[d1 > 1] = 1
d2[d2 < 0] = -1
Expand Down

0 comments on commit 9e8bbbb

Please sign in to comment.