Provided are a method and system for determining states of spatial light
modulator (SLM) pixels in a lithography system configured to print a
desired pattern. The method includes determining diffraction orders
associated with an ideal mask of a pattern to be printed by the
lithography system, and then configuring the states of the SLM pixels to
match all the diffraction orders that are relevant in the image
formation.