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

proceeding

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: 1489
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 3fa71361
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: tsxx.h,v 1.4 2004-02-10 21:15:25 tforb Exp $
* $Id: tsxx.h,v 1.5 2004-02-15 20:43:08 tforb Exp $
* \author Thomas Forbriger
* \date 19/12/2003
*
......@@ -26,7 +26,7 @@
#define TF_TSXX_H_VERSION \
"TF_TSXX_H V1.0 "
#define TF_TSXX_H_CVSID \
"$Id: tsxx.h,v 1.4 2004-02-10 21:15:25 tforb Exp $"
"$Id: tsxx.h,v 1.5 2004-02-15 20:43:08 tforb Exp $"
#include<aff/series.h>
#include<sffostream.h>
......@@ -61,7 +61,7 @@ namespace ts {
sff::SFFostream<C>&
operator<<(sff::SFFostream<C>& os,
const TimeSeries<C, sff::WID2>& b)
{ os << b.header << C(b); return(os); }
{ os << C(b) << b.header; return(os); }
// define bundle typedefs
typedef TimeSeries<aff::Series<double>, sff::WID2> TDsfftimeseries;
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: sigfit.cc,v 1.8 2004-02-14 17:43:49 tforb Exp $
* $Id: sigfit.cc,v 1.9 2004-02-15 20:43:09 tforb Exp $
* \author Thomas Forbriger
* \date 28/01/2004
*
......@@ -19,7 +19,7 @@
#define SIGFIT_VERSION \
"SIGFIT V1.0 fit signal by trial-signals"
#define SIGFIT_CVSID \
"$Id: sigfit.cc,v 1.8 2004-02-14 17:43:49 tforb Exp $"
"$Id: sigfit.cc,v 1.9 2004-02-15 20:43:09 tforb Exp $"
#include <fstream>
#include <iostream>
......@@ -325,6 +325,15 @@ int main(int iargc, char* argv[])
for (Tbundlevec::const_iterator i=bundlevec.begin();
i!=bundlevec.end(); i++)
{ os << *i; }
for (int i=1; i<=N; ++i)
{
Tbundle psyn=bundlevec[i-1];
psyn=bundlevec[i-1].series()*coeff(i);
char chan[6];
std::sprintf(chan,"s%1.1d", i);
psyn.header.channel=std::string(chan);
os << psyn;
}
}
// calculate rms values
......@@ -336,6 +345,7 @@ int main(int iargc, char* argv[])
cout << " time: " << timestring.substr(4,21) << endl;
cout << " channel: " << signal.header.channel << endl;
cout << " station: " << signal.header.station << endl;
cout << " instrument: " << signal.header.instype << endl;
cout << " signalrms: " << signalrms << endl;
cout << " residualrms: " << residualrms << endl;
cout << "explained rms: " << explained << endl;
......@@ -343,10 +353,17 @@ int main(int iargc, char* argv[])
for (int i=1; i<=N; ++i)
{ cout << coeff(i) << " "; }
cout << endl;
cout << " coefficients x rms: ";
for (int i=1; i<=N; ++i)
{
cout << coeff(i)*ts::rms(bundlevec[i-1]) << " ";
}
cout << endl;
// reportline
cout << signal.header.station << " "
<< signal.header.channel << " "
<< signal.header.instype << " "
<< timestring << " ";
cout << formatfloat(explained);
cout << formatfloat(signalrms);
......@@ -355,6 +372,10 @@ int main(int iargc, char* argv[])
{
cout << formatfloat(coeff(i));
}
for (int i=1; i<=N; ++i)
{
cout << formatfloat(coeff(i)*ts::rms(bundlevec[i-1]));
}
cout << endl;
}
......
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