Skip to content

Commit

Permalink
Docs: Fix and unify toplines in docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisVincent committed Mar 15, 2023
1 parent ebf1cde commit cdb7ebb
Show file tree
Hide file tree
Showing 20 changed files with 50 additions and 95 deletions.
3 changes: 1 addition & 2 deletions stimupy/components/edges.py
Expand Up @@ -136,8 +136,7 @@ def cornsweet_edge(
intensity_plateau=0.5,
exponent=2.75,
):
"""
Create a matrix containing a rectangular Cornsweet edge stimulus.
"""Draw rectangular Cornsweet edge stimulus.
The 2D luminance profile of the stimulus is defined as
Left side:
v = vtarget + (1 - X / w) ** a * (intensity_max-vtarget) for the ramp and v = vtarget beyond.
Expand Down
4 changes: 2 additions & 2 deletions stimupy/components/gratings.py
Expand Up @@ -72,7 +72,7 @@ def shift_edges(
intensity_bars=None,
origin=None,
):
"""Function to shift edges
"""Shift edges
Parameters
----------
Expand Down Expand Up @@ -675,7 +675,7 @@ def plaid(
weight2=1,
sigma=None,
):
"""Create plaid consisting of two sine-wave gratings
"""Draw plaid consisting of two sine-wave gratings
Parameters
----------
Expand Down
6 changes: 3 additions & 3 deletions stimupy/components/lines.py
Expand Up @@ -26,7 +26,7 @@ def line(
intensity_background=0,
origin="corner",
):
"""Draw a line given the input parameters
"""Draw a line
Parameters
----------
Expand Down Expand Up @@ -142,7 +142,7 @@ def dipole(
rotation=0,
intensity_lines=(0, 1),
):
"""Draw a two centered parallel lines given the input parameters
"""Draw a two centered parallel lines
Parameters
----------
Expand Down Expand Up @@ -239,7 +239,7 @@ def circle(
intensity_line=1,
intensity_background=0,
):
"""Draw a circle given the input parameters
"""Draw a circle
Parameters
----------
Expand Down
3 changes: 1 addition & 2 deletions stimupy/components/mondrians.py
Expand Up @@ -17,8 +17,7 @@ def mondrians(
mondrian_intensities=None,
intensity_background=0.5,
):
"""
Draw Mondrians of given size and intensity at given position
"""Draw Mondrians of given size and intensity at given position
Parameters
----------
Expand Down
3 changes: 1 addition & 2 deletions stimupy/illusions/angulars.py
Expand Up @@ -26,8 +26,7 @@ def pinwheel(
intensity_target=0.5,
origin="mean",
):
"""
Pinwheel or radial White stimulus
"""Pinwheel / radial White stimulus
Parameters
----------
Expand Down
3 changes: 1 addition & 2 deletions stimupy/illusions/benarys.py
Expand Up @@ -30,8 +30,7 @@ def cross_generalized(
intensity_cross=0.0,
intensity_target=0.5,
):
"""
Benary's Cross Illusion
"""Benary's Cross Illusion
Parameters
----------
Expand Down
4 changes: 2 additions & 2 deletions stimupy/illusions/cornsweets.py
Expand Up @@ -16,8 +16,8 @@ def cornsweet(
intensity_plateau=0.5,
exponent=2.75,
):
"""
Create a matrix containing a rectangular Cornsweet edge stimulus.
"""Draw rectangular Cornsweet edge stimulus.
The 2D luminance profile of the stimulus is defined as
Left side:
v = vtarget + (1 - X / w) ** a * (intensity_max-vtarget) for the ramp and v = vtarget beyond.
Expand Down
7 changes: 2 additions & 5 deletions stimupy/illusions/cubes.py
Expand Up @@ -18,8 +18,7 @@ def varying_cells(
intensity_grid=1.0,
intensity_target=0.5,
):
"""
Cube stimulus (Agostini & Galmonte, 2002) with flexible cell sizes.
"""Cube stimulus (Agostini & Galmonte, 2002) with flexible cell sizes.
Parameters
----------
Expand Down Expand Up @@ -153,9 +152,7 @@ def cube(
intensity_grid=1.0,
intensity_target=0.5,
):

