exactly mirror MATLAB code
changed hrf to a function

I had trouble moving it to its own file and importing it.