lsstDefaults = LSSTdefaults()

    # Build the detectors.
    qevendors = {}
    qevendors[1] = bu.buildVendorDetector(os.path.join(defaultDirs['detector'], 'vendor1'), addLosses)
    qevendors[2] = bu.buildVendorDetector(os.path.join(defaultDirs['detector'], 'vendor2'), addLosses)
    qevendors['combo'] = bu.buildGenericDetector(defaultDirs['detector'], addLosses)
    if allPlots:
        bu.plotBandpasses(qevendors, title='Vendor Detector Responses')

    # Build the other components.
    lens1 = bu.buildLens(defaultDirs['lens1'], addLosses)
    lens2 = bu.buildLens(defaultDirs['lens2'], addLosses)
    lens3 = bu.buildLens(defaultDirs['lens3'], addLosses)
    filters = bu.buildFilters(defaultDirs['filters'], addLosses)
    mirror1 = bu.buildMirror(defaultDirs['mirror1'], addLosses)
    mirror2 = bu.buildMirror(defaultDirs['mirror2'], addLosses)
    mirror3 = bu.buildMirror(defaultDirs['mirror3'], addLosses)
    atmosphere = bu.buildAtmosphere(defaultDirs['atmosphere'])

    # Plot all components.
    if allPlots:
        plt.figure()
        plt.plot(qevendors['combo'].wavelen, qevendors['combo'].sb, 'k-', linewidth=2, label='Detector')
        plt.plot(lens1.wavelen, lens2.sb, 'g-', linewidth=2, label='L1')
        plt.plot(lens2.wavelen, lens2.sb, 'r-', linewidth=2, label='L2')
        plt.plot(lens3.wavelen, lens3.sb, 'b-', linewidth=2, label='L3')
        for f in ['u', 'g', 'r', 'i', 'z', 'y']:
            plt.plot(filters[f].wavelen, filters[f].sb, linestyle=':', linewidth=5, label=f)
        plt.plot(mirror1.wavelen, mirror1.sb, 'g-.', linewidth=2, label='M1')
        plt.plot(mirror2.wavelen, mirror2.sb, 'r--', linewidth=2, label='M2')
    # Build and compare the filter curves.
    filters = bu.buildFilters(defaultDirs['filters'], addLosses)
    oldfilters = {}
    for f in filters:
        oldfilters[f] = Bandpass()
        oldfilters[f].readThroughput('../intermediateFiles/components/camera/'+f+'BandThroughput.dat')
    bu.plotBandpasses(filters)
    bu.plotBandpasses(oldfilters, newfig=False, linestyle=':', title='Compare filters')
    # Put the individual filter bandpasses straight into 'throughputs', for easier use below.
    for f in filters:
        throughputs[f] = filters[f]

    # Build and compare the mirror curves, for mirrors 1/2/3.
    for mirror in ('mirror1', 'mirror2', 'mirror3'):
        throughputs[mirror] = bu.buildMirror(defaultDirs[mirror], addLosses)
        mfile = ('../intermediateFiles/components/telescope/' + mirror[0] + mirror[-1] +
                 'Throughput.dat')
        comparison.readThroughput(mfile)
        plotDict = {'New %s' %(mirror):throughputs[mirror], 'Old %s' %(mirror):comparison}
        bu.plotBandpasses(plotDict, title='Compare %s' %(mirror))

    # Read the atmosphere file.
    throughputs['atmosphere'] = bu.readAtmosphere(defaultDirs['atmosphere'])

    # Plot all components.
    bu.plotBandpasses(throughputs, title='All components')

    # Combine components by hand. Compare to combination returned from bandpassUtils.
    core_sb = (throughputs['detector'].sb * throughputs['lens1'].sb * throughputs['lens2'].sb
            * throughputs['lens3'].sb * throughputs['mirror1'].sb