7#include <boost/archive/text_iarchive.hpp>
8#include <boost/archive/text_oarchive.hpp>
9#include <boost/serialization/base_object.hpp>
10#include <boost/serialization/shared_ptr.hpp>
11#include <boost/serialization/vector.hpp>
13#include "mspass/seismic/Seismogram.h"
14#include "mspass/seismic/TimeSeries.h"
16namespace mspass::algorithms {
28 void enable_head() { head =
true; };
33 void enable_tail() { tail =
true; };
38 bool head_is_enabled() {
44 bool tail_is_enable() {
53 virtual double get_t0head()
const = 0;
54 virtual double get_t1head()
const = 0;
63 friend class boost::serialization::access;
64 template <
class Archive>
65 void serialize(Archive &ar,
const unsigned int version) {
87 LinearTaper(
const double t0head,
const double t1head,
const double t1tail,
91 double get_t0head()
const {
return t0head; };
92 double get_t1head()
const {
return t1head; };
93 double get_t0tail()
const {
return t0tail; };
94 double get_t1tail()
const {
return t1tail; };
97 double t0head, t1head, t1tail, t0tail;
98 friend class boost::serialization::access;
99 template <
class Archive>
100 void serialize(Archive &ar,
const unsigned int version) {
101 ar &boost::serialization::base_object<BasicTaper>(*
this);
125 CosineTaper(
const double t0head,
const double t1head,
const double t1tail,
126 const double t0tail);
130 double get_t0head()
const {
return t0head; };
131 double get_t1head()
const {
return t1head; };
132 double get_t0tail()
const {
return t0tail; };
133 double get_t1tail()
const {
return t1tail; };
136 double t0head, t1head, t1tail, t0tail;
137 friend class boost::serialization::access;
138 template <
class Archive>
139 void serialize(Archive &ar,
const unsigned int version) {
140 ar &boost::serialization::base_object<BasicTaper>(*
this);
158 void disable() { all =
false; };
160 if (taper.size() > 0)
163 std::vector<double> get_taper() {
return taper; };
164 double get_t0head()
const {
165 std::cerr <<
"get_t0head not implemented for VectorTaper";
168 double get_t1head()
const {
169 std::cerr <<
"get_t1head not implemented for VectorTaper";
174 std::vector<double> taper;
175 friend class boost::serialization::access;
176 template <
class Archive>
177 void serialize(Archive &ar,
const unsigned int version) {
178 ar &boost::serialization::base_object<BasicTaper>(*
this);
219 TopMute(
const double t0,
const double t1,
const std::string type);
232 double get_t0()
const {
return taper->get_t0head(); };
235 double get_t1()
const {
return taper->get_t1head(); };
247 std::shared_ptr<BasicTaper> taper;
Taper front and/or end of a time seris with a half cosine function.
Definition Taper.h:116
Used to construct an operator to apply a linear taper to either end.
Definition Taper.h:77
Mute operator for "top" of signals defined first smaple forward.
Definition Taper.h:198
double get_t0() const
Definition Taper.h:232
TopMute & operator=(const TopMute &parent)
Definition Taper.cc:407
~TopMute()
Definition Taper.cc:377
std::string taper_type() const
Definition Taper.cc:437
double get_t1() const
Definition Taper.h:235
TopMute()
Definition Taper.cc:376
int apply(mspass::seismic::TimeSeries &d)
Definition Taper.cc:413
Implemntation of Seismogram for MsPASS.
Definition Seismogram.h:14
Implemntation of TimeSeries for MsPASS.
Definition TimeSeries.h:14