setupHDR.m fixed weighting function description