Skip to content

Commit 5a297ff

Browse files
author
Danail Stoychev
committed
AlpaoDeformableMirror: duplicate every 131st queued pattern
1 parent 5e48177 commit 5a297ff

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

microscope/mirror/alpao.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,20 @@ def set_trigger(self, ttype, tmode):
159159
self._trigger_type = ttype
160160

161161
def queue_patterns(self, patterns: numpy.ndarray) -> None:
162+
# Duplicate every 131st entry
163+
index_duplication = 130
164+
while index_duplication < patterns.shape[0]:
165+
patterns = numpy.concatenate(
166+
(
167+
patterns[:index_duplication],
168+
patterns[index_duplication][numpy.newaxis],
169+
patterns[index_duplication:]
170+
),
171+
axis=0
172+
)
173+
# Add one more to account for the previously duplicated patterns
174+
index_duplication += 131 + 1
175+
162176
if self._trigger_type == microscope.TriggerType.SOFTWARE:
163177
super().queue_patterns(patterns)
164178
return

0 commit comments

Comments
 (0)