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

[FEATURE] (soutifu): provide full usage information by libstfinv

parent 0469cf1b
......@@ -3,7 +3,6 @@
*
* ----------------------------------------------------------------------------
*
* $Id$
* \author Thomas Forbriger
* \date 06/05/2011
*
......@@ -32,13 +31,12 @@
* - 06/05/2011 V1.0 Thomas Forbriger
* - 08/09/2011 V1.1 support format modifiers
* - 30/09/2011 V1.2 support additional time series pairs
* - 19/10/2015 V1.3 provide full usage information from libstfinv
*
* ============================================================================
*/
#define SOUTIFU_VERSION \
"SOUTIFU V1.2 inversion for source wavelet correction filter"
#define SOUTIFU_CVSID \
"$Id$"
"SOUTIFU V1.3 inversion for source wavelet correction filter"
#include <iostream>
#include <fstream>
......@@ -93,14 +91,12 @@ int main(int iargc, char* argv[])
" [-DEBUG=level]\n"
" parameters data synthetics" "\n"
" or: soutifu --help|-h" "\n"
" or: soutifu --xhelp | --iohelp" "\n"
" or: soutifu --xhelp | --iohelp | --phelp p" "\n"
};
// define full help text
char help_text[]=
{
SOUTIFU_CVSID "\n"
"\n"
"Calculate optimized source wavelet correction filter to\n"
"minimize misfit between recorded data and synthetic waveforms.\n"
"\n"
......@@ -111,8 +107,9 @@ int main(int iargc, char* argv[])
" available engines and a set of options an parameters\n"
" to be passed to this engine.\n"
"\n"
"--xhelp print detailed usage instructions for available engines\n"
"--xhelp print summary of usage instructions for available procedures\n"
"--iohelp print detailed usage instructions for file input/output\n"
"--phelp p print detailed usage instructions for procedure \"p\"\n"
"\n"
"-v be verbose\n"
"-DEBUG=level produce debug output at level \"level\"\n"
......@@ -160,6 +157,8 @@ int main(int iargc, char* argv[])
{"wa",arg_yes,"-"},
// 11: provide full details regarding file i/o
{"iohelp",arg_no,"-"},
// 12: provide full details regarding file i/o
{"phelp",arg_yes,"-"},
{NULL}
};
......@@ -174,16 +173,33 @@ int main(int iargc, char* argv[])
Commandline cmdline(iargc, argv, options);
// help requested? print full help text...
if (cmdline.optset(0) || cmdline.optset(6) || cmdline.optset(11))
if (cmdline.optset(0) || cmdline.optset(6) || cmdline.optset(11)
|| cmdline.optset(12))
{
cerr << usage_text << endl;
cerr << endl;
cerr << help_text << endl;
datrw::supported_data_types(cerr);
if (cmdline.optset(11)) { datrw::online_help(cerr); }
cerr << endl;
stfinv::STFEngine::help(cerr);
cerr << endl;
if (cmdline.optset(6)) { stfinv::help(cerr); }
if (cmdline.optset(11))
{
cerr << endl;
datrw::online_help(cerr);
}
if (cmdline.optset(6))
{
cerr << endl;
stfinv::help(cerr);
}
else
{
cerr << help_text << endl;
stfinv::engines(cerr);
}
if (cmdline.optset(12))
{
cerr << endl;
stfinv::usage(cmdline.string_arg(12), cerr);
}
exit(0);
}
......
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