def getScans(self, modifications=True, fdr=True):
        """
        get a random scan
        """
        if fdr:
            sql = "select sp.Spectrum, p.Sequence, p.PeptideID, p.SpectrumID from spectrumheaders sh left join spectra sp on (sp.UniqueSpectrumID=sh.UniqueSpectrumID) left join peptides p on (sh.SpectrumID=p.SpectrumID) WHERE p.ConfidenceLevel >= %d and p.SearchEngineRank <= %d" % (self.clvl, self.srank)
            try:
                self.cur.execute(sql)
            except sqlite3.OperationalError:
                sql = "select sp.Spectrum, p.Sequence, p.PeptideID, p.SpectrumID from spectrumheaders sh left join spectra sp on (sp.UniqueSpectrumID=sh.UniqueSpectrumID) left join peptides p on (sh.SpectrumID=p.SpectrumID) WHERE p.ConfidenceLevel >= %d" % self.clvl
                self.cur.execute(sql)
        else:
            sql = "select sp.Spectrum, p.Sequence, p.PeptideID, p.SpectrumID from spectrumheaders sh left join spectra sp on (sp.UniqueSpectrumID=sh.UniqueSpectrumID) left join peptides p on (sh.SpectrumID=p.SpectrumID)"
            self.cur.execute(sql)
        while True:
            results = self.cur.fetchmany(1000)
            if not results:
                break
            for tup in results:
                scan = self.parseFullScan(tup, modifications=modifications)
                scan.spectrumId = tup[3]
                yield scan
        yield None
get a random scan