Category:In Vivo Light Delivery

From OpenOptogenetics.org

Jump to: navigation, search

Hardware > In vivo light delivery: this category gathers pages detailing the challenges and technical approaches enabling light delivery in vivo for optogenetic control and/or imaging.

Program for delivering laser pulse stimulation using MedPC:

The following program in Med State notation delivers a 20Hz on/off signal to control a TTL- switch hooked up to a 28V to 5V transformer. Each response in the reinforced nosepoke aperture results in a 2s laser pulse signal, followed by a 1s time out period. The schedule of reinforcement is FR1:


\Program issues laser pulse if 2 responses on the left lever occur before 2 sec elapses \Using active low TTL signal so to turn the laser off have to turn output on

\Inputs ^leftResponse = 1 ^rightResponse = 2

\Variables ^Reinforced = 2 ^Unreinforced = 1

\Outputs ^leftLight = 4 ^rightLight = 5 ^houseLight = 7 ^laser = 6


\Working variables \ I = time bin index \ X = ISI array index \ Y = ISI timer

\Z pulses used ^onLaser = 1 ^offLaser = 2


\Storage arrays DIM L = 1000 DIM R = 1000 DIM Q = 1000 \ L(0) = total left responses \ L(I) = left responses this time bin \ R(0) = total right responses \ R(I) = right responses this time bin \ Q(0) = total ISI responses \ Q(I) = ISI responses this time bin


\ Record leftWheel responses. If 2 responses happen w/in 2 sec turn on laser S.S.1, S1,

   #START: ON ^houseLight ---> S2


S2,

   1#R^Reinforced: Z(^onLaser) ---> S4

S4,

   #Z(^offLaser)---> S5

S5,

   1":--->S2


\ Turn the laser on for 25ms, off for 25ms over 2 sec period S.S.2, S1, \make sure the laser is off when program starts b/c TTL minus switch (i.e. "on"= laser turned off)

   0.001": ON ^laser ---> S2

S2,

   #Z(^onLaser): OFF ^laser ---> S3

S3,

   #Z(^offLaser): ON ^laser ---> S2
   0.025": ON ^laser ---> S4

S4,

   #Z(^offLaser): ---> S2
   0.025": OFF ^laser ---> S3


\ 2 sec timer window for 25ms laser pulses S.S.3, S1,

   #Z(^onLaser): ---> S2

S2,

   2": Z(^offLaser) ---> S1


\ Record left & right wheel total responses and bin the data in 1 min bins S.S.4, S1,

   0.01": SET I = 1, L(0) = 0, L(I) = 0, L(I+1) = -987.987;
          SET R(0) = 0, R(I) = 0, R(I+1) = -987.987 ---> S2

S2,

   #START: ---> S3

S3,

   #R(^leftResponse): ADD L(0), L(I) ---> S3 \records leftwheel inputs
   #R(^rightResponse): ADD R(0), R(I) ---> S3 \records rightWheel inputs


S.S.5, \Every minute increment the time bin index for wheel responses S1,

   #START: ---> S2

S2,

   1': ADD I; SET L(I) = 0, L(I+1) = -987.987, R(I) = 0, R(I+1) = -987.987 ---> S2


S.S.6, \ISI timer S1,

   #START: ---> S2

S2,

   0.1": SET Y = Y + 0.1 ---> SX


S.S.7, \ record ISI times when laser stimulus occurs S1,

   0.01": SET X = 0, Q(X) = 0, Q(X+1) = -987.987---> S2

S2,

   #Z(^onLaser): SET Q(X) = Y;
                 SET Y = 0; ADD X; SET Q(X+1) = -987.987 ---> SX


\ Update the display S.S.16, S1,

   0.1": SHOW 1, Left Total Responses, L(0);
         SHOW 6, Left Responses This Bin, L(I);
         SHOW 2, Right Total Responses, R(0);
         SHOW 7, Right Responses This Bin, R(I);
         SHOW 3, ISI Timer, Y ---> SX


\ Session Timer S.S. 17,

S1,

  #start--->S2

S2,

  1": ADD T; SHOW 5, SECS, T; IF T=2700[@T,@F]
      @T:  OFF^houseLight--->s3
      @F:--->SX

S3, 5":--->stopabortflush

Subcategories

This category has only the following subcategory.

I

Pages in category "In Vivo Light Delivery"

The following 3 pages are in this category, out of 3 total.

F

H

T