Merged upstream

This commit is contained in:
Anne de Jong 2021-05-23 19:21:15 +02:00
parent 9005bda017
commit ab965815fb
3 changed files with 10 additions and 1 deletions

View File

@ -157,6 +157,14 @@ class AudioStream:
return 1
self.aframectr += 1
# TODO: Fix this. This gives bug on Windows, the threading lock does
# give a strange erro.
try:
if not self.running():
return 1
except Exception as e:
print(e)
rv = self.processCallback(self, indata, outdata)
if rv != 0:
self.running <<= False

View File

@ -246,7 +246,7 @@ class Measurement:
except KeyError:
# If quantity data is not available, this is an 'old'
# measurement file.
logging.debug('Physical quantity data not available in measurement file. Assuming {SIQtys.default}')
logging.debug(f'Physical quantity data not available in measurement file. Assuming {SIQtys.default}')
self._qtys = [SIQtys.default for i in range(self.nchannels)]
def setAttribute(self, atrname, value):

View File

@ -84,6 +84,7 @@ def smoothSpectralData(freq, M, sw: SmoothingWidth,
assert Noct > 0, "'Noct' must be absolute positive"
if Noct < 1: raise Warning('Check if \'Noct\' is entered correctly')
assert len(freq)==len(M), 'f and M should have equal length'
if st == SmoothingType.ps:
assert np.min(M) >= 0, 'absolute magnitude M cannot be negative'
if st == SmoothingType.levels and isinstance(M.dtype, complex):