function r = lowpassButterworth(q,order,cutoff)

DT = diff(q.data(:,1));
rate = 1/mean(DT);
%if find(DT ~= DT(1))
%    error('Must be uniform time spacing');
%end
disp(sprintf('rate = %f', rate));
[Fb, Fa] = butter(order, cutoff/(0.5*rate));
r = q;
for i=2:size(q.data,2)
    r.data(:,i) = filtfilt(Fb, Fa, q.data(:,i));
end
