5 #include <boost/date_time/posix_time/posix_time_types.hpp>
18 typedef boost::posix_time::ptime
ttime;
65 virtual void GetData(
const std::string filename) = 0;
69 virtual void WriteData(
const std::string filename) = 0;
77 throw FatalException(
"Samplerate is not equal for all components");
88 void erase(
const int startindex,
const int endindex);
94 void Synchronize(TimeSeries &Data1, TimeSeries &Data2);
TimeSeriesComponent & GetEx()
ttimedata t
The time associated with each data point.
TimeSeriesComponent Ey
The data for the east-west electric field.
virtual void GetData(const std::string filename)=0
void erase(const int startindex, const int endindex)
Erase data between startindex and endindex.
double GetSamplerate()
The samplerate is stored in each component, we just return the samplerate of Hx assuming they are all...
This class is the base class for all classes dealing with MT time series.
virtual void WriteData(const std::string filename)=0
TimeSeriesComponent & GetHy()
TimeSeriesComponent Ex
The data for the north-south electric field.
TimeSeriesComponent is the base storage class for all types of time series data.
boost::posix_time::ptime ttime
We use the boost library time functionality for time types and store the time for each point in a vec...
std::vector< ttime > ttimedata
TimeSeries & operator=(const TimeSeries &source)
double GetSamplerate() const
Return samplerate in Hz.
TimeSeriesComponent Hz
The data for the vertical magnetic field.
TimeSeriesComponent Hy
The data for the east-west magnetic field.
TimeSeriesComponent Hx
The data for the north-south magnetic field.
size_t Size()
Return the size of the time series, throws if one of the components has a different size...
TimeSeriesComponent & GetEy()
TimeSeries & operator+=(const double &shift)
Add a constant shift to all components.
TimeSeriesComponent & GetHz()
TimeSeries & operator*=(const double &factor)
Multiply all components by a constant factor.
The basic exception class for all errors that arise in gplib.
TimeSeriesComponent & GetHx()
Access function for Hx, returns reference for efficiency.