def plot_curve():
    'To test implementation'
    fig = plt.figure()
    ax = fig.add_subplot(111)
    wl = np.linspace(0.13, 10, num=300)
    ax.plot(wl, deredden(wl, 0.2, mags=False), label='0.2 mags')
    ax.plot(wl, deredden(wl, 1.0, mags=False), label='1.0 mags')
    ax.plot(wl, deredden(wl, 2.0, mags=False), label='2.0 mags')
    avs = av_points(wl)
    ax.plot(wl, (10 ** (0.4 * avs)), 'k:', label='fiducial')
    ax.legend(loc='upper right')
    ax.set_xlabel('$\\lambda\\quad[\\AA]$')
    ax.set_ylabel('$A_\\lambda$')
    plt.savefig('redenning_curves.png')
To test implementation
def plot_curve():
    
    fig = plt.figure()
    ax = fig.add_subplot(111)
    wl = np.linspace(0.13, 10, num=300)
    ax.plot(wl, deredden(wl, 0.2, mags=False), label='0.2 mags')
    ax.plot(wl, deredden(wl, 1.0, mags=False), label='1.0 mags')
    ax.plot(wl, deredden(wl, 2.0, mags=False), label='2.0 mags')
    avs = av_points(wl)
    ax.plot(wl, (10 ** (0.4 * avs)), 'k:', label='fiducial')
    ax.legend(loc='upper right')
    ax.set_xlabel('$\\lambda\\quad[\\AA]$')
    ax.set_ylabel('$A_\\lambda$')
    plt.savefig('redenning_curves.png')