From de9afd466783f1cc2951fd02ae40ed16d4cd6ea8 Mon Sep 17 00:00:00 2001 From: Runner PC Cavity Lab <johannes.schabbauer@tuwien.ac.at> Date: Fri, 27 Sep 2024 11:16:28 +0200 Subject: [PATCH] Spectrum: Fixed label of signle tone in buffer for manual replay --- SpectrumAWG/blacs_workers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SpectrumAWG/blacs_workers.py b/SpectrumAWG/blacs_workers.py index 2b3fcf7..14ba2fd 100644 --- a/SpectrumAWG/blacs_workers.py +++ b/SpectrumAWG/blacs_workers.py @@ -43,7 +43,7 @@ class SpectrumAWGWorker(Worker): return{} elif type(values) is float: # Stream single frequency - data = SpectrumCard.generate_single_tone(values*1e6,4096,self.sample_rate) # TODO: Set num_samples dynamically + data = SpectrumCard.generate_single_tone(values*1e6,4096*5,self.sample_rate) # TODO: Set num_samples dynamically self.AWG.transfer_sequence_replay_samples(len(self.smart_cache),data) # Write in next free memory self.AWG.seq_set_sequence_step(0,len(self.smart_cache),0,1,'on_trigger',last_step=False) elif type(values) is int: @@ -84,7 +84,7 @@ class SpectrumAWGWorker(Worker): if len(instruction)==2: # SINGLE TONE data = SpectrumCard.generate_single_tone(instruction[1],num_samples,self.sample_rate) - initial_values[memory_index] = f"{instruction[0]}Hz" + initial_values[memory_index] = f"{instruction[1]*1e-6:.3f}MHz" elif (len(instruction)-1)%3 == 0: # MULTI TONE num_tones = (len(instruction)-1)//3 -- GitLab