Communication from Michael Paul regarding its construction:
I spoke with Mark this morning and he confirmed that the LHS condition was working well. At this point I'm going to close out the LHS ticket. The total time for the project was 90 hours, 64 for the base condition and 26 hours spent in July "tuning" to a usable state. The 64 hours will be billed at the 20 dollar/hr rate, and the 26 hours in July will be billed at the new 25 dollar/hr rate, bringing the total for the project to $1,930.
The base condition ultimately utilized morphological operators to create a dynamic halo activation region around the maze(image attached: halo mask AND'ed with standard tracking branch for activation in halo). I found this was the most reliable way to track LHS (static ROI's kept getting misaligned as the maze was bumped during use, and a dynamic standard mask of the maze was struggling to differentiate edge cases when the rat was close to the border of the maze.)
The July tuning addressed 4 problems Mark brought to my attention:
-Tether was Activating LHS
-Not detecting several major LHS
-LHS would trigger multiple times while rat was in the hub
-Rearing would sometimes trigger LHS
The first two issues were a matter of contrast; it was difficult to get the settings to the point where it was sensitive enough to detect the dark rat head over the dark patches on the floor AND to ignore the tether. Ultimately trial and error found the most ideal settings, then we used a physical notebook to change the contrast of the darkest point on the floor.
The third issue was caused by the gleam of the hub spokes. They showed up as noticeable holes in the halo mask, and I had to use python logic to ignore these signals. I used the same method to determine the reward area, and restricted LHS triggers only when the rat was outside the hub. The fourth was also a python logic solution, and I simply restricted LHS to only trigger when the rearing flag was not set.
Please let me know if any further issues arise or if there is anything else I can help with. Moving forward, I am going to ask Mark to create new tickets so we can keep the billing separate.