Skip to content
Snippets Groups Projects
Commit 831f3df2 authored by Sander de Snoo's avatar Sander de Snoo
Browse files

Fixed unit of phase setting for RF demodulation [rad]

parent 6d948cc7
No related branches found
No related tags found
No related merge requests found
...@@ -285,14 +285,14 @@ class M3202A_Uploader: ...@@ -285,14 +285,14 @@ class M3202A_Uploader:
# Set phase for IQ demodulated input # Set phase for IQ demodulated input
if channel_conf.phase is not None: if channel_conf.phase is not None:
for ch in channel_conf.channel_numbers: for ch in channel_conf.channel_numbers:
dig.set_lo(ch, 0, channel_conf.phase) dig.set_lo(ch, 0, np.degrees(channel_conf.phase))
if acq_mode in [2, 3]: if acq_mode in [2, 3]:
# Set frequency, amplitude and phase for IQ demodulation in FPGA. # Set frequency, amplitude and phase for IQ demodulation in FPGA.
if channel_conf.frequency is not None: if channel_conf.frequency is not None:
for ch in channel_conf.channel_numbers: for ch in channel_conf.channel_numbers:
dig.set_lo(ch, dig.set_lo(ch,
channel_conf.frequency, channel_conf.frequency,
channel_conf.phase, np.degrees(channel_conf.phase),
channel_conf.hw_input_channel, channel_conf.hw_input_channel,
) )
if channel_conf.rf_source is not None: if channel_conf.rf_source is not None:
...@@ -752,8 +752,10 @@ class UploadAggregator: ...@@ -752,8 +752,10 @@ class UploadAggregator:
delays.append(channel.delay) delays.append(channel.delay)
if channel.rf_source is not None: if channel.rf_source is not None:
rf_source = channel.rf_source rf_source = channel.rf_source
delays.append(rf_source.delay - rf_source.startup_time_ns) if rf_source.mode == 'pulsed':
delays.append(rf_source.delay + rf_source.prolongation_ns) # HVI2 can only start RF source 30 ns after start of waveform
delays.append(rf_source.delay - rf_source.startup_time_ns - 30)
delays.append(rf_source.delay + rf_source.prolongation_ns)
self.max_pre_start_ns = -min(0, *delays) self.max_pre_start_ns = -min(0, *delays)
self.max_post_end_ns = max(0, *delays) self.max_post_end_ns = max(0, *delays)
......
...@@ -305,14 +305,14 @@ class QsUploader: ...@@ -305,14 +305,14 @@ class QsUploader:
# Set phase for IQ demodulated input # Set phase for IQ demodulated input
if channel_conf.phase is not None: if channel_conf.phase is not None:
for ch in channel_conf.channel_numbers: for ch in channel_conf.channel_numbers:
dig.set_lo(ch, 0, channel_conf.phase) dig.set_lo(ch, 0, np.degrees(channel_conf.phase))
if acq_mode in [2, 3]: if acq_mode in [2, 3]:
# Set frequency, amplitude and phase for IQ demodulation in FPGA. # Set frequency, amplitude and phase for IQ demodulation in FPGA.
if channel_conf.frequency is not None: if channel_conf.frequency is not None:
for ch in channel_conf.channel_numbers: for ch in channel_conf.channel_numbers:
dig.set_lo(ch, dig.set_lo(ch,
channel_conf.frequency, channel_conf.frequency,
channel_conf.phase, np.degrees(channel_conf.phase),
channel_conf.hw_input_channel, channel_conf.hw_input_channel,
) )
if channel_conf.rf_source is not None: if channel_conf.rf_source is not None:
...@@ -864,8 +864,10 @@ class UploadAggregator: ...@@ -864,8 +864,10 @@ class UploadAggregator:
delays.append(channel.delay) delays.append(channel.delay)
if channel.rf_source is not None: if channel.rf_source is not None:
rf_source = channel.rf_source rf_source = channel.rf_source
delays.append(rf_source.delay - rf_source.startup_time_ns) if rf_source.mode == 'pulsed':
delays.append(rf_source.delay + rf_source.prolongation_ns) # HVI2 can only start RF source 30 ns after start of waveform
delays.append(rf_source.delay - rf_source.startup_time_ns - 30)
delays.append(rf_source.delay + rf_source.prolongation_ns)
self.max_pre_start_ns = -min(0, *delays) self.max_pre_start_ns = -min(0, *delays)
self.max_post_end_ns = max(0, *delays) self.max_post_end_ns = max(0, *delays)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment