1. A computer-implemented method of generating an electromagnetic field (EMF) correction boundary layer (BL) model corresponding to a mask, comprising using a computer to perform a method, the method including: (a) determining asymmetry factor data from aerial image measurements of a plurality of different gratings representative of features provided on a mask, the aerial image measurements having been made at a plurality of different focus settings; and (b) determining boundary layer (BL) model parameters of an EMF correction BL model corresponding to the mask by fitting to the asymmetry factor measurements.