Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ friture.egg-info
Notepad++
.idea
.vscode
.qt_for_python

.mypy_cache
6 changes: 3 additions & 3 deletions friture/histplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,11 @@ def setspecrange(self, spec_min, spec_max):
self.update()

def setweighting(self, weighting):
if weighting is 0:
if weighting == 0:
title = "PSD (dB)"
elif weighting is 1:
elif weighting == 1:
title = "PSD (dB A)"
elif weighting is 2:
elif weighting == 2:
title = "PSD (dB B)"
else:
title = "PSD (dB C)"
Expand Down
6 changes: 3 additions & 3 deletions friture/imageplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,11 @@ def setspecrange(self, spec_min, spec_max):
self.update()

def setweighting(self, weighting):
if weighting is 0:
if weighting == 0:
title = "PSD (dB)"
elif weighting is 1:
elif weighting == 1:
title = "PSD (dB A)"
elif weighting is 2:
elif weighting == 2:
title = "PSD (dB B)"
else:
title = "PSD (dB C)"
Expand Down
6 changes: 3 additions & 3 deletions friture/octavespectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ def handle_new_data(self, floatdata):

sp = array(sp)

if self.weighting is 0:
if self.weighting == 0:
w = 0.
elif self.weighting is 1:
elif self.weighting == 1:
w = self.filters.A
elif self.weighting is 2:
elif self.weighting == 2:
w = self.filters.B
else:
w = self.filters.C
Expand Down
6 changes: 3 additions & 3 deletions friture/spectrogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ def setweighting(self, weighting):

def update_weighting(self):
A, B, C = self.proc.get_freq_weighting()
if self.weighting is 0:
if self.weighting == 0:
self.w = array([0.])
elif self.weighting is 1:
elif self.weighting == 1:
self.w = A
elif self.weighting is 2:
elif self.weighting == 2:
self.w = B
else:
self.w = C
Expand Down
6 changes: 3 additions & 3 deletions friture/spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ def setweighting(self, weighting):

def update_weighting(self):
A, B, C = self.proc.get_freq_weighting()
if self.weighting is 0:
if self.weighting == 0:
self.w = zeros(A.shape)
elif self.weighting is 1:
elif self.weighting == 1:
self.w = A
elif self.weighting is 2:
elif self.weighting == 2:
self.w = B
else:
self.w = C
Expand Down
6 changes: 3 additions & 3 deletions friture/spectrumPlotWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ def setspecrange(self, spec_min, spec_max):
self.normVerticalScaleTransform.setRange(spec_min, spec_max)

def setweighting(self, weighting):
if weighting is 0:
if weighting == 0:
title = "PSD (dB)"
elif weighting is 1:
elif weighting == 1:
title = "PSD (dB A)"
elif weighting is 2:
elif weighting == 2:
title = "PSD (dB B)"
else:
title = "PSD (dB C)"
Expand Down