Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c394253
commit 31453b8
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,58 @@ | ||
--- | ||
jupytext: | ||
formats: md:myst | ||
text_representation: | ||
extension: .md | ||
format_name: myst | ||
kernelspec: | ||
display_name: Python 3 | ||
language: python | ||
name: python3 | ||
--- | ||
|
||
# Replicate exact stimulus | ||
|
||
Sometimes, you want to have an *exact copy* | ||
of some existing stimulus. | ||
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`, | ||
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). | ||
|
||
```{code-cell} | ||
:tags: [hide-cell] | ||
import matplotlib.pyplot as plt | ||
from stimupy.utils import plot_stim | ||
``` | ||
|
||
```{code-cell} | ||
from stimupy.papers import RHS2007 | ||
stim = RHS2007.WE_thick() | ||
plot_stim(stim) | ||
plt.show() | ||
``` | ||
Note that without *any* input arguments, | ||
this will create the pixel-exact image as described in the original source. | ||
|
||
## Adjusting resolution | ||
|
||
The default version of the stimulus | ||
may not be the right aspect ratio or resolution for your use. | ||
For example, the RHS2007 stimuli | ||
are 32x32 degrees, at 32 pixels-per-degree, resulting in 1024x1024 pixels. | ||
However, lets say your observer is seated at a distance that gives 24 pixels-per-degree. | ||
These resolution parameters can be changed for the paper stimuli, keep the visual elements at the same *visual* size. | ||
**Only** these resolution parameters can be changed; | ||
the user cannot redefine the sizes of the visual elements. | ||
```{code-cell} | ||
stim = RHS2007.WE_thick(ppd=24) | ||
plot_stim(stim) | ||
plt.show() | ||
``` |