In order to deal with 10s of GB of data per scan, it has been shown that compression based on datadependent linear transformations yields superior results when compared to conventional techniques like binning, or singular value decomposition, both in terms of compression ratio and quality of the information extractable from the data-set. The integration of artificial neural network (ANN)-based feature recognition techniques has the potential to further enhance compression performance. Before collecting the main data-set, a network can be pre-trained in a similar way to adaptive scanning , but with the aim of capturing the diffraction patterns as best as possible with as few values as possible.