Commit a28a6a59 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

new code

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 2166
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent f39b36a0
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.38 2006-06-29 13:49:51 tforb Exp $
# $Id: Makefile,v 1.39 2006-07-26 06:17:14 tforb Exp $
#
# Copyright (c) 2005 by Thomas Forbriger (BFO Schiltach)
#
......@@ -71,6 +71,15 @@ phasedsignals hamres siggen smoos dise: %: %.o
-L$(LOCLIBDIR)
newprog $@
foutra: \
%: %.o
$(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) -lfourier -ldrfftw -ldfftw -lm \
-lsffxx -ldatreadxx -llinearxx \
-ltsxx -ltfxx -lsffxx -lgsexx -ltime++ -laff \
-llapack -lblas -lcseife -lsffxx -lg2c -lm\
-L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS)
newprog $@
teseco resaseda gatherdiff autocorr cross tidofi fredofi sigfit: \
%: %.o
$(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) -lsffxx -ldatreadxx -llinearxx \
......
/*! \file foutra.cc
* \brief Fourier transforms
*
* ----------------------------------------------------------------------------
*
* $Id: foutra.cc,v 1.1 2006-07-26 06:17:15 tforb Exp $
* \author Thomas Forbriger
* \date 25/07/2006
*
* Fourier transforms
*
* Copyright (c) 2006 by Thomas Forbriger (BFO Schiltach)
*
* REVISIONS and CHANGES
* - 25/07/2006 V1.0 Thomas Forbriger
*
* ============================================================================
*/
#define FOUTRA_VERSION \
"FOUTRA V1.0 Fourier transforms"
#define FOUTRA_CVSID \
"$Id: foutra.cc,v 1.1 2006-07-26 06:17:15 tforb Exp $"
#include <iostream>
#include <tfxx/commandline.h>
#include <aff/series.h>
#include <tsxx/tsxx.h>
#include <tsxx/sffheaders.h>
using std::cout;
using std::cerr;
using std::endl;
struct Options {
bool verbose;
}; // struct Options
// values type to be used for samples
typedef double Tvalue;
// time series
typedef aff::Series<Tvalue> Tseries;
// full featured time series file
typedef ts::sff::File<Tseries> Tfile;
int main(int iargc, char* argv[])
{
// define usage information
char usage_text[]=
{
FOUTRA_VERSION "\n"
"usage: foutra infile outfile [-v]" "\n"
" or: foutra --help|-h" "\n"
};
// define full help text
char help_text[]=
{
FOUTRA_CVSID
};
// define commandline options
using namespace tfxx::cmdline;
static Declare options[]=
{
// 0: print help
{"help",arg_no,"-"},
// 1: verbose mode
{"v",arg_no,"-"},
{NULL}
};
// no arguments? print usage...
if (iargc<2)
{
cerr << usage_text << endl;
exit(0);
}
// collect options from commandline
Commandline cmdline(iargc, argv, options);
// help requested? print full help text...
if (cmdline.optset(0))
{
cerr << usage_text << endl;
cerr << help_text << endl;
exit(0);
}
/*
// dummy operation: print option settings
for (int iopt=0; iopt<2; iopt++)
{
cout << "option: '" << options[iopt].opt_string << "'" << endl;
if (cmdline.optset(iopt)) { cout << " option was set"; }
else { cout << "option was not set"; }
cout << endl;
cout << " argument (string): '" << cmdline.string_arg(iopt) << "'" << endl;
cout << " argument (int): '" << cmdline.int_arg(iopt) << "'" << endl;
cout << " argument (long): '" << cmdline.long_arg(iopt) << "'" << endl;
cout << " argument (float): '" << cmdline.float_arg(iopt) << "'" << endl;
cout << " argument (double): '" << cmdline.double_arg(iopt) << "'" << endl;
cout << " argument (bool): '";
if (cmdline.bool_arg(iopt))
{ cout << "true"; } else { cout << "false"; }
cout << "'" << endl;
}
while (cmdline.extra()) { cout << cmdline.next() << endl; }
// dummy operation: print rest of command line
while (cmdline.extra()) { cout << cmdline.next() << endl; }
*/
Options opt;
opt.verbose=cmdline.optset(1);
}
/* ----- END OF foutra.cc ----- */
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