Releases: OpenChemistry/stempy
stempy 3.2.2
What's Changed
Full Changelog: 3.2.1...3.2.2
stempy 3.2.0
What's Changed
- Skip python 3.11 wheels by @psavery in #263
- Fix binning scans with multiple frames per scan by @psavery in #262
- Fix com sparse parameters by @ercius in #264
- Add row dark algorithm to electron counting by @psavery in #260
- Add
SparseArray.to_dense()
by @psavery in #266
Full Changelog: 3.1.0...3.2.0
stempy 3.1.0
stempy 3.0.0
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 theSparseArray
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 toSparseArray.num_frames_per_scan
-
All scan processing functions have been updated to use the new data format.
Example notebooks updated
- Check out the 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: 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: 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: 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: 2.0.2...3.0.0
stempy 2.0.0
This release contains breaking changes that may require code updates.
What's Changed
-
For consistency and ease of use, the
ElectronCountedData
namedtuple has been replaced by theSparseArray
class. TheSparseArray
has similar attributes as theElectronCountedData
, butscan_dimensions
is nowscan_shape[::-1]
, andframe_dimensions
is nowframe_shape
.Here are the functions that are effected:
stempy.image.electron_count()
now returns aSparseArray
instead of the namedtuplestempy.io.load_electron_counts()
now also returns aSparseArray
stempy.io.save_electron_counts()
now requires aSparseArray
argument instead of the namedtuple
-
SparseArray
now also supports attaching metadata. This metadata will be included in any of the HDF5 files written from aSparseArray
instance. The various electron counting parameters used instempy.image.electron_count()
are now also automatically added to the metadata of theSparseArray
instance. -
When performing electron counting on a dataset that contains multiple frames at each scan position, the electron events are now stored in separate arrays for each frame, rather than being append to a single array.
Full Changelog: 1.1.1...2.0.0
stempy 1.0.4
This release improves electron counting with a new multi-pass approach the reduce memory usage and make it more amenable to parallelization.
Infrastructure and changes have been implemented to allow binary wheels to be built and pushed to the Python Package Index (PyPI). This allow stempy to be install using pip
on Windows, Mac and Linux.
stable version
This is the initial stable release of stempy.