Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 29 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# OpenScope visual loop:
A temporary repository for the OpenScope visual loop project
# OpenScope V2 species:
A temporary repository for the OpenScope V2 species project


# Installation
Expand All @@ -25,56 +25,37 @@ A temporary repository for the OpenScope visual loop project

5. Download required video clips from movie_clips.zip and extract into the data directory.

# Input files
The software requires two sets of input files. There should be a set of text files present under `data/stimulus_orderings` that indicate the display order of video clips for different phases of the experiment.

In addition, there should be a set of video clips (stored as raw .npy files).
<br>These clips must be downloaded and extracted into the data folder from [full_movies.zip](https://weizmannacil-my.sharepoint.com/:u:/g/personal/daniel_deitch_weizmann_ac_il/EbetUfh76FtBtDkpqd-7gAEB43WxjSCKutxW8sJtvIfCiA?e=LPY5ND) and stored in the path `data/full_movies`.

For debugging purposes please download shortened versions of the movie clips from [short_movies.zip](https://weizmannacil-my.sharepoint.com/:u:/g/personal/daniel_deitch_weizmann_ac_il/EZzpjTqcXG9Bn4Xe-u9pgXIBHzLbIWfmtd8xKI4lvwIwvQ?e=uLVxT0) and extracted into the data folder and store them in the path `data/short_movies`.

# Running the scripts
1. Activate the environment:
<br>`conda activate allen_stimulus`

3. Run the stimulus_loop.py script (for group A input 0 and for group B input 1):
<br> `python stimulus_loop.py 0`
3. Run the stimulus_v2species_2p.py script for 2P stimuli:
<br> `python stimulus_v2species_2p.py`

4. Run the stimulus_v2species_2p.py script for ephys stimuli:
<br> `python stimulus_v2species_ephys.py`

# Debugging mode
To run the script `stimulus_loop.py` in debugging mode, comment out line 50 and uncomment line 57.
<br>This will change the path of the movie clips from their full length version (i.e., 30 sec) to their shortened version (5 sec) with helpful labels.

# Stimulus design
The experiment consists of two phases in which different sets of 30 sec long natural movies will be presented:
- Phase 1 consists of two natural movies (i.e., movie01 and movie02) and a constant gray screen (i.e., movie00).
- Phase 2 consists of 50 natural movies (i.e., movie03-movie52) and a constant gray screen (i.e., movie00).

Animals are assigned into two groups (A and B), each presented with the movies in different order.
<br>In both groups, a total of 230 movies will be presented for a total time of 115 min:
1. For group A:
- Phase 1:
- 50 presentations of movie01 (25 min)
- 10 presentations of movie00 (5 min)
- 50 alternations between movie01 and movie02 (25 min)
- 10 presentations of movie00 (5 min)

- Phase 2:
- 20 presentations of movie03 (10 min)
- 10 presentations of movie00 (5 min)
- 50 sequential presentations of movie03 to movie52 (25 min)
- 10 presentations of movie00 (5 min)
- 20 alternations between movie03 and movie52 (10 min)

2. For group B:
- Phase 1:
- 50 alternations between movie01 and movie02 (25 min)
- 10 presentations of movie00 (5 min)
- 50 presentations of movie01 (25 min)
- 10 presentations of movie00 (5 min)

- Phase 2:
- 20 presentations of movie03 (10 min)
- 10 presentations of movie00 (5 min)
- 50 presentations of movie52 (25 min)
- 10 presentations of movie00 (5 min)
- 20 alternations between movie03 and movie52 (10 min)
The experiment consists of both ephys (Neuropixels) and calcium imaging (2P imaging with Gcamp viral vectors) recordings, in separate mice. Neuropixels recordings consist of 4 simultaneous probes across V1, covering the extent of the visual field map. 2P imaging recordings consist of 12 FOVs, imaged 4 at a time, also across the span of the visual field of V1.

The stimuli used for Neuropixels and 2P are similar, with the exception of full-field flashes, which rquire temporally precise responses and are therefor only used with Neuropixels recordings. Warping is applied to the monitor.

Gabor Patches: Small drifting grating patches tiling the monitor, used to map receptive fields. Each patch is 20 degrees, with 10 degree overlap. TF and SF are fixed but orientation varies (0, 45,90).

Drifting Gratings: Typical drifting gratings, with 5 TF (1.0, 2.0, 4.0, 8.0, 15.0) and 5 SF (0.02, 0.04, 0.08, 0.16, 0.32), and 4 orientations (0,45,90,135).

Full-field flash: Full-field bright or dark flashes.

Due to technical constraints, the duration of 2P recordings is more limited than Neuropixels recordings, so the number of repeated trials varies by stimulus modality.

![Overview of 2p and ephys stimuli](images/stim_overview.png)

For stimulus_v2species_2p.py, these parameters are currently hard-coded:
* nb_runs_ephys_rf = 10
* nb_run_gratings = 15

For stimulus_v2species_ephys.py, these parameters are currently hard-coded:
* nb_runs_ephys_rf = 20
* nb_run_gratings = 15
* nb_run_flash = 150
99 changes: 0 additions & 99 deletions cluster_hab/day1.py

This file was deleted.

128 changes: 0 additions & 128 deletions cluster_hab/day2.py

This file was deleted.

Loading