def estimHF0(self, R=1, maxFrames=1000):
        """
        estimating and storing only HF0 for the whole excerpt,
        with only 
        """
        ## section to estimate the melody, on monophonic algo:
        #SX = self.computeMonoX() # too heavy, try to guess before hand instead
        #totFrames = SX.shape[1]
        totFrames, nChunks, maxFrames = self.checkChunkSize(maxFrames)
        # First round of parameter estimation:
        print "    Estimating IMM parameters, on mean of channels, with",R,\
              "\n    accompaniment components."+\
              "    Nb of chunks: %d." %nChunks
        # del SX
        self.SIMMParams['HF0'] = np.zeros([self.SIMMParams['NF0'] * \
                                           self.SIMMParams['chirpPerF0'],
                                           totFrames])
        for n in range(nChunks):
            if self.verbose:
                print "Chunk nb", n+1, "out of", nChunks
            start = n*maxFrames
            stop = np.minimum((n+1)*maxFrames, totFrames)
            SX = self.computeMonoX(start=start, stop=stop)
            if self.SIMMParams['initHF00'] == 'nnls':
                # probably slower than running from random...
                HF00 = np.ones((self.SIMMParams['NF0']
                                * self.SIMMParams['chirpPerF0'],
                                stop-start))
                for framenb in range(stop-start):
                    if self.verbose>1:
                        print "frame", framenb
                    HF00[:,framenb], _ = scipy.optimize.nnls(
                        self.SIMMParams['WF0'],
                        SX[:,framenb])
                HF00 += eps
            else:
                HF00 = None
            HGAMMA, HPHI, HF0, HM, WM, recoError1 = SIMM.SIMM(
                # the data to be fitted to:
                SX,
                # the basis matrices for the spectral combs
                WF0=self.SIMMParams['WF0'],
                # and for the elementary filters:
                WGAMMA=self.SIMMParams['WGAMMA'],
                # number of desired filters, accompaniment spectra:
                numberOfFilters=self.SIMMParams['K'],
                numberOfAccompanimentSpectralShapes=R,#self.SIMMParams['R'],
                # putting only 2 elements in accompaniment for a start...
                # if any, initial amplitude matrices for 
                HGAMMA0=None, HPHI0=None,
                HF00=HF00, 
                WM0=None, HM0=None,
                # Some more optional arguments, to control the "convergence"
                # of the algo
                numberOfIterations=self.SIMMParams['niter'],
                updateRulePower=1.,
                stepNotes=self.SIMMParams['stepNotes'], 
                lambdaHF0 = 0.0 / (1.0 * SX.max()), alphaHF0=0.9,
                verbose=self.verbose,
                displayEvolution=self.displayEvolution,
                imageCanvas=self.imageCanvas,
                F0Table=self.SIMMParams['F0Table'],
                chirpPerF0=self.SIMMParams['chirpPerF0'])