error("Observation filter must be either a three- or four-dimensional array. See documentation (at the top of the function file) for more information.");
ifndims(O)>4
error("Observation filter array cannot have more than fourdimensions. See documentation (at the top of the function file) for more information.");
elseifsize(O,4)~=size(m,3)&&size(O,4)~=1
error("The number of observation filter sets must be either equal to the trials/sound field realisations, or 1.")