A method is provided for positioning at least one target portion of a
substrate with respect to a focal plane of a projection system. The
method comprises performing height measurements of at least part of the
substrate to generate height data, using predetermined correction heights
to compute corrected height data for the height data. The method further
comprises positioning the target portion of the substrate with respect to
the focal plane of the projection system at least partially based on the
corrected height data.