GPLIB++
|
This class is the base class for all classes dealing with MT time series. More...
#include <TimeSeries.h>
Public Types | |
typedef boost::posix_time::ptime | ttime |
We use the boost library time functionality for time types and store the time for each point in a vector. More... | |
typedef std::vector< ttime > | ttimedata |
Public Member Functions | |
TimeSeriesComponent & | GetHx () |
Access function for Hx, returns reference for efficiency. More... | |
TimeSeriesComponent & | GetHy () |
TimeSeriesComponent & | GetHz () |
TimeSeriesComponent & | GetEx () |
TimeSeriesComponent & | GetEy () |
ttimedata & | GetTime () |
size_t | Size () |
Return the size of the time series, throws if one of the components has a different size. More... | |
virtual void | GetData (const std::string filename)=0 |
virtual void | WriteData (const std::string filename)=0 |
double | GetSamplerate () |
The samplerate is stored in each component, we just return the samplerate of Hx assuming they are all equal. More... | |
TimeSeries () | |
virtual | ~TimeSeries () |
TimeSeries & | operator= (const TimeSeries &source) |
TimeSeries & | operator*= (const double &factor) |
Multiply all components by a constant factor. More... | |
TimeSeries & | operator+= (const double &shift) |
Add a constant shift to all components. More... | |
void | erase (const int startindex, const int endindex) |
Erase data between startindex and endindex. More... | |
Protected Attributes | |
TimeSeriesComponent | Hx |
The data for the north-south magnetic field. More... | |
TimeSeriesComponent | Hy |
The data for the east-west magnetic field. More... | |
TimeSeriesComponent | Hz |
The data for the vertical magnetic field. More... | |
TimeSeriesComponent | Ex |
The data for the north-south electric field. More... | |
TimeSeriesComponent | Ey |
The data for the east-west electric field. More... | |
ttimedata | t |
The time associated with each data point. More... | |
This class is the base class for all classes dealing with MT time series.
Definition at line 14 of file TimeSeries.h.
typedef boost::posix_time::ptime gplib::TimeSeries::ttime |
We use the boost library time functionality for time types and store the time for each point in a vector.
Definition at line 18 of file TimeSeries.h.
typedef std::vector<ttime> gplib::TimeSeries::ttimedata |
Definition at line 19 of file TimeSeries.h.
gplib::TimeSeries::TimeSeries | ( | ) |
Definition at line 12 of file TimeSeries.cpp.
|
virtual |
Definition at line 21 of file TimeSeries.cpp.
void gplib::TimeSeries::erase | ( | const int | startindex, |
const int | endindex | ||
) |
Erase data between startindex and endindex.
Definition at line 59 of file TimeSeries.cpp.
References GetData().
Referenced by main(), and gplib::Synchronize().
|
pure virtual |
Declaration for GetData() that reads data from a file. This is intended for use with external data, such as recorded data, or synthetic data from external programs.
Implemented in gplib::MtuFormat, gplib::LemiTsFormat, gplib::BirrpAsciiFormat, and gplib::CsvFormat.
Referenced by erase().
|
inline |
|
inline |
|
inline |
Access function for Hx, returns reference for efficiency.
Definition at line 35 of file TimeSeries.h.
References Hx.
Referenced by main().
|
inline |
|
inline |
|
inline |
The samplerate is stored in each component, we just return the samplerate of Hx assuming they are all equal.
Definition at line 71 of file TimeSeries.h.
References Ex, Ey, gplib::TimeSeriesComponent::GetSamplerate(), Hx, Hy, and Hz.
Referenced by main(), and gplib::Synchronize().
|
inline |
Definition at line 55 of file TimeSeries.h.
References t.
Referenced by main(), and gplib::Synchronize().
TimeSeries & gplib::TimeSeries::operator*= | ( | const double & | factor | ) |
Multiply all components by a constant factor.
Definition at line 39 of file TimeSeries.cpp.
TimeSeries & gplib::TimeSeries::operator+= | ( | const double & | shift | ) |
Add a constant shift to all components.
Definition at line 49 of file TimeSeries.cpp.
TimeSeries & gplib::TimeSeries::operator= | ( | const TimeSeries & | source | ) |
size_t gplib::TimeSeries::Size | ( | ) |
Return the size of the time series, throws if one of the components has a different size.
Definition at line 74 of file TimeSeries.cpp.
Referenced by main().
|
pure virtual |
The abstract declaration for a method that writes the data to a file. Therefore no version without a filename is present
Implemented in gplib::MtuFormat, gplib::BirrpAsciiFormat, gplib::LemiTsFormat, and gplib::CsvFormat.
|
protected |
The data for the north-south electric field.
Definition at line 28 of file TimeSeries.h.
Referenced by GetEx(), GetSamplerate(), and operator=().
|
protected |
The data for the east-west electric field.
Definition at line 30 of file TimeSeries.h.
Referenced by GetEy(), GetSamplerate(), and operator=().
|
protected |
The data for the north-south magnetic field.
Definition at line 22 of file TimeSeries.h.
Referenced by GetHx(), GetSamplerate(), and operator=().
|
protected |
The data for the east-west magnetic field.
Definition at line 24 of file TimeSeries.h.
Referenced by GetHy(), GetSamplerate(), and operator=().
|
protected |
The data for the vertical magnetic field.
Definition at line 26 of file TimeSeries.h.
Referenced by GetHz(), GetSamplerate(), and operator=().
|
protected |
The time associated with each data point.
Definition at line 32 of file TimeSeries.h.
Referenced by GetTime(), and operator=().