4D Scanning Transmission Electron Microscopy (4D STEM) is an advanced technique that merges traditional STEM imaging with diffraction pattern acquisition. In this method, an electron beam scans across a specimen in a raster pattern, and at each point of the scan, a full diffraction pattern is collected. This results in a four-dimensional dataset, comprising two spatial dimensions and two dimensions for the diffraction pattern at each pixel.