plot_filter_functions

qctrlvisualizer.plot_filter_functions(figure, filter_functions)

Creates a plot of the specified filter functions.

Parameters
  • figure (matplotlib.figure.Figure) – The matplotlib Figure in which the plots should be placed. The dimensions of the Figure will be overridden by this method, but may be subsequently modified by the caller if desired.

  • filter_functions (dict) –

    The dictionary of filter functions to plot. The keys should be the names of the filter functions, and the values the list of samples representing that filter function. Each such sample must be a dictionary with ‘frequency’, ‘inverse_power’, and ‘inverse_power_uncertainty’ (optional) keys, giving the frequency (in Hertz) at which the sample was taken, the inverse power (in seconds) of the filter function at the sample, and the optional uncertainty of that inverse power (in seconds).

    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 would be a valid filter_functions input:

    {
     'Primitive': [
         {'frequency': 0.0, 'inverse_power': 15.},
         {'frequency': 1.0, 'inverse_power': 12.},
         {'frequency': 2.0,
          'inverse_power': 3.,
          'inverse_power_uncertainty' 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},
     ],
    }
    

Raises

ValueError – If any of the input parameters are invalid.