Skip to content

Commit

Permalink
fixed small bug that mask was not int
Browse files Browse the repository at this point in the history
  • Loading branch information
LynnSchmittwilken committed Dec 12, 2022
1 parent d636569 commit 5572ac9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions stimuli/illusions/benary_cross.py
Expand Up @@ -159,7 +159,9 @@ def benarys_cross_generalized(
img = img[0 : int(visual_size[0] * ppd), 0 : int(visual_size[1] * ppd)]
mask = mask[0 : int(visual_size[0] * ppd), 0 : int(visual_size[1] * ppd)]

params = {
stim = {
"img": img,
"mask": mask.astype(int),
"shape": img.shape,
"visual_size": np.array(img.shape) / ppd,
"ppd": ppd,
Expand All @@ -174,7 +176,7 @@ def benarys_cross_generalized(
"intensity_target": intensity_target,
}

return {"img": img, "mask": mask.astype(int), **params}
return stim


def benarys_cross_rectangles(
Expand Down Expand Up @@ -468,7 +470,9 @@ def todorovic_benary_generalized(
tx[i] : tx[i] + tpatch.shape[1],
] = mpatch

params = {
stim = {
"img": img,
"mask": mask.astype(int),
"shape": img.shape,
"visual_size": np.array(img.shape) / ppd,
"ppd": ppd,
Expand All @@ -483,7 +487,7 @@ def todorovic_benary_generalized(
"intensity_target": intensity_target,
}

return {"img": img, "mask": mask, **params}
return stim


def todorovic_benary_rectangles(
Expand Down

0 comments on commit 5572ac9

Please sign in to comment.