Skip to content

Commit

Permalink
fix: added relevant error message in todorovic
Browse files Browse the repository at this point in the history
  • Loading branch information
LynnSchmittwilken committed May 16, 2023
1 parent fba7785 commit 0cb7f88
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stimupy/stimuli/todorovics.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,11 @@ def cross_generalized(
raise ValueError("Need as many x- as y-coordinates")
if isinstance(covers_size, (float, int)):
covers_size = (covers_size, covers_size)
if isinstance(cross_size, (float, int)):
cross_size = (cross_size, cross_size)

if cross_size[0] < cross_thickness or cross_size[1] < cross_thickness:
raise ValueError("cross_size needs to be larger than cross_thickness")

stim = cross_shape(
visual_size=cross_size,
Expand Down

0 comments on commit 0cb7f88

Please sign in to comment.