"""
Cube illusion (Agostini & Galmonte, 2002)
"""Cube illusion (Agostini & Galmonte, 2002)
Parameters
----------
Expand Down
6 changes: 2 additions & 4 deletions stimupy/illusions/delboeufs.py
Expand Up @@ -16,8 +16,7 @@ def delboeuf(
intensity_target=0.0,
intensity_background=1.0,
):
"""
Delboeuf stimulus
"""Delboeuf's (1865) stimulus
Parameters
----------
Expand Down Expand Up @@ -99,8 +98,7 @@ def two_sided(
intensity_target=0.0,
intensity_background=1.0,
):
"""
Two-sided Delboeuf stimulus
"""Two-sided Delboeuf's (1865) stimulus
Parameters
----------
Expand Down
5 changes: 1 addition & 4 deletions stimupy/illusions/dungeons.py
Expand Up @@ -18,8 +18,7 @@ def dungeon(
intensity_grid=1.0,
intensity_target=0.5,
):
"""
Dungeon stimulus (Bressan, 2001) with diamond target.
"""Dungeon stimulus (Bressan, 2001) with diamond target.
Parameters
----------
Expand Down Expand Up @@ -126,7 +125,6 @@ def resolve_dungeon_params(
n_cells=None,
cell_size=None,
):

# Try to resolve resolution
try:
shape, visual_size, ppd = resolution.resolve(shape=shape, visual_size=visual_size, ppd=ppd)
Expand Down Expand Up @@ -161,7 +159,6 @@ def resolve_cells_1d(
n_cells=None,
cell_size=None,
):

# Try to resolve number and size of cells
if cell_size is not None:
cells_pd = 1 / cell_size / 2
Expand Down
6 changes: 2 additions & 4 deletions stimupy/illusions/gratings.py
Expand Up @@ -462,8 +462,7 @@ def induction(
intensity_target=0.5,
origin="corner",
):
"""
Grating induction illusion using a sine-wave grating
"""Grating induction illusion using a sine-wave grating
Parameters
----------
Expand Down Expand Up @@ -567,8 +566,7 @@ def induction_blur(
intensity_target=0.5,
origin="corner",
):
"""
Grating induction illusion using a blurred square-wave grating
"""Grating induction illusion using a blurred square-wave grating
Parameters
----------
Expand Down
21 changes: 7 additions & 14 deletions stimupy/illusions/sbcs.py
Expand Up @@ -23,8 +23,7 @@ def generalized(
intensity_background=0.0,
intensity_target=0.5,
):
"""
Simultaneous contrast stimulus with free target placement.
"""Simultaneous contrast stimulus with free target placement.
Parameters
----------
Expand Down Expand Up @@ -90,8 +89,7 @@ def basic(
intensity_background=0.0,
intensity_target=0.5,
):
"""
Simultaneous contrast stimulus with central target.
"""Simultaneous contrast stimulus with central target.
Parameters
----------
Expand Down Expand Up @@ -142,8 +140,7 @@ def two_sided(
intensity_backgrounds=(0.0, 1.0),
intensity_target=0.5,
):
"""
Two-sided simultaneous contrast stimulus with central targets.
"""Two-sided simultaneous contrast display with central targets.
Parameters
----------
Expand Down Expand Up @@ -216,8 +213,7 @@ def with_dots(
intensity_dots=1.0,
intensity_target=0.5,
):
"""
Simultaneous contrast stimulus with dots
"""Simultaneous contrast stimulus with dots
Parameters
----------
Expand Down Expand Up @@ -354,8 +350,7 @@ def dotted(
intensity_dots=1.0,
intensity_target=0.5,
):
"""
Dotted simultaneous contrast
"""Dotted simultaneous contrast
Parameters
----------
Expand Down Expand Up @@ -491,8 +486,7 @@ def two_sided_with_dots(
intensity_dots=(1.0, 0.0),
intensity_target=0.5,
):
"""
Two-sided simultaneous contrast stimulus with dots
"""Two-sided simultaneous contrast stimulus with dots
Parameters
----------
Expand Down Expand Up @@ -584,8 +578,7 @@ def two_sided_dotted(
intensity_dots=(1.0, 0.0),
intensity_target=0.5,
):
"""
Two-sided dotted simultaneous contrast stimulus
"""Two-sided dotted simultaneous contrast stimulus
Parameters
----------
Expand Down
28 changes: 7 additions & 21 deletions stimupy/illusions/todorovics.py
Expand Up @@ -29,9 +29,7 @@ def rectangle_generalized(
intensity_target=0.5,
intensity_covers=1.0,
):
"""
Todorovic's illusion with rectangular target and rectangular covers added with flexible
number of covers and flexible target and cover placement
"""Rectangular target and rectangular covers added with flexible number of covers and flexible target and cover placement
Parameters
----------
Expand Down Expand Up @@ -155,9 +153,7 @@ def rectangle(
intensity_target=0.5,
intensity_covers=1.0,
):
"""
Todorovic's illusion with rectangular target in the center and four rectangular
covers added symmetrically around target center
"""Rectangular target in the center and four rectangular covers added symmetrically around target center
Parameters
----------
Expand Down Expand Up @@ -252,9 +248,7 @@ def cross_generalized(
intensity_target=0.5,
intensity_covers=1.0,
):
"""
Todorovic's illusion with cross target and rectangular covers added with
flexible number of covers and flexible cover placement
"""Cross target and rectangular covers added with flexible number of covers and flexible cover placement
Parameters
----------
Expand Down Expand Up @@ -380,9 +374,7 @@ def cross(
intensity_target=0.5,
intensity_covers=1.0,
):
"""
Todorovic's illusion with cross target and four rectangular covers added
at inner cross corners
"""Cross target and four rectangular covers added at inner cross corners
Parameters
----------
Expand Down Expand Up @@ -477,9 +469,7 @@ def equal(
intensity_target=0.5,
intensity_covers=1.0,
):
"""
Todorovic's illusion with cross target and four rectangular covers added at
inner cross corners
"""Cross target and four rectangular covers added at inner cross corners
Parameters
----------
Expand Down Expand Up @@ -646,9 +636,7 @@ def two_sided_cross(
intensity_target=0.5,
intensity_covers=(1.0, 0.0),
):
"""
Two-sided Todorovic's illusion with cross target and four rectangular covers
added at inner cross corners
"""Two-sided with cross target and four rectangular covers added at inner cross corners
Parameters
----------
Expand Down Expand Up @@ -735,9 +723,7 @@ def two_sided_equal(
intensity_target=0.5,
intensity_covers=(1.0, 0.0),
):
"""
Two-sided Todorovic's illusion with cross target and four rectangular covers
added at inner cross corners
"""Two-sided with cross target and four rectangular covers added at inner cross corners
Parameters
----------
Expand Down
3 changes: 1 addition & 2 deletions stimupy/illusions/wedding_cakes.py
Expand Up @@ -21,8 +21,7 @@ def wedding_cake(
intensity_grating=(1.0, 0.0),
intensity_target=0.5,
):
"""
Wedding cake stimulus
"""Wedding cake stimulus
Parameters
----------
Expand Down
15 changes: 5 additions & 10 deletions stimupy/illusions/whites.py
Expand Up @@ -188,8 +188,7 @@ def white(
target_height=None,
origin="corner",
):
"""
White's stimulus where all targets are vertically aligned at half the stimulus height
"""White's stimulus where all targets are vertically aligned at half the stimulus height
Parameters
----------
Expand Down Expand Up @@ -283,8 +282,7 @@ def white_two_rows(
target_height=None,
origin="corner",
):
"""
White's stimulus where targets are placed in two rows (top, bottom) that have the same
"""White's stimulus where targets are placed in two rows (top, bottom) that have the same
distance from the center.
Parameters
Expand Down Expand Up @@ -392,8 +390,7 @@ def anderson(
stripe_center_offset=0,
stripe_height=None,
):
"""
Anderson variation of White's stimulus
"""Anderson variation of White's stimulus
Parameters
----------
Expand Down Expand Up @@ -541,8 +538,7 @@ def howe(
target_height=None,
intensity_stripes=(1.0, 0.0),
):
"""
Howe variation of White's stimulus
"""Howe variation of White's stimulus
Parameters
----------
Expand Down Expand Up @@ -633,8 +629,7 @@ def yazdanbakhsh(
intensity_stripes=(1.0, 0.0),
gap_size=None,
):
"""
Yazsdanbakhsh variation of White's stimulus
"""Yazsdanbakhsh variation of White's stimulus
Parameters
----------
Expand Down
3 changes: 1 addition & 2 deletions stimupy/noises/binaries.py
Expand Up @@ -18,8 +18,7 @@ def binary(
shape=None,
intensity_range=(0, 1),
):
"""
Function to create white noise.
"""Draw binary noise texture
Parameters
----------
Expand Down

0 comments on commit cdb7ebb

Please sign in to comment.