24 changed files with 1114 additions and 13 deletions
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 61 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.8 KiB |
Binary file not shown.
@ -0,0 +1,148 @@
@@ -0,0 +1,148 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2023 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Helper class for noise reduction //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <algorithm> |
||||
#include <numeric> |
||||
|
||||
#include <QDebug> |
||||
|
||||
#include "fftnr.h" |
||||
|
||||
FFTNoiseReduction::FFTNoiseReduction(int len) : |
||||
m_flen(len) |
||||
{ |
||||
m_scheme = SchemeAverage; |
||||
m_mags = new float[m_flen]; |
||||
m_tmp = new float[m_flen]; |
||||
m_aboveAvgFactor = 1.0; |
||||
m_sigmaFactor = 1.0; |
||||
m_nbPeaks = m_flen; |
||||
} |
||||
|
||||
FFTNoiseReduction::~FFTNoiseReduction() |
||||
{ |
||||
delete[] m_mags; |
||||
delete[] m_tmp; |
||||
} |
||||
|
||||
void FFTNoiseReduction::init() |
||||
{ |
||||
std::fill(m_mags, m_mags + m_flen, 0); |
||||
std::fill(m_tmp, m_tmp + m_flen, 0); |
||||
m_magAvg = 0; |
||||
} |
||||
|
||||
void FFTNoiseReduction::push(cmplx data, int index) |
||||
{ |
||||
m_mags[index] = std::abs(data); |
||||
|
||||
if ((m_scheme == SchemeAverage) || (m_scheme == SchemeAvgStdDev)) { |
||||
m_magAvg += m_mags[index]; |
||||
} |
||||
} |
||||
|
||||
void FFTNoiseReduction::calc() |
||||
{ |
||||
if (m_scheme == SchemeAverage) |
||||
{ |
||||
m_magAvg /= m_flen; |
||||
m_magAvg = m_expFilter.push(m_magAvg); |
||||
} |
||||
if (m_scheme == SchemeAvgStdDev) |
||||
{ |
||||
m_magAvg /= m_flen; |
||||
|
||||
auto variance_func = [this](float accumulator, const float& val) { |
||||
return accumulator + ((val - m_magAvg)*(val - m_magAvg) / (m_flen - 1)); |
||||
}; |
||||
|
||||
float var = std::accumulate(m_mags, m_mags + m_flen, 0.0, variance_func); |
||||
m_magThr = (m_sigmaFactor/2.0)*std::sqrt(var) + m_magAvg; |
||||
m_magThr = m_expFilter.push(m_magThr); |
||||
} |
||||
else if (m_scheme == SchemePeaks) |
||||
{ |
||||
std::copy(m_mags, m_mags + m_flen, m_tmp); |
||||
std::sort(m_tmp, m_tmp + m_flen); |
||||
m_magThr = m_tmp[m_flen - m_nbPeaks]; |
||||
} |
||||
} |
||||
|
||||
bool FFTNoiseReduction::cut(int index) |
||||
{ |
||||
if (m_scheme == SchemeAverage) |
||||
{ |
||||
return m_mags[index] < m_aboveAvgFactor * m_magAvg; |
||||
} |
||||
else if ((m_scheme == SchemePeaks) || (m_scheme == SchemeAvgStdDev)) |
||||
{ |
||||
return m_mags[index] < m_magThr; |
||||
} |
||||
|
||||
return false; |
||||
} |
||||
|
||||
void FFTNoiseReduction::setScheme(Scheme scheme) |
||||
{ |
||||
if (m_scheme != scheme) { |
||||
m_expFilter.reset(); |
||||
} |
||||
|
||||
m_scheme = scheme; |
||||
} |
||||
|
||||
FFTNoiseReduction::ExponentialFilter::ExponentialFilter() |
||||
{ |
||||
m_alpha = 1.0; |
||||
m_init = true; |
||||
} |
||||
|
||||
float FFTNoiseReduction::ExponentialFilter::push(float newValue) |
||||
{ |
||||
if (m_init) |
||||
{ |
||||
m_prev = newValue; |
||||
m_init = false; |
||||
} |
||||
|
||||
if (m_alpha == 1.0) |
||||
{ |
||||
m_prev = newValue; |
||||
return newValue; |
||||
} |
||||
else |
||||
{ |
||||
float result = m_alpha*m_prev + (1.0 - m_alpha)*newValue; |
||||
m_prev = result; |
||||
return result; |
||||
} |
||||
} |
||||
|
||||
void FFTNoiseReduction::ExponentialFilter::reset() |
||||
{ |
||||
m_init = true; |
||||
} |
||||
|
||||
void FFTNoiseReduction::ExponentialFilter::setAlpha(float alpha) |
||||
{ |
||||
m_alpha = alpha < 0.0f ? 0.0f : alpha > 1.0f ? 1.0f : alpha; |
||||
qDebug("FFTNoiseReduction::ExponentialFilter::setAlpha: %f", m_alpha); |
||||
m_init = true; |
||||
} |
||||
|
||||
@ -0,0 +1,72 @@
@@ -0,0 +1,72 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2023 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// Helper class for noise reduction //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _FFTNR_H |
||||
#define _FFTNR_H |
||||
|
||||
#include <complex> |
||||
|
||||
#include "export.h" |
||||
|
||||
class SDRBASE_API FFTNoiseReduction { |
||||
public: |
||||
typedef std::complex<float> cmplx; |
||||
enum Scheme { |
||||
SchemeAverage, |
||||
SchemeAvgStdDev, |
||||
SchemePeaks |
||||
}; |
||||
|
||||
FFTNoiseReduction(int len); |
||||
~FFTNoiseReduction(); |
||||
|
||||
void init(); //!< call befor start of initial FFT scan
|
||||
void push(cmplx data, int index); //!< Push FFT bin during initial FFT scan
|
||||
void calc(); //!< calculate after initial FFT scan
|
||||
bool cut(int index); //!< true if bin is to be zeroed else false (during second FFT scan)
|
||||
void setAlpha(float alpha) { m_expFilter.setAlpha(alpha); } |
||||
void setScheme(Scheme scheme); |
||||
|
||||
float m_aboveAvgFactor; //!< above average factor
|
||||
float m_sigmaFactor; //!< sigma multiplicator for average + std deviation
|
||||
int m_nbPeaks; //!< number of peaks (peaks scheme)
|
||||
|
||||
private: |
||||
class ExponentialFilter { |
||||
public: |
||||
ExponentialFilter(); |
||||
float push(float newValue); |
||||
void reset(); |
||||
void setAlpha(float alpha); |
||||
private: |
||||
bool m_init; |
||||
float m_alpha; |
||||
float m_prev; |
||||
}; |
||||
|
||||
Scheme m_scheme; |
||||
int m_flen; //!< FFT length
|
||||
float *m_mags; //!< magnitudes (PSD)
|
||||
float *m_tmp; //!< temporary buffer
|
||||
float m_magAvg; //!< average of magnitudes
|
||||
float m_magThr; //!< magnitude threshold (peaks scheme)
|
||||
ExponentialFilter m_expFilter; //!< exponential filter for parameter smoothing
|
||||
}; |
||||
|
||||
#endif |
||||
@ -0,0 +1,210 @@
@@ -0,0 +1,210 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2023 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "util/db.h" |
||||
#include "fftnrdialog.h" |
||||
#include "ui_fftnrdialog.h" |
||||
|
||||
FFTNRDialog::FFTNRDialog(QWidget* parent) : |
||||
QDialog(parent), |
||||
ui(new Ui::FFTNRDialog) |
||||
{ |
||||
ui->setupUi(this); |
||||
} |
||||
|
||||
FFTNRDialog::~FFTNRDialog() |
||||
{ |
||||
delete ui; |
||||
} |
||||
|
||||
void FFTNRDialog::setScheme(FFTNoiseReduction::Scheme scheme) |
||||
{ |
||||
ui->scheme->blockSignals(true); |
||||
ui->genParam->blockSignals(true); |
||||
|
||||
switch (scheme) |
||||
{ |
||||
case FFTNoiseReduction::Scheme::SchemeAverage: |
||||
ui->scheme->setCurrentIndex(0); |
||||
ui->genParam->setMinimum(200); |
||||
ui->genParam->setMaximum(990); |
||||
ui->genParam->setValue(m_aboveAvgFactor*10); |
||||
ui->genParam->setToolTip("Above average multiplier"); |
||||
ui->genParamLabel->setText("Above avg mult"); |
||||
ui->genParamValue->setText(tr("%1").arg(m_aboveAvgFactor, 0, 'f', 1)); |
||||
break; |
||||
case FFTNoiseReduction::Scheme::SchemeAvgStdDev: |
||||
ui->scheme->setCurrentIndex(1); |
||||
ui->genParam->setMinimum(20); |
||||
ui->genParam->setMaximum(160); |
||||
ui->genParam->setValue(m_sigmaFactor*10); |
||||
ui->genParam->setToolTip("Standard deviation multiplier"); |
||||
ui->genParamLabel->setText("Sigma multiplier"); |
||||
ui->genParamValue->setText(tr("%1").arg(m_sigmaFactor, 0, 'f', 1)); |
||||
break; |
||||
case FFTNoiseReduction::Scheme::SchemePeaks: |
||||
ui->scheme->setCurrentIndex(2); |
||||
ui->genParam->setMinimum(1); |
||||
ui->genParam->setMaximum(40); |
||||
ui->genParam->setValue(m_nbPeaks); |
||||
ui->genParam->setToolTip("Number of max peaks selected"); |
||||
ui->genParamLabel->setText("Nb of peaks"); |
||||
ui->genParamValue->setText(tr("%1").arg(m_nbPeaks)); |
||||
break; |
||||
default: |
||||
break; |
||||
} |
||||
|
||||
ui->scheme->blockSignals(false); |
||||
ui->genParam->blockSignals(false); |
||||
|
||||
m_scheme = scheme; |
||||
} |
||||
|
||||
void FFTNRDialog::setAboveAvgFactor(float aboveAvgFactor) |
||||
{ |
||||
if (aboveAvgFactor < 20.0f) |
||||
{ |
||||
m_aboveAvgFactor = 20.0f; |
||||
emit valueChanged(ChangedAboveAvgFactor); |
||||
} |
||||
else if (aboveAvgFactor > 99.0f) |
||||
{ |
||||
m_aboveAvgFactor = 99.0f; |
||||
emit valueChanged(ChangedAboveAvgFactor); |
||||
} |
||||
else{ |
||||
m_aboveAvgFactor = aboveAvgFactor; |
||||
} |
||||
|
||||
if (m_scheme == FFTNoiseReduction::Scheme::SchemeAverage) |
||||
{ |
||||
ui->genParam->blockSignals(true); |
||||
ui->genParam->setValue(m_aboveAvgFactor*10); |
||||
ui->genParamValue->setText(tr("%1").arg(m_aboveAvgFactor, 0, 'f', 1)); |
||||
ui->genParam->blockSignals(false); |
||||
} |
||||
} |
||||
|
||||
void FFTNRDialog::setSigmaFactor(float sigmaFactor) |
||||
{ |
||||
if (sigmaFactor < 2.0f) |
||||
{ |
||||
m_sigmaFactor = 2.0f; |
||||
emit valueChanged(ChangedSigmaFactor); |
||||
} |
||||
else if (sigmaFactor > 16.0f) |
||||
{ |
||||
m_sigmaFactor = 16.0f; |
||||
emit valueChanged(ChangedSigmaFactor); |
||||
} |
||||
else{ |
||||
m_sigmaFactor = sigmaFactor; |
||||
} |
||||
|
||||
if (m_scheme == FFTNoiseReduction::Scheme::SchemeAvgStdDev) |
||||
{ |
||||
ui->genParam->blockSignals(true); |
||||
ui->genParam->setValue(m_sigmaFactor*10); |
||||
ui->genParamValue->setText(tr("%1").arg(m_sigmaFactor, 0, 'f', 1)); |
||||
ui->genParam->blockSignals(false); |
||||
} |
||||
} |
||||
|
||||
void FFTNRDialog::setNbPeaks(int nbPeaks) |
||||
{ |
||||
if (nbPeaks < 1) |
||||
{ |
||||
m_nbPeaks = 1; |
||||
emit valueChanged(ChangedNbPeaks); |
||||
} |
||||
else if (nbPeaks > 40) |
||||
{ |
||||
m_nbPeaks = 40; |
||||
emit valueChanged(ChangedNbPeaks); |
||||
} |
||||
else{ |
||||
m_nbPeaks = nbPeaks; |
||||
} |
||||
|
||||
if (m_scheme == FFTNoiseReduction::Scheme::SchemePeaks) |
||||
{ |
||||
ui->genParam->blockSignals(true); |
||||
ui->genParam->setValue(m_nbPeaks); |
||||
ui->genParamValue->setText(tr("%1").arg(m_nbPeaks)); |
||||
ui->genParam->blockSignals(false); |
||||
} |
||||
} |
||||
|
||||
void FFTNRDialog::setAlpha(float alpha, int fftLength, int sampleRate) |
||||
{ |
||||
m_alpha = alpha < 0.0f ? 0.0f : alpha > 0.99999 ? 0.99999f : alpha; |
||||
m_flen = fftLength; |
||||
m_sampleRate = sampleRate; |
||||
int alphaDisplay = -round(CalcDb::dbPower(1.0f - m_alpha)); |
||||
ui->alpha->blockSignals(true); |
||||
ui->alpha->setValue(alphaDisplay); |
||||
ui->alpha->blockSignals(false); |
||||
ui->alphaValue->setText(tr("%1").arg(alphaDisplay)); |
||||
ui->alphaValue->setToolTip(tr("dB(1 - alpha) alpha=%1").arg(m_alpha, 0, 'f', 5)); |
||||
float t = m_flen; |
||||
t /= m_sampleRate; |
||||
float tau = -(t / log(m_alpha)); |
||||
ui->tauText->setText(tr("%1").arg(tau, 0, 'f', 3)); |
||||
} |
||||
|
||||
void FFTNRDialog::on_scheme_currentIndexChanged(int index) |
||||
{ |
||||
setScheme((FFTNoiseReduction::Scheme) index); |
||||
emit valueChanged(ChangedScheme); |
||||
} |
||||
|
||||
void FFTNRDialog::on_genParam_valueChanged(int value) |
||||
{ |
||||
switch (m_scheme) |
||||
{ |
||||
case FFTNoiseReduction::Scheme::SchemeAverage: |
||||
m_aboveAvgFactor = value / 10.0f; |
||||
ui->genParamValue->setText(tr("%1").arg(m_aboveAvgFactor, 0, 'f', 1)); |
||||
emit valueChanged(ChangedAboveAvgFactor); |
||||
break; |
||||
case FFTNoiseReduction::Scheme::SchemeAvgStdDev: |
||||
m_sigmaFactor = value / 10.0f; |
||||
ui->genParamValue->setText(tr("%1").arg(m_sigmaFactor, 0, 'f', 1)); |
||||
emit valueChanged(ChangedSigmaFactor); |
||||
break; |
||||
case FFTNoiseReduction::Scheme::SchemePeaks: |
||||
m_nbPeaks = value; |
||||
ui->genParamValue->setText(tr("%1").arg(m_nbPeaks)); |
||||
emit valueChanged(ChangedNbPeaks); |
||||
break; |
||||
default: |
||||
break; |
||||
} |
||||
} |
||||
|
||||
void FFTNRDialog::on_alpha_valueChanged(int value) |
||||
{ |
||||
m_alpha = 1.0 - CalcDb::powerFromdB(-value); |
||||
ui->alphaValue->setText(tr("%1").arg(value)); |
||||
ui->alphaValue->setToolTip(tr("dB(1 - alpha) alpha=%1").arg(m_alpha, 0, 'f', 5)); |
||||
float t = m_flen; |
||||
t /= m_sampleRate; |
||||
float tau = -(t / log(m_alpha)); |
||||
ui->tauText->setText(tr("%1").arg(tau, 0, 'f', 3)); |
||||
emit valueChanged(ChangedAlpha); |
||||
} |
||||
@ -0,0 +1,75 @@
@@ -0,0 +1,75 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2023 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef SDRGUI_GUI_FFTNRDIALOG_H_ |
||||
#define SDRGUI_GUI_FFTNRDIALOG_H_ |
||||
|
||||
#include <QDialog> |
||||
|
||||
#include "dsp/fftnr.h" |
||||
#include "export.h" |
||||
|
||||
namespace Ui { |
||||
class FFTNRDialog; |
||||
} |
||||
|
||||
class SDRGUI_API FFTNRDialog : public QDialog { |
||||
Q_OBJECT |
||||
public: |
||||
enum ValueChanged { |
||||
ChangedScheme, |
||||
ChangedAboveAvgFactor, |
||||
ChangedSigmaFactor, |
||||
ChangedNbPeaks, |
||||
ChangedAlpha |
||||
}; |
||||
|
||||
explicit FFTNRDialog(QWidget* parent = nullptr); |
||||
~FFTNRDialog(); |
||||
|
||||
void setScheme(FFTNoiseReduction::Scheme scheme); |
||||
void setAboveAvgFactor(float aboveAvgFactor); |
||||
void setSigmaFactor(float sigmaFactor); |
||||
void setNbPeaks(int nbPeaks); |
||||
void setAlpha(float alpha, int fftLength, int sampleRate); |
||||
|
||||
FFTNoiseReduction::Scheme getScheme() const { return m_scheme; } |
||||
float getAboveAvgFactor() const { return m_aboveAvgFactor; } |
||||
float getSigmaFactor() const { return m_sigmaFactor; } |
||||
int getNbPeaks() const { return m_nbPeaks; } |
||||
float getAlpha() const { return m_alpha; } |
||||
|
||||
signals: |
||||
void valueChanged(int valueChanged); |
||||
|
||||
private: |
||||
Ui::FFTNRDialog *ui; |
||||
FFTNoiseReduction::Scheme m_scheme; |
||||
float m_aboveAvgFactor; //!< above average factor
|
||||
float m_sigmaFactor; //!< sigma multiplicator for average + std deviation
|
||||
int m_nbPeaks; //!< number of peaks (peaks scheme)
|
||||
float m_alpha; //!< parameter EMA alpha factor
|
||||
int m_flen; //!< FFT filter FFT length used to display time constant
|
||||
int m_sampleRate; //!< Sample rate used to display time constant
|
||||
void updateScheme(); |
||||
|
||||
private slots: |
||||
void on_scheme_currentIndexChanged(int index); |
||||
void on_genParam_valueChanged(int value); |
||||
void on_alpha_valueChanged(int value); |
||||
}; |
||||
|
||||
#endif |
||||
@ -0,0 +1,320 @@
@@ -0,0 +1,320 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<ui version="4.0"> |
||||
<class>FFTNRDialog</class> |
||||
<widget class="QDialog" name="FFTNRDialog"> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>365</width> |
||||
<height>112</height> |
||||
</rect> |
||||
</property> |
||||
<property name="font"> |
||||
<font> |
||||
<family>Liberation Sans</family> |
||||
<pointsize>9</pointsize> |
||||
</font> |
||||
</property> |
||||
<property name="windowTitle"> |
||||
<string>FFT Noise reduction</string> |
||||
</property> |
||||
<property name="modal"> |
||||
<bool>true</bool> |
||||
</property> |
||||
<layout class="QVBoxLayout" name="verticalLayout"> |
||||
<item> |
||||
<layout class="QHBoxLayout" name="nrSetup"> |
||||
<item> |
||||
<widget class="QLabel" name="schemeLabel"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>Path to fftwf-wisdom executable</string> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Scheme</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QComboBox" name="scheme"> |
||||
<property name="toolTip"> |
||||
<string>Select noise reduction scheme</string> |
||||
</property> |
||||
<item> |
||||
<property name="text"> |
||||
<string>Average</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>Avg Std Dev</string> |
||||
</property> |
||||
</item> |
||||
<item> |
||||
<property name="text"> |
||||
<string>Peaks</string> |
||||
</property> |
||||
</item> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QLabel" name="genParamLabel"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>120</width> |
||||
<height>0</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>Path to fftwf-wisdom executable</string> |
||||
</property> |
||||
<property name="text"> |
||||
<string>...</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QDial" name="genParam"> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>24</width> |
||||
<height>24</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string/> |
||||
</property> |
||||
<property name="minimum"> |
||||
<number>1</number> |
||||
</property> |
||||
<property name="maximum"> |
||||
<number>26</number> |
||||
</property> |
||||
<property name="pageStep"> |
||||
<number>1</number> |
||||
</property> |
||||
<property name="value"> |
||||
<number>13</number> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QLabel" name="genParamValue"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>28</width> |
||||
<height>0</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>Path to fftwf-wisdom executable</string> |
||||
</property> |
||||
<property name="text"> |
||||
<string>20.0</string> |
||||
</property> |
||||
<property name="alignment"> |
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<spacer name="horizontalSpacer"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>40</width> |
||||
<height>20</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
<item> |
||||
<layout class="QHBoxLayout" name="averagingLayout"> |
||||
<item> |
||||
<widget class="QLabel" name="alphaLabel"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string/> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Alpha</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QDial" name="alpha"> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>24</width> |
||||
<height>24</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>-db(1 - alpha) alpha is the smoothing constant of the exponential filter </string> |
||||
</property> |
||||
<property name="minimum"> |
||||
<number>1</number> |
||||
</property> |
||||
<property name="maximum"> |
||||
<number>40</number> |
||||
</property> |
||||
<property name="pageStep"> |
||||
<number>1</number> |
||||
</property> |
||||
<property name="value"> |
||||
<number>13</number> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QLabel" name="alphaValue"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>-dB(1 - alpha) alpha=...</string> |
||||
</property> |
||||
<property name="text"> |
||||
<string>00</string> |
||||
</property> |
||||
<property name="alignment"> |
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QLabel" name="tauLabel"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>Path to fftwf-wisdom executable</string> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Tau</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QLabel" name="tauText"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>40</width> |
||||
<height>0</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>Time constant of the smoothing filter in seconds</string> |
||||
</property> |
||||
<property name="text"> |
||||
<string>0.000</string> |
||||
</property> |
||||
<property name="alignment"> |
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<spacer name="horizontalSpacer_2"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>40</width> |
||||
<height>20</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
<item> |
||||
<widget class="QDialogButtonBox" name="buttonBox"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="standardButtons"> |
||||
<set>QDialogButtonBox::Close</set> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<resources> |
||||
<include location="../resources/res.qrc"/> |
||||
</resources> |
||||
<connections> |
||||
<connection> |
||||
<sender>buttonBox</sender> |
||||
<signal>accepted()</signal> |
||||
<receiver>FFTNRDialog</receiver> |
||||
<slot>accept()</slot> |
||||
<hints> |
||||
<hint type="sourcelabel"> |
||||
<x>248</x> |
||||
<y>254</y> |
||||
</hint> |
||||
<hint type="destinationlabel"> |
||||
<x>157</x> |
||||
<y>274</y> |
||||
</hint> |
||||
</hints> |
||||
</connection> |
||||
<connection> |
||||
<sender>buttonBox</sender> |
||||
<signal>rejected()</signal> |
||||
<receiver>FFTNRDialog</receiver> |
||||
<slot>reject()</slot> |
||||
<hints> |
||||
<hint type="sourcelabel"> |
||||
<x>316</x> |
||||
<y>260</y> |
||||
</hint> |
||||
<hint type="destinationlabel"> |
||||
<x>286</x> |
||||
<y>274</y> |
||||
</hint> |
||||
</hints> |
||||
</connection> |
||||
</connections> |
||||
</ui> |
||||
Loading…
Reference in new issue