adapted compute_orientationindex for static gratings