8 #include <boost/archive/text_oarchive.hpp>
9 #include <boost/archive/text_iarchive.hpp>
10 #include <boost/serialization/base_object.hpp>
11 #include <boost/serialization/vector.hpp>
12 #include <boost/serialization/shared_ptr.hpp>
15 #include "mspass/seismic/TimeSeries.h"
16 #include "mspass/seismic/Seismogram.h"
18 namespace mspass::algorithms{
32 void enable_head(){head=
true;};
33 void disable_head(){head=
false;all=
false;};
34 void enable_tail(){tail=
true;};
35 void disable_tail(){tail=
false;all=
false;};
36 bool head_is_enabled()
55 virtual double get_t0head()
const = 0;
56 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)
89 LinearTaper(
const double t0head,
const double t1head,
90 const double t1tail,
const double t0tail);
93 double get_t0head()
const {
return t0head;};
94 double get_t1head()
const {
return t1head;};
95 double get_t0tail()
const {
return t0tail;};
96 double get_t1tail()
const {
return t1tail;};
98 double t0head,t1head,t1tail,t0tail;
99 friend class boost::serialization::access;
100 template<
class Archive>
101 void serialize(Archive & ar,
const unsigned int version)
103 ar & boost::serialization::base_object<BasicTaper>(*
this);
128 CosineTaper(
const double t0head,
const double t1head,
129 const double t1tail,
const double t0tail);
133 double get_t0head()
const {
return t0head;};
134 double get_t1head()
const {
return t1head;};
135 double get_t0tail()
const {
return t0tail;};
136 double get_t1tail()
const {
return t1tail;};
138 double t0head,t1head,t1tail,t0tail;
139 friend class boost::serialization::access;
140 template<
class Archive>
141 void serialize(Archive & ar,
const unsigned int version)
143 ar & boost::serialization::base_object<BasicTaper>(*
this);
162 void disable(){all=
false;};
164 if(taper.size()>0) all=
true;
166 std::vector<double> get_taper(){
return taper;};
167 double get_t0head()
const {std::cerr <<
"get_t0head not implemented for VectorTaper";
return 0.0;};
168 double get_t1head()
const {std::cerr <<
"get_t1head not implemented for VectorTaper";
return 0.0;};
170 std::vector<double> taper;
171 friend class boost::serialization::access;
172 template<
class Archive>
173 void serialize(Archive & ar,
const unsigned int version)
175 ar & boost::serialization::base_object<BasicTaper>(*
this);
217 TopMute(
const double t0,
const double t1,
const std::string type);
230 {
return taper->get_t0head();};
233 {
return taper->get_t1head();};
243 std::shared_ptr<BasicTaper> taper;
Taper front and/or end of a time seris with a half cosine function.
Definition: Taper.h:119
Used to construct an operator to apply a linear taper to either end.
Definition: Taper.h:79
Mute operator for "top" of signals defined first smaple forward.
Definition: Taper.h:196
double get_t0() const
Definition: Taper.h:229
TopMute & operator=(const TopMute &parent)
Definition: Taper.cc:458
~TopMute()
Definition: Taper.cc:422
std::string taper_type() const
Definition: Taper.cc:488
double get_t1() const
Definition: Taper.h:232
TopMute()
Definition: Taper.cc:418
int apply(mspass::seismic::TimeSeries &d)
Definition: Taper.cc:466
Implemntation of Seismogram for MsPASS.
Definition: Seismogram.h:15
Implemntation of TimeSeries for MsPASS.
Definition: TimeSeries.h:15