Reproduce Figure 9 of the Fleischman & Kuznetsov (2010) paper, using our
    low-level interfaces. Uses OmegaPlot, of course.

    Input parameters, etc., come from the file ``Flare071231a.pro`` that is
    distributed with the paper’s Supplementary Data archive.

    Invoke with something like::

      from pwkit import fk10
      fk10.make_figure9_plot('path/to/libGS_Std_HomSrc_CEH.so.64').show()

def make_figure9_plot(shlib_path, use_lowlevel=True, **kwargs):
    """Reproduce Figure 9 of the Fleischman & Kuznetsov (2010) paper, using our
    low-level interfaces. Uses OmegaPlot, of course.

    Input parameters, etc., come from the file ``Flare071231a.pro`` that is
    distributed with the paper’s Supplementary Data archive.

    Invoke with something like::

      from pwkit import fk10
      fk10.make_figure9_plot('path/to/libGS_Std_HomSrc_CEH.so.64').show()

    """
    import omega as om

    if use_lowlevel:
        out_vals = do_figure9_calc_lowlevel(shlib_path, **kwargs)
    else:
        out_vals = do_figure9_calc_highlevel(shlib_path, **kwargs)

    freqs = out_vals[:,OUT_VAL_FREQ]
    tot_ints = out_vals[:,OUT_VAL_OINT] + out_vals[:,OUT_VAL_XINT]
    pos = (tot_ints > 0)

    p = om.quickXY(freqs[pos], tot_ints[pos], 'Calculation', xlog=1, ylog=1)

    nu_obs = np.array([1.0, 2.0, 3.75, 9.4, 17.0, 34.0])
    int_obs = np.array([12.0, 43.0, 29.0, 6.3, 1.7, 0.5])
    p.addXY(nu_obs, int_obs, 'Observations', lines=False)

    p.defaultKeyOverlay.hAlign = 0.93
    p.setBounds(0.5, 47, 0.1, 60)
    p.setLabels('Emission frequency, GHz', 'Total intensity, sfu')
    return p