Commit 16bff7b6 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

sigfit [WP]: add debug option

problem: sigfit produces unreasonable data start time values upon output of
residuals file
parent 27683b2a
......@@ -43,11 +43,12 @@
* - 20/02/2012 V1.7 read and write any file format (damb)
* trace selecttion requires skip trace (thof)
* - 22/11/2016 V1.8 make use of new output facilities in libtsxx
* - 13/04/2018 V1.9
*
* ============================================================================
*/
#define SIGFIT_VERSION \
"SIGFIT V1.8 fit signal by trial-signals"
"SIGFIT V1.9 fit signal by trial-signals"
#include <fstream>
#include <iostream>
......@@ -82,7 +83,7 @@ using std::endl;
// structure to store commandline options
struct Options {
bool verbose;
bool verbose, debug;
double Tdate;
bool truncate;
std::string residualname;
......@@ -143,7 +144,7 @@ int main(int iargc, char* argv[])
char usage_text[]=
{
SIGFIT_VERSION "\n"
"usage: sigfit [-v] [-Tdate v] [-truncate]" "\n"
"usage: sigfit [-v] [-DEBUG] [-Tdate v] [-truncate]" "\n"
" [-Sramp[=v]] [-Sconst[=v]] [-Sexp[=v]]" "\n"
" [-residual f]" "\n"
" [-searchrange[=r]] [-equalsearch] [-skip n]" "\n"
......@@ -242,6 +243,8 @@ int main(int iargc, char* argv[])
{"itype",arg_yes,"sff"},
// 12: output file format
{"otype",arg_yes,"sff"},
// 13: produce debug output
{"DEBUG",arg_no,"-"},
{NULL}
};
......@@ -296,6 +299,7 @@ int main(int iargc, char* argv[])
opt.tcexp=cmdline.double_arg(10);
opt.itype=cmdline.string_arg(11);
opt.otype=cmdline.string_arg(12);
opt.debug=cmdline.optset(13);
/*----------------------------------------------------------------------*/
......
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