Skip to content

Commit

Permalink
Docs: bugfix tutorial - update references to stimuli (from `illusio…
Browse files Browse the repository at this point in the history
…ns`) (#36)

And update API paths
  • Loading branch information
JorisVincent committed Mar 23, 2023
1 parent b1dfd47 commit 3091cc3
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 12 deletions.
8 changes: 7 additions & 1 deletion docs/getting_started/getting_started.md
@@ -1,9 +1,15 @@
# Getting started with `stimupy`

The following pages serve as **tutorial**,
walking you through the very basics of installing and using `stimupy`.

Along the way, they also refer to some [topic guides](../topic_guides/),
which have more in-depth explanation on various concepts and design decisions.

```{toctree}
:numbered:
installation
first_stim
illusion
stimulus
replicate
```
4 changes: 2 additions & 2 deletions docs/getting_started/replicate.md
Expand Up @@ -18,10 +18,10 @@ Since `stimupy`s functions are highly parameterizable,
lots of variants of a stimulus can be created,
and thus specific existing parameterizations can be recreated.

For a large selection of the generic `stimupy.illusions`,
For a large selection of the generic `stimupy.stimuli`,
there are specific parameterizations in the published literature.
Some of these are implement in stimupy as well,
under the corresponding [`stimupy.papers`](../reference/api/stimupy.papers).
under the corresponding [`stimupy.papers`](../reference/_api/stimupy.papers).

```{code-cell}
:tags: [hide-cell]
Expand Down
Expand Up @@ -10,13 +10,11 @@ kernelspec:
name: python3
---

# Exploring an illusion
# Exploring more complex stimuli

The geometric components in [`stimupy.components`](../reference/api/stimupy.components)
The geometric components in [`stimupy.components`](../reference/_api/stimupy.components)
form the basic building blocks for all stimuli implement in `stimupy`.
More complex stimuli can be composed using the functions that generate components.
Included in `stimupy` is a large set of functionst to generate more complex stimuli,
which we term [`illusions`](../reference/api/stimupy.illusions).

## Simultaneous Brightness Contrast (SBC)

Expand All @@ -26,8 +24,14 @@ import matplotlib.pyplot as plt
from stimupy.utils import plot_stim
```

Included in `stimupy` is a large set of functions
to generate more complex [`stimuli`](../reference/_api/stimupy.stimuli).
These are generally subdivided into specifically named submodules.
All of these can be accessed either through `stimupy.stimuli.<submodule>`,
or by `from stimupy import <submodule>`:

```{code-cell}
from stimupy.illusions import sbcs
from stimupy import sbcs
stim = sbcs.basic(visual_size=(6,8), ppd=10, target_size=(2,2))
Expand All @@ -45,8 +49,8 @@ plot_stim(component)
plt.show()
```

However, some of the stimulus parameters have different names in `illusions`.
In particular, **all** `illusions` have the concept of a `target` region(s):
However, some of the stimulus parameters have different names in `stimuli`.
In particular, **all** `stimuli` have the concept of a `target` region(s):
image regions that are of some particular scientific interest in this stimulus.
For an SBC stimulus, this would be the rectangular path.
Thus, the `sbcs.basic` function takes a
Expand Down Expand Up @@ -81,9 +85,26 @@ plot_stim(two_sided_stim)
plt.show()
```

## White's illusion
## Todorovic illusion
```{code-cell}
from stimupy import todorovics
stim_tod = todorovics.two_sided_rectangle(
visual_size=(10,20),
ppd=10,
target_size=3,
covers_size=1.5,
covers_offset=2
)
plot_stim(stim_tod)
plt.show()
```

## White's effect stimulus
```{code-cell}
from stimupy.illusions import whites
from stimupy import whites
stim_whites = whites.white_two_rows(
visual_size=(10,12),
Expand Down

0 comments on commit 3091cc3

Please sign in to comment.