def getAverage(self, start=0, end=0): startIndex, endIndex = getIndices(self._pressureGradient[0, :], start, end) if hasattr(self, "_averagePressureGradient"): return self._averagePressureGradient else: return self._calcAverage(start, end)
def _calcAverage(self, start=0, end=0): startIndex, endIndex = getIndices(self._pressureGradient[0, :], start, end) self._averagePressureGradient = np.average( self._pressureGradient[1, startIndex:endIndex]) if self._verbose == True: print("calulated average: ", self._averagePressureGradient)
def getFFT(self, start=0, end=0): startIndex, endIndex = getIndices(self._pressureGradient[0, :], start, end) if hasattr(self, "_FFT"): return self._FFT else: return self._calcFFT(start, end)
def getStdDev(self, start=0, end=0): startIndex, endIndex = getIndices(self._pressureGradient[0, :], start, end) if hasattr(self, "_stdDevPressureGradient"): return self._stdDevPressureGradient else: return self._calcStd(start, end)
def _calcFFT(self, start=0, end=0): startIndex, endIndex = getIndices(self._pressureGradient[0, :], start, end) self._FFT = [ fftAnalysis(self._pressureGradient[0, startIndex:endIndex], self._pressureGradient[1, startIndex:endIndex]) ] return self._FFT
def _calcStdDev(self, start=0, end=0): startIndex, endIndex = getIndices(self._pressureGradient[0, :], start, end) self._stdDevPressureGradient = np.std( self._pressureGradient[1, startIndex:endIndex]) return self._stdDevPressureGradient
def getTimes(self, start=0, end=0): startIndex, endIndex = getIndices(self._pressureGradient[0, :], start, end) return self._pressureGradient[0, startIndex:endIndex]