soapypower/power.py
def nearest_overlap(self, overlap, bins):
        """Return nearest overlap/crop factor based on number of bins"""
        bins_overlap = overlap * bins
        if bins_overlap % 2 != 0:
            bins_overlap = math.ceil(bins_overlap / 2) * 2
            overlap = bins_overlap / bins
            logger.warning('number of overlapping FFT bins should be even, '
                           'changing overlap/crop factor to {:.5f}'.format(overlap))
        return overlap
def nearest_overlap(self, overlap, bins):
        """Return nearest overlap/crop factor based on number of bins"""
        bins_overlap = overlap * bins
        if bins_overlap % 2 != 0:
            bins_overlap = math.ceil(bins_overlap / 2) * 2
            overlap = bins_overlap / bins
            logger.warning('number of overlapping FFT bins should be even, '
                           'changing overlap/crop factor to {:.5f}'.format(overlap))
        return overlap
def nearest_overlap ( self , overlap , bins ) : bins_overlap = overlap * bins if bins_overlap % 2 != 0 : bins_overlap = math . ceil ( bins_overlap / 2 ) * 2 overlap = bins_overlap / bins logger . warning ( 'number of overlapping FFT bins should be even, ' 'changing overlap/crop factor to {:.5f}' . format ( overlap ) ) return overlap
Return nearest overlap/crop factor based on number of bins
Return nearest overlap / crop factor based on number of bins