Skip to content

Commit

Permalink
refactor: rename mask_elements -> mask_regions
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisVincent committed Apr 3, 2023
1 parent 4f8a889 commit 090f0d7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions stimupy/components/__init__.py
Expand Up @@ -10,7 +10,7 @@
"plot_overview",
"image_base",
"draw_regions",
"mask_elements",
"mask_regions",
"overview",
"angulars",
"radials",
Expand Down Expand Up @@ -114,7 +114,7 @@ def image_base(visual_size=None, shape=None, ppd=None, rotation=0.0, origin="mea
}


def mask_elements(
def mask_regions(
distance_metric,
edges,
shape=None,
Expand Down Expand Up @@ -232,7 +232,7 @@ def overview(skip=False):
"plot_overview",
"draw_regions",
"image_base",
"mask_elements",
"mask_regions",
]:
continue

Expand Down
6 changes: 3 additions & 3 deletions stimupy/components/angulars.py
@@ -1,6 +1,6 @@
import numpy as np

from stimupy.components import draw_regions, mask_elements
from stimupy.components import draw_regions, mask_regions
from stimupy.components.radials import ring

__all__ = [
Expand Down Expand Up @@ -42,7 +42,7 @@ def mask_angle(
dict with boolean mask (key: bool_mask) for pixels falling in given angle,
and additional params
"""
stim = mask_elements(
stim = mask_regions(
edges=np.deg2rad(angles),
distance_metric="angular",
rotation=rotation,
Expand Down Expand Up @@ -175,7 +175,7 @@ def mask_segments(
mask with integer index for each segment (key: "wedge_mask"),
and additional keys containing stimulus parameters
"""
stim = mask_elements(
stim = mask_regions(
distance_metric="angular",
edges=np.deg2rad(edges),
rotation=rotation,
Expand Down
4 changes: 2 additions & 2 deletions stimupy/components/frames.py
@@ -1,6 +1,6 @@
import numpy as np

from stimupy.components import draw_regions, mask_elements
from stimupy.components import draw_regions, mask_regions

__all__ = [
"frames",
Expand Down Expand Up @@ -37,7 +37,7 @@ def mask_frames(
mask with integer index for each frame (key: "frame_mask"),
and additional keys containing stimulus parameters
"""
stim = mask_elements(
stim = mask_regions(
distance_metric="rectilinear",
edges=edges,
rotation=0.0,
Expand Down
4 changes: 2 additions & 2 deletions stimupy/components/radials.py
Expand Up @@ -2,7 +2,7 @@

import numpy as np

from stimupy.components import image_base, mask_elements
from stimupy.components import image_base, mask_regions
from stimupy.utils import resolution

__all__ = [
Expand Down Expand Up @@ -57,7 +57,7 @@ def mask_rings(
)

# Mark elements with integer idx-value
stim = mask_elements(
stim = mask_regions(
distance_metric="radial",
edges=radii,
rotation=0.0,
Expand Down

0 comments on commit 090f0d7

Please sign in to comment.