Skip to content

Commit

Permalink
Merge pull request #118 from computational-psychology/fix/whites_targets
Browse files Browse the repository at this point in the history
fix(whites): enable specifying either 1, or multiple target indices
  • Loading branch information
LynnSchmittwilken authored Jan 2, 2024
2 parents 3cba67d + ba552b9 commit 8ec7d6e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stimupy/stimuli/whites.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ def generalized(
target_bar_mask = mask_targets(
element_mask=stim["grating_mask"], target_indices=target_indices
)
if isinstance(target_indices, (int, float)):
target_indices = (target_indices,)
stim["target_indices"] = target_indices

# Mask rectangular regions
Expand Down

0 comments on commit 8ec7d6e

Please sign in to comment.