def analyzeIteration(self, iterationResults, experimentResults):
        if self.enable:
            histout = []  # amplitudes, edges
            # Overlap, fraction, cutoff
            fitout = np.recarray(2, [('overlap', float), ('fraction', float), ('cutoff', float)])
            optout = np.recarray(2, [('A0', float), ('A1', float), ('m0', float), ('m1', float), ('s0', float), ('s1', float)])
            shots = iterationResults['shotData'][()]
            # make shot number the primary axis
            shots = shots.reshape(-1, *shots.shape[2:]).swapaxes(0, 1)
            shots = shots[:, :, 0]  # pick out first roi only
            hbins = self.hbins
            if self.hbins < 0:
                hbins = np.arange(np.max(shots)+1)
            for i in range(shots.shape[0]):
                gmix.fit(np.array([shots[i]]).transpose())
                h = np.histogram(shots[i], bins=hbins, normed=True)
                histout.append((h[1][:-1], h[0]))
                est = [
                    gmix.weights_.max()/10,
                    gmix.weights_.min()/10,
                    gmix.means_.min(),
                    gmix.means_.max(),
                    np.sqrt(gmix.means_.min()),
                    np.sqrt(gmix.means_.max())
                ]
                try:
                    popt, pcov = curve_fit(self.dblgauss, h[1][1:], h[0], est)
                    # popt=[A0,A1,m0,m1,s0,s1] : Absolute value
                    popt = np.abs(popt)
                    xc = self.intersection(*popt)
                    if np.isnan(xc):
                        logger.warning('Bad Cut on Shot: {}'.format(i))
                        fitout[i] = np.nan, np.nan, np.nan
                        optout[i] = popt*np.nan
                    else:
                        fitout[i] = self.overlap(xc, *popt), self.frac(*popt), xc
                        optout[i] = popt
                except (RuntimeError, RuntimeWarning, TypeError):
                    logger.exception('Bad fit on Shot: {} '.format(i))
                    fitout[i] = np.nan, np.nan, np.nan
                    optout[i] = np.ones(6)*np.nan
            iterationResults['analysis/dblGaussPopt'] = optout
            iterationResults['analysis/dblGaussFit'] = fitout
            logger.info("histout: {}".format(histout))
            iterationResults['analysis/histogram'] = np.array(histout,
                                                              dtype='uint32')
            self.updateFigure(iterationResults)
        return