version  0.0.1
Defines the C++ API for MsPASS
TimeSeries.h
1 #ifndef _TIMESERIES_H_
2 #define _TIMESERIES_H_
3 #include "mspass/seismic/CoreTimeSeries.h"
4 #include "mspass/utility/ProcessingHistory.h"
5 #include "mspass/utility/ErrorLogger.h"
6 namespace mspass::seismic{
15 {
16 public:
18  TimeSeries() : mspass::seismic::CoreTimeSeries(),
19  mspass::utility::ProcessingHistory()
20  {};
37  TimeSeries(const size_t nsamples) : mspass::seismic::CoreTimeSeries(nsamples),
38  mspass::utility::ProcessingHistory()
39  {};
53  TimeSeries(const BasicTimeSeries& bts,const Metadata& md)
54  : mspass::seismic::CoreTimeSeries(bts,md),
55  mspass::utility::ProcessingHistory()
56  {};
79  TimeSeries(const Metadata& md);
80 
97  : mspass::seismic::CoreTimeSeries(d),mspass::utility::ProcessingHistory(){};
115  TimeSeries(const mspass::seismic::CoreTimeSeries& d, const std::string alg);
127  const mspass::utility::ProcessingHistory& mcts, const std::vector<double>& d);
129  TimeSeries(const TimeSeries& parent)
130  : mspass::seismic::CoreTimeSeries(parent), mspass::utility::ProcessingHistory(parent){};
132  TimeSeries& operator=(const TimeSeries& parent);
133  TimeSeries& operator+=(const TimeSeries& d)
134  {
135  dynamic_cast<CoreTimeSeries&>(*this)+=dynamic_cast<const CoreTimeSeries&>(d);
136  return(*this);
137  };
138  TimeSeries& operator*=(const double scale)
139  {
140  dynamic_cast<CoreTimeSeries&>(*this) *= scale;
141  return *this;
142  };
143  TimeSeries& operator-=(const TimeSeries& d)
144  {
145  dynamic_cast<CoreTimeSeries&>(*this)-=dynamic_cast<const CoreTimeSeries&>(d);
146  return(*this);
147  };
148  void load_history(const mspass::utility::ProcessingHistory& h);
158  size_t memory_use() const;
159 };
160 }//END mspass::seismic namespace
161 #endif
Base class for time series objects.
Definition: BasicTimeSeries.h:35
Scalar time series data object.
Definition: CoreTimeSeries.h:18
CoreTimeSeries()
Definition: CoreTimeSeries.cc:15
Implemntation of TimeSeries for MsPASS.
Definition: TimeSeries.h:15
TimeSeries(const mspass::seismic::CoreTimeSeries &d)
Construct from lower level CoreTimeSeries.
Definition: TimeSeries.h:96
size_t memory_use() const
Definition: TimeSeries.cc:96
TimeSeries()
Definition: TimeSeries.h:18
TimeSeries(const TimeSeries &parent)
Definition: TimeSeries.h:129
TimeSeries(const size_t nsamples)
Definition: TimeSeries.h:37
TimeSeries(const mspass::seismic::BasicTimeSeries &b, const mspass::utility::Metadata &m, const mspass::utility::ProcessingHistory &mcts, const std::vector< double > &d)
TimeSeries & operator=(const TimeSeries &parent)
Definition: TimeSeries.cc:83
TimeSeries(const BasicTimeSeries &bts, const Metadata &md)
Definition: TimeSeries.h:53
Definition: Metadata.h:76
Lightweight class to preserve procesing chain of atomic objects.
Definition: ProcessingHistory.h:258
Define metadata keys.
Definition: BasicSpectrum.h:6