Skip to content

Commit

Permalink
Merge pull request #65 from qua-platform/fix/filter-taps-quamlist
Browse files Browse the repository at this point in the history
feat: Fix issue with filter taps in SingleChannel configuration
  • Loading branch information
nulinspiratie authored Aug 6, 2024
2 parents 2fb894b + a8fbc46 commit 27549bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Allow int keys to be serialised / loaded in QuAM using JSONSerialiser
- Fix type `OctaveUpconverter.triggered_reersed` -> `OctaveUpconverter.triggered_reversed`
- Fix tuples not being instantiated properly in specific circumstances
- Fix filter_fir/iir_taps being passed as QuamList when generating config, resulting in an error due to parent reassignment


## [0.3.3]
Expand Down
15 changes: 11 additions & 4 deletions quam/components/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,22 +518,29 @@ def apply_to_config(self, config: dict):
if self.intermediate_frequency is not None:
element_config["intermediate_frequency"] = self.intermediate_frequency

filter_fir_taps = self.filter_fir_taps
if filter_fir_taps is not None:
filter_fir_taps = list(filter_fir_taps)
filter_iir_taps = self.filter_iir_taps
if filter_iir_taps is not None:
filter_iir_taps = list(filter_iir_taps)

if isinstance(self.opx_output, LFAnalogOutputPort):
opx_port = self.opx_output
elif len(self.opx_output) == 2:
opx_port = OPXPlusAnalogOutputPort(
*self.opx_output,
offset=self.opx_output_offset,
feedforward_filter=self.filter_fir_taps,
feedback_filter=self.filter_iir_taps,
feedforward_filter=filter_fir_taps,
feedback_filter=filter_iir_taps,
)
opx_port.apply_to_config(config)
else:
opx_port = LFFEMAnalogOutputPort(
*self.opx_output,
offset=self.opx_output_offset,
feedforward_filter=self.filter_fir_taps,
feedback_filter=self.filter_iir_taps,
feedforward_filter=filter_fir_taps,
feedback_filter=filter_iir_taps,
)
opx_port.apply_to_config(config)

Expand Down

0 comments on commit 27549bd

Please sign in to comment.