How to calculate the sag of a diffractive optical element with a macro