A device for measuring the relative displacement between two members, the device comprising: a scale comprising a scale grating formed along a measuring axis direction; and an optical encoder readhead comprising: a light source configured to output source light with a first wavelength to the scale grating which outputs scale light to form a periodic intensity pattern at the first wavelength which moves with the scale; and a detector assembly operable to detect the position of the periodic intensity pattern at the first wavelength relative to the detector assembly, wherein: the first wavelength is at least 300 nm and at most 450 nm; and the detector assembly comprises a plurality of spatial phase detectors comprising: a periodic spatial filter; a phosphor layer positioned to receive light arising from the periodic intensity pattern at the first wavelength and output second wavelength light including a second wavelength that is larger than the first wavelength; and a photodetector element positioned to input the second wavelength light and output a signal indicative of the spatial phase of the periodic intensity pattern at the first wavelength relative to that spatial phase detector, and wherein: the photodetector element inputs second wavelength light corresponding to a spatially filtered version of the first wavelength periodic intensity pattern; and the periodic spatial filter comprises at least one of (a) a pattern of individual portions of the photodetector element which provides the periodic spatial filter, and (b) a pattern of individual portions of the phosphor layer which provides the periodic spatial filter. a scale comprising a scale grating formed along a measuring axis direction; and an optical encoder readhead comprising: a light source configured to output source light with a first wavelength to the scale grating which outputs scale light to form a periodic intensity pattern at the first wavelength which moves with the scale; and a detector assembly operable to detect the position of the periodic intensity pattern at the first wavelength relative to the detector assembly, wherein: the first wavelength is at least 300 nm and at most 450 nm; and the detector assembly comprises a plurality of spatial phase detectors comprising: a periodic spatial filter; a phosphor layer positioned to receive light arising from the periodic intensity pattern at the first wavelength and output second wavelength light including a second wavelength that is larger than the first wavelength; and a photodetector element positioned to input the second wavelength light and output a signal indicative of the spatial phase of the periodic intensity pattern at the first wavelength relative to that spatial phase detector, and wherein: the photodetector element inputs second wavelength light corresponding to a spatially filtered version of the first wavelength periodic intensity pattern; and the periodic spatial filter comprises at least one of (a) a pattern of individual portions of the photodetector element which provides the periodic spatial filter, and (b) a pattern of individual portions of the phosphor layer which provides the periodic spatial filter. a light source configured to output source light with a first wavelength to the scale grating which outputs scale light to form a periodic intensity pattern at the first wavelength which moves with the scale; and a detector assembly operable to detect the position of the periodic intensity pattern at the first wavelength relative to the detector assembly, wherein: the first wavelength is at least 300 nm and at most 450 nm; and the detector assembly comprises a plurality of spatial phase detectors comprising: the first wavelength is at least 300 nm and at most 450 nm; and the detector assembly comprises a plurality of spatial phase detectors comprising: a periodic spatial filter; a phosphor layer positioned to receive light arising from the periodic intensity pattern at the first wavelength and output second wavelength light including a second wavelength that is larger than the first wavelength; and a photodetector element positioned to input the second wavelength light and output a signal indicative of the spatial phase of the periodic intensity pattern at the first wavelength relative to that spatial phase detector, and wherein: the photodetector element inputs second wavelength light corresponding to a spatially filtered version of the first wavelength periodic intensity pattern; and the periodic spatial filter comprises at least one of (a) a pattern of individual portions of the photodetector element which provides the periodic spatial filter, and (b) a pattern of individual portions of the phosphor layer which provides the periodic spatial filter. the photodetector element inputs second wavelength light corresponding to a spatially filtered version of the first wavelength periodic intensity pattern; and the periodic spatial filter comprises at least one of (a) a pattern of individual portions of the photodetector element which provides the periodic spatial filter, and (b) a pattern of individual portions of the phosphor layer which provides the periodic spatial filter.