Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added docstrings and updated READMEs
- Loading branch information
Showing
16 changed files
with
448 additions
and
138 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
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,3 +1,20 @@ | ||
## Brightness Illusions | ||
## Illusions | ||
|
||
For example usage, see `/tests/test_brightness_illusions.py`. | ||
This directory contains modules for creating various brightness illusions. | ||
Each module contains a function to create the general version of the illusion with suitable default parameters. | ||
Beside that, in each module one can find the implementations of functions for generating illusions used in published papers. | ||
These functions are the one being called from the modules in `papers` directory. | ||
|
||
An overview of all illusions can be generated by running the `overview.py` module. | ||
Each functions returns a `Stimulus` object. `img` attribute contains a 2D numpy array | ||
representing the illusion and `target_mask` attribute contains an integer mask specifying | ||
the location of target patches inside the illusion. | ||
### Example usage | ||
```python | ||
from stimuli import illusions, utils | ||
import matplotlib.pyplot as plt | ||
|
||
stimulus = illusions.whites.white() | ||
utils.plot_stim(stimulus, mask=True) | ||
plt.show() | ||
``` |
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
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
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
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
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
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
Oops, something went wrong.