plot_filter_functions

qctrlvisualizer.plot_filter_functions(filter_functions: dict, *, figure: Optional[matplotlib.figure.Figure] = None)

Create a plot of the specified filter functions.

Parameters
  • filter_functions (dict) –

    The dictionary of filter functions to plot. The keys should be the names of the filter functions, and the values represent the filter filter by either a dictionary with the keys ‘frequencies’, ‘inverse_powers’, and optional ‘inverse_power_uncertainties’ or a list of samples that each contain a dictionary with keys ‘frequency’, ‘inverse_power’, and optional ‘inverse_power_uncertainty’. The frequency must be in Hertz an the inverse power and its uncertainty in seconds.

    For the list of samples the key ‘inverse_power_precision’ can be used instead of ‘inverse_power_uncertainty’. If both are provided then the value corresponding to ‘inverse_power_uncertainty’ is used.

    If the uncertainty of an inverse power is provided, it must be non-negative.

    For example, the following is a valid filter_functions input:

    {
     "Primitive": {
        "frequencies": [0.0, 1.0, 2.0],
        "inverse_powers": [15., 12., 3.],
        "inverse_power_uncertainties": [0., 0., 0.2],
     },
     "CORPSE": [
        {"frequency": 0.0, "inverse_power": 10.},
        {"frequency": 0.5, "inverse_power": 8.5},
        {"frequency": 1.0, "inverse_power": 5., "inverse_power_uncertainty": 0.1},
        {"frequency": 1.5, "inverse_power": 2.5},
     ],
    }
    

  • figure (matplotlib.figure.Figure, optional) – A matplotlib Figure in which to place the plot. If passed, its dimensions and axes will be overridden.