Recruiting different population ratios in V1 using orientation components: a biphoton study

A feature of MotionClouds is the ability to precisely tune the precision of information following the principal axes. One which is particularly relevant for the primary visual cortical area of primates (area V1) is to tune the otirentation mean and bandwidth.

To install the necessary libraries, check out the documentation.

summary of the biphoton protocol

For the biphoton experiment:

  • The refresh rate of the screen is 70Hz and stimulation for 5 times 1s, which makes 350 images.
  • for the spatial frequency 0.125 cyc/deg is optimal (between 0.01 and 0.16).
  • for the temporal frequency 2 cyc/sec is optimal (between 0.8 and 4 sic/sec), we manipulate $B_V$ to get a qualitative estimate.

This is part of a larger study to tune orientation bandwidth.

Let's summarize this:

  • Presentation of stimuli with a circular disk during 250 ms ON then 250ms OFF
  • fixed parameters:

    • mean spatial frequency tuned for optimal neural tuning,
    • spatial frequency bandwidth tuned for optimal neural tuning,
    • temporal frequency bandwidth tuned for optimal neural tuning (TODO),
  • parameters:

    • 12 orientations including cardinals (TO BE DONE AT THE PRESENTATION SOFTWARE LEVEL)
    • 7 orientation bandwidths (infinite, pi/2, pi/4, pi/8, pi/16, pi/32, dirac),
    • 2 bandwidth in speed: dynamic (B_V=.5) or static (STATIC TO BE DONE AT THE PRESENTATION SOFTWARE LEVEL BY TAKING ONE FRAME of the DYNAMIC STIMULUS)
    • 3 different seeds: 42, 1973 and 2015 (completely arbitrary)

Grand total for one block is (12 orientations times 6 BWo + 1) (Dyn / stat) 0.5s :

In [1]:
%%writefile ../files/2017-04-19_biphoton_protocol.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*
import numpy as np
import MotionClouds as mc
import os

viewingDistance = 30 # cm
screen_height_cm = 29 # cm
#un deg / cm
print('visual angle of the screen', 2*np.arctan(screen_height_cm/2/viewingDistance)*180/np.pi, ' degrees')
print('degrees per centimeter', 2*np.arctan(screen_height_cm/2/viewingDistance)*180/np.pi/screen_height_cm)

screen_height_px = 1024 # pixels 
#screen_height_px = 256 # pixels 
deg_per_px = 2*np.arctan(screen_height_cm/2/viewingDistance)*180/np.pi/screen_height_px
print('degrees per pixel', deg_per_px)

fps = 60 # frames per second
T = 1 # duration of one period in second

mc.N_X, mc.N_Y, mc.N_frame = screen_height_px, screen_height_px, int(fps*T)

print('width of these motion clouds (', mc.N_X, ', ', mc.N_Y, ')')
print('width of stimulus in degrees', mc.N_X * deg_per_px)
phi_sf_0 = .06 # Optimal spatial frequency [cpd]
print('Optimal spatial frequency in cycles per degree', phi_sf_0)
print('Optimal spatial frequency in cycles per window = ', phi_sf_0 *  mc.N_X * deg_per_px)
sf_0 = phi_sf_0 * deg_per_px
print('cycles per pixel = ', sf_0)

# Experimental constants 
contrast = 1.
B_sf = 0.1*sf_0 # 0.1   # BW spat. freq.
B_ft = .1 # BW temp. freq.

B_V = B_ft/sf_0     # BW in speed ("plane thickness")
print('B_V = ', B_V)
theta = 0.0   # Central orientation
# generate all files
dry_run = True
dry_run = False

#downscale = 1
fx, fy, ft = mc.get_grids(mc.N_X, mc.N_Y, mc.N_frame)

name = '2017-04-19_biphoton'
vext = '.png'
try:
    os.mkdir(os.path.join(mc.figpath, name))
except:
    pass
print('-'*50)
print('Starting protocol')
print('-'*50)
for B_theta in [0, np.pi/32, np.pi/16, np.pi/8, np.pi/4, np.pi/2, np.inf]:
    if B_theta == np.inf: B_theta_str = 'inf'
    else: B_theta_str = str(int(np.ceil(B_theta*180/np.pi)))
    for seed in [42, 1973, 2015]:
        name_ = name + '_B_theta_' + B_theta_str
        name_ += '_seed_' + str(seed)
        print('Cooking:', name_)
        if not dry_run:
            if  not(os.path.isfile(os.path.join(mc.figpath, name, name_ + vext))):
                mc_i = mc.envelope_gabor(fx, fy, ft, 
                                         V_X=0., V_Y=0., B_V=B_V, 
                                         sf_0=sf_0, B_sf=B_sf, 
                                         theta=0., B_theta=B_theta)
                im = mc.random_cloud(mc_i)
                im = mc.rectif(im, contrast=contrast, verbose=True)
                # TERRIBLE HACK !
                im[0, 0, :] = 0.
                im[-1, -1, :] = 1.
                mc.anim_save(im, os.path.join(mc.figpath, name, name_), T_movie=T, vext=vext)
            else:
                print(' MC ' + os.path.join(mc.figpath, name, name_) + ' already done')
        else:
            print(' MC ' + os.path.join(mc.figpath, name, name_) + ' skipped  (dry run)')
Overwriting ../files/2017-04-19_biphoton_protocol.py
In [2]:
%%writefile  ../files/2017-04-19_biphoton_protocol.sh
#!/usr/bin/env bash
NAME=2017-04-19_biphoton
cd ../files
rm -fr `echo $NAME`_protocol.zip `echo $NAME`
ipython3 `echo $NAME`_protocol.py
zip `echo $NAME`_protocol.zip `echo $NAME`_protocol.* `echo $NAME`_protocol.sh `echo $NAME`/* `echo $NAME`/**/*
rm -fr `echo $NAME`
cd ..
nikola build
nikola deploy
cd files
echo 'done'
Overwriting ../files/2017-04-19_biphoton_protocol.sh
In [ ]:
!sh ../files/2017-04-19_biphoton_protocol.sh

Comments

Comments powered by Disqus