Commit b71e0bdc authored by thomas.forbriger's avatar thomas.forbriger
Browse files

croposp [WP]: provide option for logarithmic sampling

parent bb01acbe
......@@ -52,6 +52,7 @@ struct Options {
bool verbose, trim, debug;
std::string inputformat, labelpattern;
double datetolerance;
bool logscale;
unsigned int n_per_decade;
bool compute_psd, compute_npsd, compute_coherency, compute_transfer;
std::string outfile_psd, outfile_npsd, outfile_coherency, outfile_transfer;
......@@ -161,6 +162,8 @@ int main(int iargc, char* argv[])
" %N: label set for file name\n"
" %F: file name\n"
" %NT: number of trace in file\n"
"-log n map averages to logarithmic scale with \"n\"\n"
" samples pre decade\n"
"\n"
"output options:\n"
"-psd f compute power spectral density and write to file \"f\"\n"
......@@ -205,6 +208,8 @@ int main(int iargc, char* argv[])
{"transfer",arg_yes,"-"},
// 10: compute coherency
{"coherency",arg_yes,"-"},
// 11: compute coherency
{"log",arg_yes,"1"},
{NULL}
};
......@@ -260,6 +265,12 @@ int main(int iargc, char* argv[])
opt.compute_coherency=cmdline.optset(10);
opt.outfile_coherency=cmdline.string_arg(10);
opt.logscale=cmdline.optset(11);
opt.n_per_decade=cmdline.int_arg(11);
TFXX_assert(opt.n_per_decade>0,
"number of samples per decade must be finite and positive");
TFXX_assert(((opt.datetolerance >= 0.) && (opt.datetolerance <=1.)),
"datetolerance is out of accepted range");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment