From partial to complete optical erasure of azobenzene-polymer gratings