Skip to content

Commit 8eaeed3

Browse files
committed
use attribute assignment in subclass example
1 parent b7dcf61 commit 8eaeed3

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

docs/source/orientation_estimation.rst

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -239,24 +239,22 @@ used inside :class:`aspire.source.OrientedSource`. A simplified template is show
239239
"""
240240
241241
def estimate_rotations(self):
242-
# Compute and cache the clmatrix
243-
clmatrix = self.clmatrix
244-
245242
# Custom synchronization using clmatrix statistics
246-
sync_mat = self._fancy_sync(clmatrix)
247-
est_rots = self._recover_rots(sync_mat)
243+
self.fancy_sync()
244+
self.recover_rots()
248245
249-
return est_rots
246+
return self.rotations
250247
251-
def _fancy_sync(self, clmatrix):
252-
# Placeholder illustrating where algorithm-specific logic would go
248+
def fancy_sync(self):
249+
# Placeholder illustrating where algorithm-specific logic would go.
250+
# Access self.clmatrix for computations and assign result to class attribute.
253251
...
254-
return sync_mat
252+
self.sync_mat = fancy_sync_computations(self.clmatrix)
255253
256-
def _recover_rots(self, sync_mat):
254+
def recover_rots(self):
257255
# Placeholder for additional algorithmic-specific logic
258256
...
259-
return rots
257+
self.rotations = rot_recov_computions(self.sync_mat)
260258
261259
With this skeleton in place, the new class inherits masking, caching, shift estimation,
262260
GPU dispatch hooks, and reference-free pipeline compatibility from the base classes.

0 commit comments

Comments
 (0)