A method for calculating an orientation and phase map of a sample comprising a plurality of crystals in different orientations and different known phases comprising the steps of: a) providing a sample comprising a plurality of said crystals in different orientations, b) obtaining an electron diffraction pattern (44, 46) from each of a plurality of discrete locations (42, 43) within an area of the sample, wherein the electron beam used to obtain the electron diffraction pattern is scanned in precession mode protocol, or a beam rotation protocol, or any scanning mode protocol leading to a quasi-kinematical diffraction pattern, such that it converges at the discrete location of the sample, in combination with a similar descanning after the sample, c) determining the crystal orientations using template matching applied to the individual diffraction patterns (44, 46) obtained in b), d) determining the presence of different crystals phases by using template matching applied to the individual diffraction patterns (44, 46) obtained in b), characterised in that it further comprises the step of e) calculating an orientation map and phase map of crystals in the sample from the determination of steps c) and d), wherein: - beam scanning is controlled by x and y scan signals generated by a scan generator which control x and y deflection coils in the TEM, and - a waveform is added to the x and y scan signal to perform dynamic compensation of observed beam probe size, wherein the waveform is a straight line shape or a sine wave generated at a specific frequency with respect to the precession frequency, modified manually to compensate erratic movement of the probe such that it is no longer a straight line or sinewave, or wherein the waveform is calculated from the x and y co-ordinates of the beam and angle on the precession circle, or wherein the waveform is added to compensate the movements of the probe, to bring it back to the centre of the TEM screen used to visualise the diffraction pattern. a) providing a sample comprising a plurality of said crystals in different orientations, b) obtaining an electron diffraction pattern (44, 46) from each of a plurality of discrete locations (42, 43) within an area of the sample, wherein the electron beam used to obtain the electron diffraction pattern is scanned in precession mode protocol, or a beam rotation protocol, or any scanning mode protocol leading to a quasi-kinematical diffraction pattern, such that it converges at the discrete location of the sample, in combination with a similar descanning after the sample, c) determining the crystal orientations using template matching applied to the individual diffraction patterns (44, 46) obtained in b), d) determining the presence of different crystals phases by using template matching applied to the individual diffraction patterns (44, 46) obtained in b), characterised in that it further comprises the step of e) calculating an orientation map and phase map of crystals in the sample from the determination of steps c) and d), - beam scanning is controlled by x and y scan signals generated by a scan generator which control x and y deflection coils in the TEM, and - a waveform is added to the x and y scan signal to perform dynamic compensation of observed beam probe size, wherein the waveform is a straight line shape or a sine wave generated at a specific frequency with respect to the precession frequency, modified manually to compensate erratic movement of the probe such that it is no longer a straight line or sinewave, or wherein the waveform is calculated from the x and y co-ordinates of the beam and angle on the precession circle, or wherein the waveform is added to compensate the movements of the probe, to bring it back to the centre of the TEM screen used to visualise the diffraction pattern. wherein the waveform is a straight line shape or a sine wave generated at a specific frequency with respect to the precession frequency, modified manually to compensate erratic movement of the probe such that it is no longer a straight line or sinewave, or wherein the waveform is calculated from the x and y co-ordinates of the beam and angle on the precession circle, or wherein the waveform is added to compensate the movements of the probe, to bring it back to the centre of the TEM screen used to visualise the diffraction pattern.