def __get_mca0(self, chan_min=2, min_counts=2):
        if self.__mca0 is None:
            for imca, mca in enumerate(self.mcas):
                if mca.counts[chan_min:].sum() > min_counts:
                    self.__mca0 = mca
                    self.offset = mca.offset
                    self.slope  = mca.slope
                    self.quad   = mca.quad
                    break
                elif imca not in self.bad:
                    self.bad.append(imca)
            if self.__mca0 is None:
                self.__mca0 = mca = self.mcas[0]
                self.offset = mca.offset
                self.slope  = mca.slope
                self.quad   = mca.quad
        return self.__mca0
Insert the value.
dataset/ETHPy150Open xraypy/xraylarch/plugins/io/gse_mcafile.py/GSEMCA_File.__get_mca0--crossover with--dataset/ETHPy150Open agoragames/kairos/kairos/redis_backend.py/RedisBackend._insert