Lickometer False Positives
MEDState Notation Repository › Forums › Coding Help Archive › Lickometer False Positives
Tagged: lickometer, false positives
- This topic has 2 replies, 2 voices, and was last updated 8 years, 7 months ago by
stincic.
-
AuthorPosts
-
November 30, 2017 at 2:19 pm #13868
stincic
ParticipantHello,
We are using the dual Lickometer protocol that is posted in the forum/repository. We are having a problem with the mice scooting up next to the lickometers because there is a little gap they can sort of sit in. This causes the lickometer to constantly register false positives. I guess this problem could be some what alleviated by switching the inputs from Level to Transition mode, but is there a way to have the protocol exclude extended contact as we are only interested in brief contacts (actual licks).
Thank you,
ToddNovember 30, 2017 at 3:52 pm #13869Gary Bamberger
ModeratorYou could try something like this:
S.S.11, S1, #START: ---> S2 S2, #R^Lick1: SET L = 0 ---> S3 S3, #R^Lick1: SET L = L + 0.01 ---> SX 0.01": IF L <= 1 [@Short, @Long] @Short: Z1 ---> S2 @Long: ---> S2In your program you just look for the Z1 pulse instead of the #R^Lick1. Any lick that is 1s or less will count and the rest will be ignored. You can change the length to be anything that you wish.
I hope that this helps.
GaryNovember 30, 2017 at 4:19 pm #13870stincic
ParticipantSo in the case of my program for dual lickometers would I do:
S.S.11,
S1,
#START: —> S2S2, \Record Right Licks
#R^rightLick: SET L = 0 —> S3
\Record Left Licks
#R^leftLick; SET L = 0 —> S3S3,
#R^rightLick: SET L = L + 0.01 —> SX
0.01″: IF L <= 1 [@Short, @Long]
@Short: Z1 —> S2
@Long: —> S2
#R^leftLick`: SET L = L + 0.01 —> SX
0.01″: IF L <= 1 [@Short, @Long]
@Short: Z1 —> S2
@Long: —> S2\Inputs ^rightLick = 5 ^leftLick = 4 \Outputs ^HouseLight = 7 \Control variables VAR_ALIAS Session Timer (sec) = A(0) \Default = 600 VAR_ALIAS Bin Timer (sec) = A(1) \Default = 60 ^sessionTimer = 0 ^binTimer = 1 \Data variables \B(E) = Right licks/bin \C(E) = Left licks/bin \D(F) = Time of each right lick \G(H) = Time of each left lick \I(J) = Array of ITR times DIM A = 1 DIM B = 100 DIM C = 100 DIM D = 10000 DIM G = 10000 DIM I = 10000 \Working variables \E = Bin number \F = Total right licks \H = Total left licks \J = I() index \R = IRT timer \S = Session timer \T = Bin timer \Z-Pulses \Z1 = Start program \Z2 = End program \********************************************* \ Initialize values \********************************************* S.S.1, S1, 0.001": SET A(^sessionTimer) = 600, A(^binTimer) = 60; SET E = 1, J = 1; SET B(E+1) = -987.987, C(E+1) = -987.987; SET D(F+1) = -987.987; SET G(H+1) = -987.987; SET I(J) = -987.987 ---> S2 S2, #START: Z1 ---> SX \******************************************** \ Session timer \******************************************** S.S.2, S1, #Z1: ---> S2 S2, 0.01": SET S = S + 0.01; SHOW 1, Session Timer, S; IF S >= A(^sessionTimer) [@T, @F] @T: Z2 ---> S1 @F: ---> SX \********************************************** \ Bin timer \********************************************** S.S.3, S1, #Z1: ---> S2 S2, 0.01": SET T = T + 0.01; SHOW 6, Bin Timer, T; IF T >= A(^binTimer) [@T, @F] @T: ADD E; SET T = 0; SET B(E) = 0, C(E) = 0; SET B(E+1) = -987.987, C(E+1) = -987.987---> S2 @F: ---> SX \********************************************* \ Record licks & IRT timer \********************************************* S.S.4, S1, #Z1: ---> S2 S2, \Record right licks #R^rightLick: ADD F; SET D(F) = S; SET D(F+1) = -987.987; ADD B(E); SET I(J) = R; ADD J; SET I(J) = -987.987; SET R = 0 ---> S2 \Record left licks #R^leftLick: ADD H; SET G(H) = S; SET G(H+1) = -987.987; ADD C(E); SET I(J) = R; ADD J; SET I(J) = -987.987; SET R = 0 ---> S2 0.01": SET R = R + 0.01; SHOW 8, IRT Timer, R ---> SX \****************************************** \ Update the display \******************************************** S.S.31, S1, 0.1": SHOW 2, Total Right Licks, F; SHOW 3, Total Left Licks, H; SHOW 7, Bin Number, E ---> SX \********************************************* \ End program \******************************************** S.S.32, S1, #Z2: ---> S2 S2, 1": ---> STOPABORTFLUSH -
AuthorPosts
- You must be logged in to reply to this topic.