Skip to content

exponential_dc_gain not exposed in LFFEMAnalogOutputPort: filter DC gain always defaults to 1 #189

@fabrizioberr

Description

@fabrizioberr

The parameter "exponential_dc_gain" for the Output Filter is missing in analog_outputs. As a result, when using an exponential output filter intended for high-pass filter correction, the DC gain cannot be changed and is always 1.

Suggested fix by lukaspahl

class LFFEMAnalogOutputPort(LFAnalogOutputPort, FEMPort):
    fem_type: ClassVar[str] = "LF"
    sampling_rate: float = 1e9  # Either 1e9 or 2e9
    upsampling_mode: Literal["mw", "pulse"] = "mw"
    exponential_filter: Optional[List[Tuple[float, float]]] = None
    exponential_dc_gain: float = 1 #This line is new
...

and

def get_port_properties(self) -> Dict[str, Any]:
        port_properties = super().get_port_properties()
        if self.exponential_filter is not None:
            filter_properties = port_properties.setdefault("filter", {})
            filter_properties["exponential"] = list(self.exponential_filter)
            filter_properties["exponential_dc_gain"] = self.exponential_dc_gain #This line is new
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions