00001 #ifndef CTIMESERIESDATA_H 00002 #define CTIMESERIESDATA_H 00003 #include "TimeSeries.h" 00004 #include <string> 00005 #include <boost/shared_ptr.hpp> 00006 00007 namespace gplib 00008 { 00009 /** \addtogroup mttools MT data analysis, processing and inversion */ 00010 /* @{ */ 00011 00012 //! ttsdatatype is used to store the source the data was read from 00013 enum ttsdatatype 00014 { 00015 tsunknown, mtu, birrp, csv, lemi 00016 }; 00017 00018 //! TimeSeriesData stores a pointer to the different components of magnetotelluric data and provides functions to read and write it to files 00019 00020 /*! This should be made consistent with the corresponding Seismic data at some point 00021 */ 00022 class TimeSeriesData 00023 { 00024 private: 00025 //! the sitename 00026 std::string name; 00027 //! the type of data 00028 ttsdatatype datatype; 00029 //! a pointer to the actual data object 00030 boost::shared_ptr<TimeSeries> Data; 00031 public: 00032 //! return a reference to the actual object stored in the pointer 00033 TimeSeries &GetData() 00034 { 00035 return *Data; 00036 } 00037 //! GetData reads in data from a file and determines the type from the ending 00038 void GetData(std::string filename); 00039 //! Write data to file in Phoenix MTU format 00040 void WriteAsMtu(std::string filename_base); 00041 //! Write data to file in ascii format for birrp processing 00042 void WriteAsBirrp(std::string filename_base); 00043 //! Write data as comma seperated ascii file 00044 void WriteAsCsv(std::string filename_base); 00045 //! Write as file in Lemi compatible format 00046 void WriteAsLemi(std::string filename_base); 00047 //! Write in the format it was originally read in 00048 void WriteBack(std::string filename_base); 00049 TimeSeriesData(); 00050 virtual ~TimeSeriesData(); 00051 //! The copy constructor 00052 TimeSeriesData& operator=(const TimeSeriesData& source); 00053 }; 00054 /* @} */ 00055 } 00056 #endif // CTIMESERIESDATA_H
1.5.8