> 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')
```

![](/files/p5wYww4Yf1HbiHQio224)

#### Doted bars

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

![](/files/grZaF7cjdRx115ot6i6K)

#### Left gratings

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

![](/files/NUUQR0LOk7yES83fOJBW)
