Skip to content

Commit

Permalink
Add disc, ring, annulus demos
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisVincent committed Nov 11, 2022
1 parent 16ebcbf commit fa67dce
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions demo/illusions/circular.ipynb
Expand Up @@ -13,14 +13,14 @@
"\n",
"import IPython\n",
"import ipywidgets as iw\n",
"from stimuli.utils import plot_stimuli, plot_stim"
"from stimuli.utils import plot_stimuli, plot_stim\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Disc and rings"
"## Disc, ring, and disc_and_rings"
]
},
{
Expand All @@ -29,7 +29,12 @@
"metadata": {},
"outputs": [],
"source": [
"from stimuli.components.circular import disc_and_rings"
"from stimuli.components.circular import disc\n",
"\n",
"stim = disc(radius=1, intensity=1, ppd=32, visual_size=(4,None), background_intensity=0)\n",
"\n",
"plot_stim(stim)\n",
"plt.show()\n"
]
},
{
Expand All @@ -38,10 +43,28 @@
"metadata": {},
"outputs": [],
"source": [
"stim = disc_and_rings(radii=[1, 2, 3, 4, 6, 5, 5, 6], intensities=[1,0], ppd=12, background=0.5)\n",
"from stimuli.components.circular import annulus\n",
"\n",
"stim = annulus(radii=[2, 3], intensity=1, ppd=32, background_intensity=0)\n",
"\n",
"plot_stim(stim)\n",
"plt.show()"
"plt.show()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from stimuli.components.circular import disc_and_rings\n",
"\n",
"stim = disc_and_rings(\n",
" radii=[1, 2, 3, 4, 6, 5, 5, 6], intensities=[1, 0], ppd=12, background_intensity=0.5\n",
")\n",
"\n",
"plot_stim(stim)\n",
"plt.show()\n"
]
},
{
Expand Down

0 comments on commit fa67dce

Please sign in to comment.