Readout scheme as sequence wide property.

This commit is contained in:
jupfi 2024-07-12 14:58:58 +02:00
parent a2757dabe3
commit 820bdbebb7

View file

@ -31,7 +31,7 @@ class SimulatorController(SpectrometerController):
logger.debug("Starting simulation") logger.debug("Starting simulation")
# This needs to be called to update the phase array # This needs to be called to update the phase array
sequence.phase_table.update_phase_array() sequence.phase_table.generate_phase_array()
# Get the number of phasecycles # Get the number of phasecycles
number_phasecycles = sequence.phase_table.n_phase_cycles number_phasecycles = sequence.phase_table.n_phase_cycles
@ -87,11 +87,11 @@ class SimulatorController(SpectrometerController):
else: else:
measurement_data.add_dataset(tdx, result / simulation.averages) measurement_data.add_dataset(tdx, result / simulation.averages)
if readout_scheme: if readout_scheme.any():
measurement_data.phase_shift(readout_scheme[cycle][1], cycle) measurement_data.phase_shift(readout_scheme[cycle][1], cycle)
if readout_scheme and number_phasecycles > 1: if readout_scheme.any() and number_phasecycles > 1:
# Apply the readout scheme # Apply the readout scheme
tdy = np.zeros(len(measurement_data.tdx[0]), dtype=np.complex128) tdy = np.zeros(len(measurement_data.tdx[0]), dtype=np.complex128)
for cycle in range(number_phasecycles): for cycle in range(number_phasecycles):