SurfaceWaveData.h

Go to the documentation of this file.
00001 #ifndef SURFACEWAVEDATA_H_
00002 #define SURFACEWAVEDATA_H_
00003 #include <string>
00004 #include "types.h" 
00005 
00006 namespace gplib
00007   {
00008     /** \addtogroup seistools Seismic data analysis and modeling */
00009     /* @{ */
00010     //! A class to read, write and store fundamental mode surface wave dispersion data
00011     class SurfaceWaveData
00012       {
00013     private:
00014       trealdata periods;
00015       trealdata phasevelocities;
00016     public:
00017       //! Read-only access to the vector of phase velocities
00018       const trealdata &GetPhaseVelocities() const
00019         {
00020           return phasevelocities;
00021         }
00022       //! Read-only access to the vector of periods for the phase velocities
00023       const trealdata &GetPeriods() const
00024         {
00025           return periods;
00026         }
00027       //! Read-write access to phase velocities, the format might be changed in the future
00028       trealdata &SetPhaseVelocities()
00029         {
00030           return phasevelocities;
00031         }
00032       //! Read-write access to periods, the format might be changed in the future
00033       trealdata &SetPeriods()
00034         {
00035           return periods;
00036         }
00037       //! Read data from file, depending on the extension
00038       /*! Read data from file, depending on the extension
00039        * it will either call ReadAscii (for ending .asc), or ReadSurf96
00040        * (for any other ending).*/
00041       void ReadFile(const std::string &filename);
00042       //! Read a file in general ascii format, i.e lines with period velocity each
00043       virtual void ReadAscii(const std::string &filename);
00044       //! read data as produced by the computer programs in seismology codes ascii
00045       void ReadSurf96(const std::string &filename);
00046       //! Write the data in simple ascii format
00047       virtual void WriteAscii(const std::string &filename) const;
00048       SurfaceWaveData& operator=(const SurfaceWaveData& source);
00049       SurfaceWaveData(const SurfaceWaveData &Old);
00050       SurfaceWaveData();
00051       virtual ~SurfaceWaveData();
00052       };
00053   /* @} */
00054   }
00055 #endif /*SURFACEWAVEDATA_H_*/

Generated on Tue May 4 16:52:15 2010 for GPLIB++ by  doxygen 1.5.8