This is an algorithm to detect the head-twitch response (HTR) or "wet dog shakes" in rodents using accelerometer signals. The HTR is commonly used in neuroscience research to investigate activation of the 5-HT2A receptor.
Please see the script demo.m for an example on how to use the detector. More information can be found in this paper.
The algorithm is written in Matlab. It requires the Signal Processing Toolbox.
Make sure that the folder +htrdetector
is on the Matlab path.
If you use this code in your project, please cite the paper.
Please use the GitHub Issues page to report bugs and to make suggestions.