Skip to content

Commit 4b17565

Browse files
committed
Fix conditionals
1 parent 07e6e42 commit 4b17565

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

filter_functions/numeric.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,11 +678,12 @@ def restore_memory_layout(x): return x.swapaxes(-1, -2)
678678
# It is quite a bit faster to work with frequencies on the second-to-last axis
679679
control_matrix_atomic = np.ascontiguousarray(control_matrix_atomic.swapaxes(-1, -2))
680680

681+
# First time step is simply the first atomic control matrix
681682
if which == 'correlations':
682683
control_matrix = np.empty_like(control_matrix_atomic)
683684
control_matrix[0] = control_matrix_atomic[0]
684-
elif which == 'total':
685-
# First time step is simply the first atomic control matrix
685+
else:
686+
# which == 'total'
686687
control_matrix = control_matrix_atomic[0].copy()
687688
# A buffer for intermediate terms in the calculation.
688689
step = np.empty_like(control_matrix)

filter_functions/pulse_sequence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,7 @@ def concatenate(
18511851
# control_matrix is the step-wise one.
18521852
control_matrix_atomic_step = control_matrix
18531853
control_matrix_atomic_cumulative = control_matrix_atomic_step.cumsum(axis=0)
1854-
if which == 'total':
1854+
if not calc_pulse_correlation_FF:
18551855
# restore the total control matrix for below
18561856
control_matrix = control_matrix_atomic_cumulative[-1]
18571857

0 commit comments

Comments
 (0)