version  0.0.1
Defines the C++ API for MsPASS
Loading...
Searching...
No Matches
TimeSeries.h
1#ifndef _TIMESERIES_H_
2#define _TIMESERIES_H_
3#include "mspass/seismic/CoreTimeSeries.h"
4#include "mspass/utility/ErrorLogger.h"
5#include "mspass/utility/ProcessingHistory.h"
6namespace mspass::seismic {
15public:
18 : mspass::seismic::CoreTimeSeries(),
19 mspass::utility::ProcessingHistory() {};
36 TimeSeries(const size_t nsamples)
37 : mspass::seismic::CoreTimeSeries(nsamples),
38 mspass::utility::ProcessingHistory() {};
53 TimeSeries(const BasicTimeSeries &bts, const Metadata &md)
54 : mspass::seismic::CoreTimeSeries(bts, md),
55 mspass::utility::ProcessingHistory() {};
78 TimeSeries(const Metadata &md);
79
96 : mspass::seismic::CoreTimeSeries(d),
97 mspass::utility::ProcessingHistory() {};
115 TimeSeries(const mspass::seismic::CoreTimeSeries &d, const std::string alg);
129 const std::vector<double> &d);
131 TimeSeries(const TimeSeries &parent)
132 : mspass::seismic::CoreTimeSeries(parent),
133 mspass::utility::ProcessingHistory(parent) {};
135 TimeSeries &operator=(const TimeSeries &parent);
136 TimeSeries &operator+=(const TimeSeries &d) {
137 dynamic_cast<CoreTimeSeries &>(*this) +=
138 dynamic_cast<const CoreTimeSeries &>(d);
139 return (*this);
140 };
141 TimeSeries &operator*=(const double scale) {
142 dynamic_cast<CoreTimeSeries &>(*this) *= scale;
143 return *this;
144 };
145 TimeSeries &operator-=(const TimeSeries &d) {
146 dynamic_cast<CoreTimeSeries &>(*this) -=
147 dynamic_cast<const CoreTimeSeries &>(d);
148 return (*this);
149 };
150 void load_history(const mspass::utility::ProcessingHistory &h);
160 size_t memory_use() const;
161};
162} // namespace mspass::seismic
163#endif
Base class for time series objects.
Definition BasicTimeSeries.h:35
Scalar time series data object.
Definition CoreTimeSeries.h:17
CoreTimeSeries()
Definition CoreTimeSeries.cc:14
Implemntation of TimeSeries for MsPASS.
Definition TimeSeries.h:14
TimeSeries(const mspass::seismic::CoreTimeSeries &d)
Construct from lower level CoreTimeSeries.
Definition TimeSeries.h:95
size_t memory_use() const
Definition TimeSeries.cc:86
TimeSeries()
Definition TimeSeries.h:17
TimeSeries(const TimeSeries &parent)
Definition TimeSeries.h:131
TimeSeries(const size_t nsamples)
Definition TimeSeries.h:36
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:76
TimeSeries(const BasicTimeSeries &bts, const Metadata &md)
Definition TimeSeries.h:53
Definition Metadata.h:71
Lightweight class to preserve procesing chain of atomic objects.
Definition ProcessingHistory.h:226
Define metadata keys.
Definition BasicSpectrum.h:6