removed mertz

This commit is contained in:
Robert 2021-04-30 11:36:18 +02:00
parent f2ad3bd04a
commit 0609fe6c33
3 changed files with 5 additions and 15 deletions

View file

@ -26,7 +26,6 @@ struct Settings {
double minFreq, maxFreq;
unsigned int analyzeChannel;
unsigned int zeropadding;
bool mertz;
WindowFunctions window;
};
@ -73,8 +72,7 @@ int main(int argc, char** argv)
audioFile.samples[c-1].cend(),
sampleRate,
setts.minFreq, setts.maxFreq,
setts.zeropadding,
setts.mertz
setts.zeropadding
);
output[chName] = nlohmann::json::array();
@ -98,8 +96,7 @@ int main(int argc, char** argv)
),
sampleRate,
setts.minFreq, setts.maxFreq,
setts.zeropadding,
setts.mertz
setts.zeropadding
);
output[chName].push_back({
@ -143,7 +140,6 @@ Settings Parse(int argc, char** argv)
("f,frequency", "Defines the frequency range of the output spectrum (Default: all the frequencies)", cxxopts::value<std::vector<double>>())
("p,pad", "Add extra zero-padding. By default, the program will pad the signals with 0s until the number of samples is a power of 2 (this would be equivalent to -p 1). With this option you can tell the program to instead pad until the power of 2 after the next one (-p 2) etc. This increases frequency resolution", cxxopts::value<unsigned int>())
("w,window", "Specify the window function used (rectangle (default), von-hann, gauss, triangle, blackman (3-term))", cxxopts::value<std::string>()->default_value("rectangle"))
("mertz", "Use the Mertz method to phase-correct the complex Fourier spectrum")
("m,mono", "Analyze only the given channel", cxxopts::value<unsigned int>()->default_value("0"))
("files", "Files to fourier transform", cxxopts::value<std::vector<std::filesystem::path>>())
("h,help", "Print usage")
@ -180,7 +176,6 @@ Settings Parse(int argc, char** argv)
setts.splitInterval = (result.count("interval") ? result["interval"].as<float>() : 0.0f);
setts.analyzeChannel = (result.count("mono") ? result["mono"].as<unsigned int>() : 0);
setts.zeropadding = (result.count("pad") ? result["pad"].as<unsigned int>() : 1);
setts.mertz = (result.count("mertz") ? true : false);
if (!result.count("window"))
{