An illumination portion (1560, 1660) of an optical encoder (1500, 1600) which comprises a scale grating (1510, 1610), an imaging portion (1580, 1680), and a detector portion, the illumination portion comprising: a light source (1530, 1630) configured to output light (1531, 1631) having a wavelength λ; a structured illumination generating portion configured to input the light and output structured illumination (1531", 1631") wherein the structured illumination comprises an illumination fringe pattern oriented transversely to the measuring axis direction; a first filtering lens (1571, 1671); a spatial filtering aperture configuration (1572, 1672); and a second filtering lens (1573, 1673), wherein: the first filtering lens is configured to focus the structured illumination proximate to a plane of the spatial filter aperture configuration; the spatial filtering aperture configuration includes a central portion (1572c, 1672c) that is configured to block zero and higher-order light included in the structured illumination and an open aperture portion (1572op, 1672op) proximate to the central portion that is configured to output +1 order and -1 order portions of the structured illumination to the second filtering lens; and the second filtering lens is configured to output the structured illumination to a plane of the scale grating as filtered structured illumination with an illumination fringe pitch P MI along the measuring axis direction at a plane coinciding with the scale grating. a light source (1530, 1630) configured to output light (1531, 1631) having a wavelength λ; a structured illumination generating portion configured to input the light and output structured illumination (1531", 1631") wherein the structured illumination comprises an illumination fringe pattern oriented transversely to the measuring axis direction; a first filtering lens (1571, 1671); a spatial filtering aperture configuration (1572, 1672); and a second filtering lens (1573, 1673), wherein: the first filtering lens is configured to focus the structured illumination proximate to a plane of the spatial filter aperture configuration; the spatial filtering aperture configuration includes a central portion (1572c, 1672c) that is configured to block zero and higher-order light included in the structured illumination and an open aperture portion (1572op, 1672op) proximate to the central portion that is configured to output +1 order and -1 order portions of the structured illumination to the second filtering lens; and the second filtering lens is configured to output the structured illumination to a plane of the scale grating as filtered structured illumination with an illumination fringe pitch P MI along the measuring axis direction at a plane coinciding with the scale grating. the first filtering lens is configured to focus the structured illumination proximate to a plane of the spatial filter aperture configuration; the spatial filtering aperture configuration includes a central portion (1572c, 1672c) that is configured to block zero and higher-order light included in the structured illumination and an open aperture portion (1572op, 1672op) proximate to the central portion that is configured to output +1 order and -1 order portions of the structured illumination to the second filtering lens; and the second filtering lens is configured to output the structured illumination to a plane of the scale grating as filtered structured illumination with an illumination fringe pitch P MI along the measuring axis direction at a plane coinciding with the scale grating.