GPLIB++
SurfaceWaveData.h
Go to the documentation of this file.
1 #ifndef SURFACEWAVEDATA_H_
2 #define SURFACEWAVEDATA_H_
3 #include <string>
4 #include "types.h"
5 
6 namespace gplib
7  {
8  /** \addtogroup seistools Seismic data analysis and modeling */
9  /* @{ */
10  //! A class to read, write and store fundamental mode surface wave dispersion data
12  {
13  private:
14  trealdata periods;
15  trealdata phasevelocities;
16  public:
17  //! Read-only access to the vector of phase velocities
18  const trealdata &GetPhaseVelocities() const
19  {
20  return phasevelocities;
21  }
22  //! Read-only access to the vector of periods for the phase velocities
23  const trealdata &GetPeriods() const
24  {
25  return periods;
26  }
27  //! Read-write access to phase velocities, the format might be changed in the future
28  trealdata &SetPhaseVelocities()
29  {
30  return phasevelocities;
31  }
32  //! Read-write access to periods, the format might be changed in the future
33  trealdata &SetPeriods()
34  {
35  return periods;
36  }
37  //! Read data from file, depending on the extension
38  /*! Read data from file, depending on the extension
39  * it will either call ReadAscii (for ending .asc), or ReadSurf96
40  * (for any other ending).*/
41  void ReadFile(const std::string &filename);
42  //! Read a file in general ascii format, i.e lines with period velocity each
43  virtual void ReadAscii(const std::string &filename);
44  //! read data as produced by the computer programs in seismology codes ascii
45  void ReadSurf96(const std::string &filename);
46  //! Write the data in simple ascii format
47  virtual void WriteAscii(const std::string &filename) const;
49  SurfaceWaveData(const SurfaceWaveData &Old);
51  virtual ~SurfaceWaveData();
52  };
53  /* @} */
54  }
55 #endif /*SURFACEWAVEDATA_H_*/
const trealdata & GetPeriods() const
Read-only access to the vector of periods for the phase velocities.
const trealdata & GetPhaseVelocities() const
Read-only access to the vector of phase velocities.
void ReadSurf96(const std::string &filename)
read data as produced by the computer programs in seismology codes ascii
A class to read, write and store fundamental mode surface wave dispersion data.
SurfaceWaveData & operator=(const SurfaceWaveData &source)
trealdata & SetPeriods()
Read-write access to periods, the format might be changed in the future.
virtual void ReadAscii(const std::string &filename)
Read a file in general ascii format, i.e lines with period velocity each.
virtual void WriteAscii(const std::string &filename) const
Write the data in simple ascii format.
void ReadFile(const std::string &filename)
Read data from file, depending on the extension.
trealdata & SetPhaseVelocities()
Read-write access to phase velocities, the format might be changed in the future. ...