Forgot to take care of some rounding errors
Adding inverse transform to grasim2matrix