Open rozmar opened 1 month ago
Task description: We define a force-to-speed LUT as above. At trial start the lickport moves to the far position. After trial start the lickport is controlled by the forces exerted on the lever. When the lickport is close to the end position (roughly last 1 mm), a lick triggers reward and the lickport stops. + 2 sec reward consume time If time is up or mouse gets rewarded, new trial starts.
We agreed to generate a tiff file for a 2d look-up table to transform loadcell readings to speed, and an additional json file that explains the axes of the tiff file. See output files in this folder + jupyter notebook of the code below: https://drive.google.com/drive/folders/1zrz0l2CxZPtbebJckJIB0vgZYJhVYeR8?usp=sharing
Step by step:
There is an arbitrary function that generates a matrix of force-to-speed LUT:
Then we generate a tiff file and a json file (currently 2 versions of json file, one has vectors, one has only scalars, choose whichever you prefer, or request a third one :D)
some plotting:
How to use:
if using the scalar dictionary, first recreate the vectors:
Then find the speed:
for lateral force of 20 and ap force of 35 the needed speed is 0.5