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

defined basic structure of offset variable taper

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: 4485
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 16b879b1
......@@ -38,12 +38,45 @@
#define TSXX_OVTAPER_CC_CVSID \
"$Id$"
#include <fstream>
#include <tfxx/error.h>
#include <tsxx/ovtaper.h>
namespace ts {
namespace tapers {
ts::tapers::FourPoint OffsetVariableTaper::taper(const double& offset,
const double& T0,
const double& T) const
{
TSXX_abort("OffsetVariableTaper::taper not yet implemented");
ts::tapers::FourPoint fpt;
return(fpt);
} // ts::tapers::FourPoint OffsetVariableTaper::taper(...)
/*----------------------------------------------------------------------*/
/*! read taper definition from input stream is
*/
void OffsetVariableTaper::read(std::istream& is)
{
TSXX_abort("OffsetVariableTaper::read not yet implemented");
} // void OffsetVariableTaper::read(std::istream& is)
/*----------------------------------------------------------------------*/
/*! read taper definition from file
*/
void OffsetVariableTaper::read(const std::string& filename)
{
std::ifstream is(filename.c_str());
TSXX_assert(is.good(),
"OffsetVariableTaper::read(): "
"error when opening taper file");
this->read(is);
} // void OffsetVariableTaper::read(const std::string& filename)
} // namespace tapers
} // namespace ts
......
......@@ -42,12 +42,52 @@
#define TSXX_OVTAPER_H_CVSID \
"$Id$"
#include <iostream>
#include <tsxx/tsxx.h>
#include <tsxx/tapers.h>
namespace ts {
namespace tapers {
/*! \brief Offset variable taper (refract taper).
*
* This class handles FourPoint tapers varying with receiver offset as can
* be defined by refract.
*/
class OffsetVariableTaper {
public:
//! type of sample values
typedef double Tvalue;
//! type of series container
typedef ts::TDtimeseries Ttimeseries;
typedef Ttimeseries::Tseries Tseries;
typedef Ttimeseries::Theader Theader;
OffsetVariableTaper(): Mvalid(false) { }
/*! return specific four point taper
*
* \param offset create specific taper for receiver at offset
* \param T0 time of first sample with respect to source time
* \param T duration of time series to be tapered
* \return four point taper for this offset and time series
*/
ts::tapers::FourPoint taper(const double& offset,
const double& T0,
const double& T) const;
/*! read taper definition from input stream is
*/
void read(std::istream& is);
/*! read taper definition from file
*/
void read(const std::string& filename);
private:
//! true if taper definition is present
bool Mvalid;
}; // class OffsetVariableTaper
} // namespace tapers
} // namespace ts
......
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