Deciphering Drift Amplitude

Hello all,


I'm seeking some help with my understanding of the amplitude function in the Drift 4 Demo. I have created a script to create avi movies with Drifts adapted from the Drift 4 Demo and one of the functions I wish to modify is amplitude. After using different amplitude values (ie - 0.00, 0.20, 0.40, 0.50, 0.60, 0.80. 1.0 and 10.0), I performed a further analysis to understand the amplitude signal in Matlab. Surprisingly, I find that the peaks are not as smooth as I would expect. And most surprising of all is that at an amplitude of 0.00, my amplitude values are a value of 16.0 as baseline, which shouldn't be occurring. This offset of 16.0 is persistent even at other amplitude settings. It would be great if anyone can comment as to why this would occur or maybe point out what I could be making a mistake on. Please see the attached figures as well as the attached script that I have been using to create avi movies of the drifts in PTB.


Thanks a ton in advance for your help! 

Xiaoen