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

appears to work

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: 2146
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent f63ec294
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: noisymize.cc,v 1.3 2006-06-29 13:49:52 tforb Exp $
* $Id: noisymize.cc,v 1.4 2006-06-29 14:30:27 tforb Exp $
* \author Thomas Forbriger
* \date 27/06/2006
*
......@@ -19,7 +19,7 @@
#define NOISYMIZE_VERSION \
"NOISYMIZE V1.0 program reads a set of SFF traces, convolves them with white noise and stacks"
#define NOISYMIZE_CVSID \
"$Id: noisymize.cc,v 1.3 2006-06-29 13:49:52 tforb Exp $"
"$Id: noisymize.cc,v 1.4 2006-06-29 14:30:27 tforb Exp $"
#include <fstream>
#include <iostream>
......@@ -70,7 +70,7 @@ int main(int iargc, char* argv[])
{
NOISYMIZE_VERSION "\n"
"usage: noisymize Zin Rin Zout Rout" "\n"
"usage: noisymize [-v] [-type t] [-n n]" "\n"
" [-v] [-type t] [-n n]" "\n"
" or: noisymize --help|-h" "\n"
};
......@@ -243,13 +243,17 @@ int main(int iargc, char* argv[])
}
while((Zit!=Zindata.end()) && (Rit!=Rindata.end()))
{
if (opt.verbose) { cout << "*"; cout.flush(); }
Tseries noise=ts::rnd::dugauss(opt.noiselength);
Tseries fac=ts::rnd::dugauss(1);
Zseries += fac(1)*ts::convolve(*Zit, noise);
Rseries += fac(1)*ts::convolve(*Rit, noise);
if (opt.verbose) { cout << "+"; cout.flush(); }
Zseries += fac(0)*ts::convolve(*Zit, noise);
if (opt.verbose) { cout << "+"; cout.flush(); }
Rseries += fac(0)*ts::convolve(*Rit, noise);
++Zit;
++Rit;
}
if (opt.verbose) { cout << endl; }
/*----------------------------------------------------------------------*/
// write result
......
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