A method of providing image data for constructing an image of a region of a target object, comprising: determining an initial offset vector for reducing an error associated with a predetermined probe position; providing the image data via an iterative process, the iterative process comprising: detecting, by at least one detector, at least a portion of radiation scattered by a target object with the incident radiation or an aperture at the probe position; estimating a wavefront based on a probe function indicating at least one characteristic of incident radiation having the offset vector applied to the probe position; determining an error metric for the offset vector based on a difference between the estimated wavefront and a wavefront corresponding to the radiation detected by the detector; comparing the error metric for the offset vector with a current best error metric associated with a current best correction vector for the probe position; updating the current best correction vector associated with the probe position when the current best error metric associated with the probe position is improved; updating the offset vector for a further iteration based upon the current best correction vector; and providing the image data responsive to the detected radiation based upon the current best correction vector. determining an initial offset vector for reducing an error associated with a predetermined probe position; providing the image data via an iterative process, the iterative process comprising: detecting, by at least one detector, at least a portion of radiation scattered by a target object with the incident radiation or an aperture at the probe position; estimating a wavefront based on a probe function indicating at least one characteristic of incident radiation having the offset vector applied to the probe position; determining an error metric for the offset vector based on a difference between the estimated wavefront and a wavefront corresponding to the radiation detected by the detector; comparing the error metric for the offset vector with a current best error metric associated with a current best correction vector for the probe position; updating the current best correction vector associated with the probe position when the current best error metric associated with the probe position is improved; updating the offset vector for a further iteration based upon the current best correction vector; and providing the image data responsive to the detected radiation based upon the current best correction vector. detecting, by at least one detector, at least a portion of radiation scattered by a target object with the incident radiation or an aperture at the probe position; estimating a wavefront based on a probe function indicating at least one characteristic of incident radiation having the offset vector applied to the probe position; determining an error metric for the offset vector based on a difference between the estimated wavefront and a wavefront corresponding to the radiation detected by the detector; comparing the error metric for the offset vector with a current best error metric associated with a current best correction vector for the probe position; updating the current best correction vector associated with the probe position when the current best error metric associated with the probe position is improved; updating the offset vector for a further iteration based upon the current best correction vector; and providing the image data responsive to the detected radiation based upon the current best correction vector.