fixed some major bug such that we know have a comparable version of our adaptive shader with the matlab simulation, at least for blaze gratings, up to 2d :) .