Skip to content

Commit 0924be4

Browse files
committed
Review remarks, return Image instead of ArrayMicrographSource, docstrings
1 parent bd882a0 commit 0924be4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

gallery/tutorials/tutorials/micrograph_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
src.images[:].show()
223223

224224
# %%
225-
# Plot the clean micrographs using the ``clean_micrographs`` accessor.
225+
# Plot the clean micrographs using the ``clean_images`` accessor.
226226
src.clean_images[:].show()
227227

228228
# %%

src/aspire/source/micrograph.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def _images(self, indices):
102102
Accesses and returns micrographs.
103103
104104
:param indices: A 1-D Numpy array of integer indices.
105-
:return: An `ArrayMicrographSource` object representing the micrographs for `indices`.
105+
:return: An `Image` object representing the micrographs for `indices`.
106106
"""
107107

108108

@@ -152,7 +152,7 @@ def _images(self, indices):
152152
:param indices: A 1-D Numpy array of integer indices.
153153
:return: An array backed `MicrographSource` object representing the micrographs for `indices`.
154154
"""
155-
return ArrayMicrographSource(self._data[indices])
155+
return Image(self._data[indices])
156156

157157

158158
class DiskMicrographSource(MicrographSource):
@@ -243,7 +243,7 @@ def _images(self, indices):
243243
Accesses and returns micrographs from disk.
244244
245245
:param indices: A 1-D Numpy array of integer indices.
246-
:return: An array backed `MicrographSource` object representing the micrographs for `indices`.
246+
:return: An `Image` object representing the micrographs for `indices`.
247247
"""
248248
# Initialize empty result
249249
n_micrographs = len(indices)
@@ -263,7 +263,7 @@ def _images(self, indices):
263263
# Assign to array, implicitly performs casting to dtype
264264
micrographs[i] = micrograph.asnumpy()
265265

266-
return ArrayMicrographSource(micrographs)
266+
return Image(micrographs)
267267

268268

269269
class MicrographSimulation(MicrographSource):

0 commit comments

Comments
 (0)