Skip to content

Commit

Permalink
updated edges-demos (renamed functions, and added missing args)
Browse files Browse the repository at this point in the history
  • Loading branch information
LynnSchmittwilken committed Mar 27, 2023
1 parent de9c765 commit cd881f8
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions docs/reference/demos/components/edges.md
Expand Up @@ -29,10 +29,10 @@ from stimupy.utils import plot_stim
```

## Step edge
{py:func}`stimupy.components.edges.step_edge`
{py:func}`stimupy.components.edges.step`

```{code-cell} ipython3
from stimupy.components.edges import step_edge
from stimupy.components.edges import step
# Define widgets
w_height = iw.IntSlider(value=10, min=1, max=20, description="height [deg]")
Expand Down Expand Up @@ -62,7 +62,7 @@ def show_step_edge(
add_mask=False,
):
stim = step_edge(
stim = step(
visual_size=(height, width),
ppd=ppd,
rotation=rotation,
Expand All @@ -89,10 +89,10 @@ display(ui, out)
```

## Gaussian edge
{py:func}`stimupy.components.edges.gaussian_edge`
{py:func}`stimupy.components.edges.gaussian`

```{code-cell} ipython3
from stimupy.components.edges import gaussian_edge
from stimupy.components.edges import gaussian
# Define widgets
w_height = iw.IntSlider(value=10, min=1, max=20, description="height [deg]")
Expand Down Expand Up @@ -127,7 +127,7 @@ def show_gaussian_edge(
add_mask=False,
):
stim = gaussian_edge(
stim = gaussian(
visual_size=(height, width),
ppd=ppd,
sigma=sigma,
Expand Down Expand Up @@ -158,17 +158,18 @@ display(ui, out)
```

## Cornsweet edge
{py:func}`stimupy.components.edges.cornsweet_edge`
{py:func}`stimupy.components.edges.cornsweet`

```{code-cell} ipython3
from stimupy.components.edges import cornsweet_edge
from stimupy.components.edges import cornsweet
# Define widgets
w_height = iw.IntSlider(value=10, min=1, max=20, description="height [deg]")
w_width = iw.IntSlider(value=10, min=1, max=20, description="width [deg]")
w_ppd = iw.IntSlider(value=20, min=1, max=40, description="ppd")
w_ramp = iw.FloatSlider(value=2., min=0, max=4, description="ramp width [deg]")
w_exp = iw.FloatSlider(value=1., min=0, max=3, description="exponent")
w_rot = iw.IntSlider(value=0, min=0, max=360, description="rotation [deg]")
w_int1 = iw.FloatSlider(value=1., min=0, max=1, description="intensity1")
Expand All @@ -179,7 +180,7 @@ w_mask = iw.ToggleButton(value=False, disabled=False, description="add mask")
# Layout
b_im_size = iw.HBox([w_height, w_width, w_ppd])
b_geometry = iw.HBox([w_sigma, w_rot])
b_geometry = iw.HBox([w_ramp, w_exp, w_rot])
b_intensities = iw.HBox([w_int1, w_int2, w_int_back])
ui = iw.VBox([b_im_size, b_geometry, b_intensities, w_mask])
Expand All @@ -190,16 +191,18 @@ def show_cornsweet_edge(
ppd=None,
rotation=0,
ramp_width=None,
exponent=None,
intensity1=None,
intensity2=None,
intensity_plateau=None,
add_mask=False,
):
stim = cornsweet_edge(
stim = cornsweet(
visual_size=(height, width),
ppd=ppd,
ramp_width=ramp_width,
exponent=exponent,
rotation=rotation,
intensity_edges=(intensity1, intensity2),
intensity_plateau=intensity_plateau,
Expand All @@ -214,6 +217,7 @@ out = iw.interactive_output(
"width": w_width,
"ppd": w_ppd,
"ramp_width": w_ramp,
"exponent": w_exp,
"rotation": w_rot,
"intensity1": w_int1,
"intensity2": w_int2,
Expand Down

0 comments on commit cd881f8

Please sign in to comment.