TimeSeries Class Reference
[MT data analysis, processing and inversion]

This class is the base class for all classes dealing with MT time series. More...

#include <TimeSeries.h>

Inheritance diagram for TimeSeries:

Inheritance graph
[legend]

List of all members.

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.
typedef std::vector< ttimettimedata

Public Member Functions

TimeSeriesComponentGetHx ()
 Access function for Hx, returns reference for efficiency.
TimeSeriesComponentGetHy ()
TimeSeriesComponentGetHz ()
TimeSeriesComponentGetEx ()
TimeSeriesComponentGetEy ()
ttimedataGetTime ()
size_t Size ()
 Return the size of the time series, throws if one of the components has a different size.
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.
 TimeSeries ()
virtual ~TimeSeries ()
TimeSeriesoperator= (const TimeSeries &source)
TimeSeriesoperator*= (const double &factor)
 Multiply all components by a constant factor.
TimeSeriesoperator+= (const double &shift)
 Add a constant shift to all components.
void erase (const int startindex, const int endindex)
 Erase data between startindex and endindex.

Protected Attributes

TimeSeriesComponent Hx
 The data for the north-south magnetic field.
TimeSeriesComponent Hy
 The data for the east-west magnetic field.
TimeSeriesComponent Hz
 The data for the vertical magnetic field.
TimeSeriesComponent Ex
 The data for the north-south electric field.
TimeSeriesComponent Ey
 The data for the east-west electric field.
ttimedata t
 The time associated with each data point.


Detailed Description

This class is the base class for all classes dealing with MT time series.

Definition at line 13 of file TimeSeries.h.


Member Typedef Documentation

typedef boost::posix_time::ptime 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 17 of file TimeSeries.h.

typedef std::vector<ttime> TimeSeries::ttimedata

Definition at line 18 of file TimeSeries.h.


Constructor & Destructor Documentation

TimeSeries::TimeSeries (  ) 

Definition at line 10 of file TimeSeries.cpp.

References Ex, Ey, Hx, Hy, Hz, and TimeSeriesComponent::SetName().

TimeSeries::~TimeSeries (  )  [virtual]

Definition at line 19 of file TimeSeries.cpp.


Member Function Documentation

void TimeSeries::erase ( const int  startindex,
const int  endindex 
)

Erase data between startindex and endindex.

Definition at line 56 of file TimeSeries.cpp.

References Ex, Ey, TimeSeriesComponent::GetData(), Hx, Hy, Hz, and t.

Referenced by main(), and Synchronize().

virtual void TimeSeries::GetData ( const std::string  filename  )  [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 BirrpAsciiFormat, CsvFormat, LemiTsFormat, and MtuFormat.

TimeSeriesComponent& TimeSeries::GetEx (  )  [inline]

Definition at line 46 of file TimeSeries.h.

References Ex.

Referenced by main().

TimeSeriesComponent& TimeSeries::GetEy (  )  [inline]

Definition at line 50 of file TimeSeries.h.

References Ey.

Referenced by main().

TimeSeriesComponent& TimeSeries::GetHx (  )  [inline]

Access function for Hx, returns reference for efficiency.

Definition at line 34 of file TimeSeries.h.

References Hx.

Referenced by main().

TimeSeriesComponent& TimeSeries::GetHy (  )  [inline]

Definition at line 38 of file TimeSeries.h.

References Hy.

Referenced by main().

TimeSeriesComponent& TimeSeries::GetHz (  )  [inline]

Definition at line 42 of file TimeSeries.h.

References Hz.

Referenced by main().

double TimeSeries::GetSamplerate (  )  [inline]

The samplerate is stored in each component, we just return the samplerate of Hx assuming they are all equal.

Definition at line 70 of file TimeSeries.h.

References Ex, Ey, TimeSeriesComponent::GetSamplerate(), Hx, Hy, Hz, and samplerate.

Referenced by main(), and Synchronize().

ttimedata& TimeSeries::GetTime (  )  [inline]

Definition at line 54 of file TimeSeries.h.

References t.

Referenced by main(), and Synchronize().

TimeSeries & TimeSeries::operator*= ( const double factor  ) 

Multiply all components by a constant factor.

Definition at line 36 of file TimeSeries.cpp.

References Ex, Ey, Hx, Hy, and Hz.

TimeSeries & TimeSeries::operator+= ( const double shift  ) 

Add a constant shift to all components.

Definition at line 46 of file TimeSeries.cpp.

References Ex, Ey, Hx, Hy, and Hz.

TimeSeries & TimeSeries::operator= ( const TimeSeries source  ) 

Definition at line 22 of file TimeSeries.cpp.

References Ex, Ey, Hx, Hy, Hz, and t.

size_t TimeSeries::Size (  ) 

Return the size of the time series, throws if one of the components has a different size.

Definition at line 66 of file TimeSeries.cpp.

References Ex, Ey, TimeSeriesComponent::GetData(), Hx, Hy, and Hz.

Referenced by main(), MtuFormat::WriteData(), and BirrpAsciiFormat::WriteData().

virtual void TimeSeries::WriteData ( const std::string  filename  )  [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 BirrpAsciiFormat, CsvFormat, LemiTsFormat, and MtuFormat.


Member Data Documentation

ttimedata TimeSeries::t [protected]

The time associated with each data point.

Definition at line 31 of file TimeSeries.h.

Referenced by erase(), LemiTsFormat::GetData(), BirrpAsciiFormat::GetData(), GetTime(), operator=(), and CsvFormat::WriteData().


The documentation for this class was generated from the following files:

Generated on Tue Aug 4 16:04:23 2009 for GPLIB++ by  doxygen 1.5.8