function x=zerobase(x,dim)
% zerobase - shift values so minimum is zero
%
% zerobase :: 
%    [D:[[E]]] ~'E dimensional array of size D', 
%    1..D      ~'dimension to normalise along' 
% -> [D] ~'shifted data'.
x=addnorm(@(y)min(y,[],dim),x);

