Skip to content

Commit

Permalink
0-based grating_masks
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisVincent committed Mar 21, 2023
1 parent 29f14d9 commit 0b714cd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion stimupy/papers/domijan2015.py
Expand Up @@ -363,7 +363,7 @@ def grating(visual_size=VSIZES["grating"], ppd=PPD, shape=SHAPES["grating"]):
"visual_size": single_vissize,
"ppd": ppd,
"n_bars": 9,
"target_indices": (5,),
"target_indices": (4,),
"bar_width": 1.0 * visual_resize,
}

Expand Down
22 changes: 11 additions & 11 deletions stimupy/papers/white1981.py
Expand Up @@ -205,7 +205,7 @@ def grating_white_white(ppd=PPD):
"intensity_background": v3,
"intensity_bars": (v2, v3),
"intensity_target": v2,
"target_indices": (2, 4, 6, 8),
"target_indices": (1, 3, 5, 7),
}
stim = illusions.gratings.uniform(**params)
stim["target_mask"] = np.where(stim["target_mask"] != 0, 1, 0)
Expand Down Expand Up @@ -248,7 +248,7 @@ def grating_white_black(ppd=PPD):
"intensity_background": v1,
"intensity_bars": (v2, v3),
"intensity_target": v2,
"target_indices": (2, 4, 6, 8),
"target_indices": (1, 3, 5, 7),
}
stim = illusions.gratings.uniform(**params)
stim["target_mask"] = np.where(stim["target_mask"] != 0, 1, 0)
Expand Down Expand Up @@ -291,7 +291,7 @@ def grating_black_white(ppd=PPD):
"intensity_background": v3,
"intensity_bars": (v2, v1),
"intensity_target": v2,
"target_indices": (2, 4, 6, 8),
"target_indices": (1, 3, 5, 7),
}
stim = illusions.gratings.uniform(**params)
stim["target_mask"] = np.where(stim["target_mask"] != 0, 1, 0)
Expand Down Expand Up @@ -334,7 +334,7 @@ def grating_black_black(ppd=PPD):
"intensity_background": v1,
"intensity_bars": (v2, v1),
"intensity_target": v2,
"target_indices": (2, 4, 6, 8),
"target_indices": (1, 3, 5, 7),
}
stim = illusions.gratings.uniform(**params)
stim["target_mask"] = np.where(stim["target_mask"] != 0, 1, 0)
Expand Down Expand Up @@ -375,14 +375,14 @@ def grating_white_in(ppd=PPD):
"rotation": ORIENTATION,
"intensity_bars": (v1, v3),
"intensity_target": v2,
"target_indices": (2, 4, 6, 8),
"target_indices": (1, 3, 5, 7),
}
large_params = {
"bar_width": bar_width,
"visual_size": 51 * bar_width,
"ppd": ppd,
"rotation": ORIENTATION,
"intensity_bars": (v3, v1),
"intensity_bars": (v1, v3),
}
stim = illusions.gratings.grating(
small_grating_params=small_params,
Expand Down Expand Up @@ -427,7 +427,7 @@ def grating_black_in(ppd=PPD):
"rotation": ORIENTATION,
"intensity_bars": (v3, v1),
"intensity_target": v2,
"target_indices": (2, 4, 6, 8),
"target_indices": (1, 3, 5, 7),
}
large_params = {
"bar_width": bar_width,
Expand Down Expand Up @@ -479,7 +479,7 @@ def grating_white_out(ppd=PPD):
"rotation": ORIENTATION,
"intensity_bars": (v1, v3),
"intensity_target": v2,
"target_indices": (24, 26, 28, 30),
"target_indices": (23, 25, 27, 29),
}
large_params = {
"bar_width": bar_width,
Expand Down Expand Up @@ -531,7 +531,7 @@ def grating_black_out(ppd=PPD):
"rotation": ORIENTATION,
"intensity_bars": (v3, v1),
"intensity_target": v2,
"target_indices": (24, 26, 28, 30),
"target_indices": (23, 25, 27, 29),
}
large_params = {
"bar_width": bar_width,
Expand Down Expand Up @@ -583,7 +583,7 @@ def grating_white_orthogonal(ppd=PPD):
"rotation": ORIENTATION + 90,
"intensity_bars": (v1, v3),
"intensity_target": v2,
"target_indices": (2, 4, 6, 8),
"target_indices": (1, 3, 5, 7),
}
large_params = {
"bar_width": bar_width,
Expand Down Expand Up @@ -637,7 +637,7 @@ def grating_black_orthogonal(ppd=PPD):
"rotation": ORIENTATION + 90,
"intensity_bars": (v3, v1),
"intensity_target": v2,
"target_indices": (2, 4, 6, 8),
"target_indices": (1, 3, 5, 7),
}
large_params = {
"bar_width": bar_width,
Expand Down

0 comments on commit 0b714cd

Please sign in to comment.