Commit 216a43ac 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: 1502
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 2a2b052a
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: gsexx_TWID2.cc,v 1.7 2004-03-16 21:01:00 tforb Exp $
* $Id: gsexx_TWID2.cc,v 1.8 2004-03-16 21:17:49 tforb Exp $
* \author Thomas Forbriger
* \date 29/03/2002
*
......@@ -20,9 +20,10 @@
#define TF_GSEXX_TWID2_CC_VERSION \
"TF_GSEXX_TWID2_CC V1.1 "
#define TF_GSEXX_TWID2_CC_CVSID \
"$Id: gsexx_TWID2.cc,v 1.7 2004-03-16 21:01:00 tforb Exp $"
"$Id: gsexx_TWID2.cc,v 1.8 2004-03-16 21:17:49 tforb Exp $"
#include <ctime>
#include <cstdlib>
#include <gsexx.h>
namespace GSE2 {
......@@ -101,10 +102,13 @@ void TWID2::read(std::istream& is)
this->setsubformat(theline.substr(44,3));
Fsamps =atoi(theline.substr(48,8).c_str());
Fsamprate=atof(theline.substr(57,11).c_str());
Fcalib =atof(theline.substr(69,10).c_str());
Fcalper =atof(theline.substr(80,7).c_str());
Finstype =theline.substr(88,6);
Fhang =atof(theline.substr(95,5).c_str());
Fvang =atof(theline.substr(101,4).c_str());
}
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: sffxx.h,v 1.15 2004-02-14 17:43:49 tforb Exp $
* $Id: sffxx.h,v 1.16 2004-03-16 21:14:56 tforb Exp $
* \author Thomas Forbriger
* \date 21/12/2003
*
......@@ -29,7 +29,7 @@
#define TF_SFFXX_H_VERSION \
"TF_SFFXX_H V1.2 "
#define TF_SFFXX_H_CVSID \
"$Id: sffxx.h,v 1.15 2004-02-14 17:43:49 tforb Exp $"
"$Id: sffxx.h,v 1.16 2004-03-16 21:14:56 tforb Exp $"
#include<string>
#include<cmath>
......@@ -395,7 +395,14 @@ namespace sff {
Mheader.readheader(is);;
int nsamples=Mheader.wid2().nsamples;
GSE2::waveform::TDAT2readCM6 freader(nsamples);
Mseries=C(nsamples);
try {
Mseries=C(nsamples);
}
catch(...) {
std::cerr << "ERROR (InputWaveform::read): "
<< "allocating series for " << nsamples << " samples!" << std::endl;
throw;
}
for(aff::Iterator<C> i(Mseries); i.valid(); ++i)
{ (*i) = Tvalue(freader(is)*Mheader.dast().ampfac); }
Mheader.readtrailer(is);
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: sigfit.cc,v 1.13 2004-03-16 15:30:28 tforb Exp $
* $Id: sigfit.cc,v 1.14 2004-03-16 21:14:56 tforb Exp $
* \author Thomas Forbriger
* \date 28/01/2004
*
......@@ -23,7 +23,7 @@
#define SIGFIT_VERSION \
"SIGFIT V1.3 fit signal by trial-signals"
#define SIGFIT_CVSID \
"$Id: sigfit.cc,v 1.13 2004-03-16 15:30:28 tforb Exp $"
"$Id: sigfit.cc,v 1.14 2004-03-16 21:14:56 tforb Exp $"
#include <fstream>
#include <iostream>
......@@ -210,7 +210,14 @@ int main(int iargc, char* argv[])
sff::FileHeader fileheader(is);
if (opt.verbose)
{ cout << " read trace" << endl; }
sff::InputWaveform<Tseries> inputwaveform(is);
sff::InputWaveform<Tseries> inputwaveform;
try {
inputwaveform.read(is);
}
catch(...) {
cerr << "ERROR (sigfit): read failed!" << endl;
throw;
}
sff::TraceHeader traceheader=inputwaveform.header();
signal.header=traceheader.wid2();
signal=inputwaveform.series();
......
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