obspy.signal.util.nearestPow2

nearestPow2(x)[source]

Finds the nearest integer that is a power of 2. In contrast to nextpow2() also searches for numbers smaller than the input and returns them if they are closer than the next bigger power of 2.