GPLIB++
TimeSeriesData.h
Go to the documentation of this file.
1 #ifndef CTIMESERIESDATA_H
2 #define CTIMESERIESDATA_H
3 #include "TimeSeries.h"
4 #include <string>
5 #include <boost/shared_ptr.hpp>
6 
7 namespace gplib
8  {
9  /** \addtogroup mttools MT data analysis, processing and inversion */
10  /* @{ */
11 
12  //! ttsdatatype is used to store the source the data was read from
14  {
16  };
17 
18  //! TimeSeriesData stores a pointer to the different components of magnetotelluric data and provides functions to read and write it to files
19 
20  /*! This should be made consistent with the corresponding Seismic data at some point
21  */
23  {
24  private:
25  //! the sitename
26  std::string name;
27  //! the type of data
28  ttsdatatype datatype;
29  //! a pointer to the actual data object
30  boost::shared_ptr<TimeSeries> Data;
31  public:
32  //! return a reference to the actual object stored in the pointer
34  {
35  return *Data;
36  }
37  //! GetData reads in data from a file and determines the type from the ending
38  void GetData(std::string filename);
39  //! Write data to file in Phoenix MTU format
40  void WriteAsMtu(std::string filename_base);
41  //! Write data to file in ascii format for birrp processing
42  void WriteAsBirrp(std::string filename_base);
43  //! Write data as comma seperated ascii file
44  void WriteAsCsv(std::string filename_base);
45  //! Write as file in Lemi compatible format
46  void WriteAsLemi(std::string filename_base);
47  //! Write in the format it was originally read in
48  void WriteBack(std::string filename_base);
50  virtual ~TimeSeriesData();
51  //! The copy constructor
52  TimeSeriesData& operator=(const TimeSeriesData& source);
53  };
54  /* @} */
55  }
56 #endif // CTIMESERIESDATA_H
TimeSeries & GetData()
return a reference to the actual object stored in the pointer
This class is the base class for all classes dealing with MT time series.
Definition: TimeSeries.h:14
void WriteAsMtu(std::string filename_base)
Write data to file in Phoenix MTU format.
void WriteAsCsv(std::string filename_base)
Write data as comma seperated ascii file.
void WriteAsLemi(std::string filename_base)
Write as file in Lemi compatible format.
void WriteBack(std::string filename_base)
Write in the format it was originally read in.
void WriteAsBirrp(std::string filename_base)
Write data to file in ascii format for birrp processing.
TimeSeriesData stores a pointer to the different components of magnetotelluric data and provides func...
TimeSeriesData & operator=(const TimeSeriesData &source)
The copy constructor.
ttsdatatype
ttsdatatype is used to store the source the data was read from