MCPcopy Create free account
hub / github.com/PyTTaMaster/PyTTa / calib_press

Method calib_press

pytta/classes/_base.py:410–422  ·  view source on GitHub ↗
(self, refSignalObj, refPrms, refFreq)

Source from the content-addressed store, hash-verified

408 return
409
410 def calib_press(self, refSignalObj, refPrms, refFreq):
411 # Prms = np.max(np.abs(refSignalObj.freqSignal[:, 0])) #/ (2**(1/2))
412 Prms = refSignalObj.rms()[0]
413 freqFound = np.round(refSignalObj.freqVector[np.argmax(
414 refSignalObj.freqSignal)])
415 if not np.isclose(freqFound, float(refFreq), rtol=1e-4):
416 print('\x1b[0;30;43mATTENTION! Found calibration frequency (' +
417 '{}'.format(freqFound) +
418 ' [Hz]) differs from refFreq (' +
419 '{}'.format(refFreq) + ' [Hz])\x1b[0m')
420 self.CF = refPrms/Prms
421 self.unit = 'Pa'
422 return
423
424# ChannelObj properties
425 @property

Callers 2

calib_pressureMethod · 0.80
calib_pressureMethod · 0.80

Calls 1

rmsMethod · 0.45

Tested by

no test coverage detected