What's Changed
* The data format used by `SparseArray` and electron counting methods changes. This simplifies a lot of the logic involving multiple frames per scan position, and completely removes the need for manipulating the scan positions array that the `SparseArray` previously held. The data shape from a flat array of sparse frames to a 2D array, where the first dimension is the scan position, and the second dimension is the index of a frame at that scan position.
Backwards compatibility has been maintained so that the `SparseArray` class can load in HDF5 files saved in versions 1, 2, or 3 and correctly convert them to version 3 upon loading.
* A `num_frames_per_scan` property has been added to `SparseArray.num_frames_per_scan`
* All scan processing functions have been updated to use the new data format.
Example notebooks updated
* Check out the [examples ](https://github.com/OpenChemistry/stempy/tree/master/examples) directory for useful Jupyter notebooks for common 4D-STEM processing tasks. All calculations are done in the sparse domain providing significant speed-up and reduced memory use.
* [center_of_mass_sparse.ipynb](https://github.com/OpenChemistry/stempy/blob/master/examples/center_of_mass_sparse.ipynb): Calculates the center of mass (intensity) of each diffraction pattern and then calculates the phase for a Differential Phase Contrast (DPC) image
* [radial_sum_display.ipynb](https://github.com/OpenChemistry/stempy/blob/master/examples/radial_sum_display.ipynb): Calculate the radial sum of every pattern and interactively choose the inner and outer angle of a virtual detector to explore different types of image contrast in a 4D-STEM scan.
* [vacuum_scan_subtract.ipynb](https://github.com/OpenChemistry/stempy/blob/master/examples/vacuum_scan_subtract.ipynb): Compensate for beam motion at each scan position using a separate scan acquired without a sample known as a "vacuum scan." The vacuum scan can be smaller in the number of scan positions but must be acquired at the same STEM magnification and camera length.
* A set of examples in the py4dstem directory show how to use the `SparseArray` class to analyze sparse data sets in this popular 4D-STEM analysis package.
**Full Changelog**: https://github.com/OpenChemistry/stempy/compare/2.0.2...3.0.0