Package input_widgets

This package contains the widgets for entering / selecting parameters for the filter design.

input_tab_widgets

Tabbed container for all input widgets

class pyfda.input_widgets.input_tab_widgets.InputTabWidgets(parent=None, objectName='input_tab_widgets_inst')[source]

Create a tabbed widget for all input subwidgets in the list fb.input_widgets_list. This list is compiled at startup in pyfda.libs.tree_builder.Tree_Builder.

emit(dict_sig: dict = {}, sig_name: str = 'sig_tx') None

Emit a signal self.<sig_name> (defined as a class attribute) with a dict dict_sig using Qt’s emit().

  • Add the keys ‘id’ and ‘class’ with id resp. class name of the calling instance if not contained in the dict

  • If key ‘ttl’ is in the dict and its value is less than one, terminate the signal. Otherwise, reduce the value by one.

  • If the sender has passed an objectName, add it with the key “sender_name” to the dict.

log_rx(dict_sig=None)[source]

Enable self.sig_rx.connect(self.log_rx) above for debugging.

input_specs

select_filter

Subwidget for selecting the filter, consisting of combo boxes for: - Response Type (LP, HP, Hilbert, …) - Filter Type (IIR, FIR, CIC …) - Filter Class (Butterworth, …)

class pyfda.input_widgets.select_filter.SelectFilter(parent=None, objectName='select_filter_inst')[source]

Construct and read combo boxes for selecting the filter, consisting of the following hierarchy:

  1. Response Type rt (LP, HP, Hilbert, …)

  2. Filter Type ft (IIR, FIR, CIC …)

  3. Filter Class (Butterworth, …)

Every time a combo box is changed manually, the filter tree for the selected response resp. filter type is read and the combo box(es) further down in the hierarchy are populated according to the available combinations.

sig_tx({‘filt_changed’}) is emitted and propagated to input_filter_specs.py where it triggers the recreation of all subwidgets.

emit(dict_sig: dict = {}, sig_name: str = 'sig_tx') None

Emit a signal self.<sig_name> (defined as a class attribute) with a dict dict_sig using Qt’s emit().

  • Add the keys ‘id’ and ‘class’ with id resp. class name of the calling instance if not contained in the dict

  • If key ‘ttl’ is in the dict and its value is less than one, terminate the signal. Otherwise, reduce the value by one.

  • If the sender has passed an objectName, add it with the key “sender_name” to the dict.

load_dict()[source]

Reload comboboxes from filter dictionary to update changed settings after loading a filter design from disk. load_dict uses the automatism of _set_response_type etc. of checking whether the previously selected filter design method is also available for the new combination.

load_filter_order(enb_signal=False)[source]
Called by set_design_method or from InputSpecs (with enb_signal = False),

load filter order setting from fb.fil[0] and update widgets

process_sig_rx(dict_sig)[source]

Process signals coming in via sig_rx

All signals terminate here.

The sender name of signals coming in from local subwidgets is changed to its parent widget to prevent infinite loops.

input_coeffs

input_pz

input_info

Widget for displaying infos about filter and filter design method and debugging infos

class pyfda.input_widgets.input_info.Input_Info(parent=None)[source]

Create widget for displaying infos about filter specs and filter design method

emit(dict_sig: dict = {}, sig_name: str = 'sig_tx') None

Emit a signal self.<sig_name> (defined as a class attribute) with a dict dict_sig using Qt’s emit().

  • Add the keys ‘id’ and ‘class’ with id resp. class name of the calling instance if not contained in the dict

  • If key ‘ttl’ is in the dict and its value is less than one, terminate the signal. Otherwise, reduce the value by one.

  • If the sender has passed an objectName, add it with the key “sender_name” to the dict.

load_dict()[source]

update docs and filter performance

process_sig_rx(dict_sig=None)[source]

Process signals coming from sig_rx

pyfda.input_widgets.input_info.classes = {'Input_Info': 'Info'}

display name

Type:

Dict containing class name

input_fixpoint_specs

The configuration file libs.pyfda_template.conf lists which fixpoint classes (e.g. FIR_DF and IIR_DF1) can be used with which filter design algorithm. libs.tree_builder parses this file and writes all fixpoint modules into the list fb.fixpoint_widgets_list. The input widget pyfda.input_widgets.input_fixpoint_specs constructs a combo box from this list with references to all successfully imported fixpoint modules. The currently selected fixpoint widget (e.g. FIR_DF) is imported from Package fixpoint_widgets together with the referenced picture.

Each fixpoint module / class contains a widget that is constructed using helper classes from fixpoint_widgets.fixpoint_helpers.py. The widgets allow entering fixpoint specifications like word lengths and formats for input, output and internal structures (like an accumulator) for each class. It also contains a reference to a picture showing the filter topology.

Details of the mechanism and the module are described in input_widgets.input_fixpoint_specs.