Theory
The essence of GPA is the comparison of the phase of a set of perfect planes (defined by a -vector) to the planes measured from an image (defined by a mask at the -vector).
If we consider and image to be formed from a Fourier series
Where is the image intensity, is the position in the image and are the periodicities in the image (i.e. the position in reciprocal space). and give the amplitude and phase of the periodicity given by . Using a simple mask, it is easy to extract one of (or a select few) of these Fourier components by masking the FFT. Inversing this FFT then produces the complex image . From this, the phase difference can be calculated as
where the first term is the phase from the masked FFT and the second term in the phase calculated from the -vector the FFT was masked at. At this point, the -vector can be refined to an area of homogeneous strain. If the -vector is incorrect (even if only by a little bit!) then the phase in the uniform strain region will have a gradient. By fitting this gradient, it is possible to correct the -vector using
Each phase can be used to calculate the displacements in the direction of the lattice place. To get the full strain field, the phase needs to be calculated for two non-colinear -vectors. The phases are related to the displacement field, , by
where and are the and components of the -vector using to calculate the phase, . Inverting this gives the displacements in terms of the phases,
where we have used
Finally, the distortion is calulcated by differentiating:
From this matrix, the strain, , rotation, and dilitation, , are easily calculated from