> For the complete documentation index, see [llms.txt](https://elishai.gitbook.io/retinal-stimulation-modeling-environment/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://elishai.gitbook.io/retinal-stimulation-modeling-environment/visual-stimulation.md).

# Visual Stimulation

To evaluate the visual stimuli we will import the following libraries:

```
from Stimuli_visual_pattern import *
import numpy as np
import matplotlib.pyplot as plt
```

#### Noisy bars

```
stimuli = noisy_alternating_bar(intensity =0.0075)
t    = list(np.arange(0, 1500, 0.2))

X, Y = np.meshgrid(range(600), range(775))

intervals = np.linspace(1,max(t),10)

for i in intervals:
    plt.figure()
    a = evaluate_stimuli_pattern(t[int(i)], stimuli, 600, 775)
    plt.title(i)
    plt.contourf(X, Y, a, cmap = 'gist_gray', interpolation='nearest')
```

![](https://3823822112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlM7rr4VP7XMZK5DA9U%2Fuploads%2FrhsSSb7zggayePkGOXKL%2FScreen%20Shot%202021-10-12%20at%2022.20.48.png?alt=media\&token=ef9be17a-f190-4145-bd8c-0c071a473c06)

#### Doted bars

```
stimuli = doted_bar(field_x = 500, radius = 25, n=20, change_rate=15, time=1500, bar_size_x = 250, velocity = 2)
```

![](https://3823822112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlM7rr4VP7XMZK5DA9U%2Fuploads%2FsUCKPOl1UfUYOLUjBdVY%2FScreen%20Shot%202021-10-12%20at%2022.33.18.png?alt=media\&token=bf4ed089-c2f9-4953-9e4c-ef63d578d1ae)

#### Left gratings

```
stimuli = left_gratings(field_x = 500, bar_size_x = 100, velocity = 2/5, n = 30, space = 200)
```

![](https://3823822112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlM7rr4VP7XMZK5DA9U%2Fuploads%2Fau8ePXCIz1NHMDHHC6f5%2FScreen%20Shot%202021-10-12%20at%2022.26.37.png?alt=media\&token=1624f3c8-e217-4873-aea1-b419e6760b62)
