Skip to content

Commit

Permalink
small updates to docstrings and error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobjma committed Jul 16, 2023
1 parent 6e9bf4b commit d4c9b9f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion abtem/array.py
Expand Up @@ -1278,9 +1278,15 @@ def set_ensemble_axes_metadata(self, axes_metadata: AxisMetadata, axis: int):
The axis to set.
"""

old_axes_metadata = copy.deepcopy(self.ensemble_axes_metadata)

self.ensemble_axes_metadata[axis] = axes_metadata

self._check_axes_metadata()
try:
self._check_axes_metadata()
except RuntimeError:
self._ensemble_axes_metadata = old_axes_metadata

return self

def to_hyperspy(self):
Expand Down
4 changes: 2 additions & 2 deletions abtem/potentials/iam.py
Expand Up @@ -1065,7 +1065,7 @@ def transmit(self, waves: "Waves", conjugate: bool = False) -> "Waves":
Returns
-------
transmissionfunction : TransmissionFunction
transmission_function : TransmissionFunction
Transmission function for the wave function through the potential slice.
"""

Expand Down Expand Up @@ -1392,7 +1392,7 @@ def _partition_args(self, chunks: int = 1, lazy: bool = True):
else:
seeds = None

array.itemset(i, (potential_unit, self.seeds[start:stop]))
array.itemset(i, (potential_unit, seeds))

return (array,)

Expand Down
2 changes: 1 addition & 1 deletion abtem/tilt.py
Expand Up @@ -68,7 +68,7 @@ def precession_tilts(
Parameters
----------
precession_angle : float
Precession angle.
Precession angle [mrad].
num_samples : int
Number of tilt samples.
min_azimuth : float, optional
Expand Down
2 changes: 1 addition & 1 deletion abtem/visualize.py
Expand Up @@ -1356,7 +1356,7 @@ def adjust_tight_bbox(self):
size_y = size_x * aspect

self.fig.set_size_inches((size_x, size_y))
self.fig.subplots_adjust(left=0, bottom=0, right=1, top=1)
self.fig.subplots_adjust(left=0, bottom=0, right=1., top=1)


class MeasurementVisualization2D(BaseMeasurementVisualization2D):
Expand Down

0 comments on commit d4c9b9f

Please sign in to comment.