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

correction

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: 2368
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent e94d257a
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: noisymize.cc,v 1.11 2007-03-09 11:09:50 tforb Exp $
* $Id: noisymize.cc,v 1.12 2007-09-07 15:07:32 tforb Exp $
* \author Thomas Forbriger
* \date 27/06/2006
*
......@@ -21,14 +21,15 @@
* - allow switching of offset specific scaling
* - added description in help section
* - improved out format of list of factors
* - 07/09/2007 V1.6 corrected horizontal component scaling factor
*
* ============================================================================
*/
#define NOISYMIZE_VERSION \
"NOISYMIZE V1.5 program reads a set of SFF traces,\n" \
"NOISYMIZE V1.6 program reads a set of SFF traces,\n" \
" convolves them with white noise and stacks"
#define NOISYMIZE_CVSID \
"$Id: noisymize.cc,v 1.11 2007-03-09 11:09:50 tforb Exp $"
"$Id: noisymize.cc,v 1.12 2007-09-07 15:07:32 tforb Exp $"
#include <fstream>
#include <iostream>
......@@ -291,10 +292,13 @@ int main(int iargc, char* argv[])
traceoffset(itrace)=Zoffset;
offfac(itrace)=std::pow(Zoffset, opt.offexp);
// scaling factor for radial component, since we see only the projection
// of the radial component of all sources on the respective horizonzal
// of the radial component of all sources on the respective horizontal
// component
// Hfactor = (int_0^{2*pi} abs(cos(phi)) d phi) / (2 pi)
const double Hfactor=2./M_PI;
// 7.9.2007: scaling factor changed appropriately for signal power (see
// help output of gresynoise)
// Hfactor = sqrt( (int_0^{2*pi} cos(phi)**2 d phi) / (2 pi) )
// formerly: const double Hfactor=2./M_PI;
const double Hfactor=0.707; // = 1/sqrt(2)
// go
double scalefac=fac(itrace)*offfac(itrace);
if (opt.verbose) { cout << "*"; cout.flush(); }
......
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