RecCalc.h

Go to the documentation of this file.
00001 #ifndef CRECFUNC_H
00002 #define CRECFUNC_H
00003 #include "SeismicDataComp.h"
00004 #include "ResPkModel.h"
00005 #include "TsSpectrum.h"
00006 #include <string>
00007 
00008 /** \addtogroup seistools Seismic data analysis and modeling */
00009 /* @{ */
00010 
00011 //! This class is used to calculate receiver functions from seismic data
00012 class RecCalc{
00013 public:
00014     //! There are several ways to calculate receiver functions
00015         enum trfmethod  {specdiv, iterdecon};
00016 private:
00017         //! The method we want to use to calculate the receiver function
00018         trfmethod method;
00019         //! For spectral division we need an object to calculate spectra
00020         TsSpectrum Spectrum;
00021         //! The waterlevel to fill in spectral holes
00022         double c;
00023         double omega;
00024         //! The width of the gaussian filter to smooth the receiver functions
00025         double sigma;
00026         //! Shift the data to move the initial correlation peak
00027         int shift;
00028         //! Should the receiver function be normalized to maximum amplitude
00029         bool normalize;
00030         //! The components used for the receiver function calculation
00031         SeismicDataComp RadComp;
00032         SeismicDataComp VerComp;
00033         //! Calculate the receiver function with the spectral division waterlevel method
00034         void SpectralDivision(const SeismicDataComp &RComp, 
00035                         const SeismicDataComp &VComp, SeismicDataComp &Receiver);
00036         //! Calculate the receiver function by iterative convolution
00037         void IterativeDeconvolution(const SeismicDataComp &RComp, 
00038                         const SeismicDataComp &VComp, SeismicDataComp &Receiver);
00039 public:
00040         //! Get the radial component, mostly needed for synthetic data
00041         const SeismicDataComp &GetRadComp(){return RadComp;}
00042         const SeismicDataComp &GetVerComp(){return VerComp;}
00043     //! Change whether the output receiver function is normalized to a maximum amplitude of 1
00044     void SetNormalize(const bool what){normalize = what;}
00045     //! The three Synth*Parallel methods provide alternative acces to the steps in CalcRecSynth for safe parallel execution
00046         void SynthPreParallel(const std::string &filename,ResPkModel &Model,SeismicDataComp &Receiver, const bool cleanfiles = false);
00047         //! All operations that are safe to execute in parallel
00048         void SynthSafeParallel(const std::string &filename,ResPkModel &Model,SeismicDataComp &Receiver, const bool cleanfiles = false);
00049         //! Operations of the synthetic receiver function calculation that are not safe in parallel and hafe to be executed after the parallel part
00050         void SynthPostParallel(const std::string &filename,ResPkModel &Model,SeismicDataComp &Receiver, const bool cleanfiles = false);
00051         //! Calculate Receiver functions from two data components
00052         void CalcRecData(const SeismicDataComp &RadComp, const SeismicDataComp &VerComp, SeismicDataComp &Receiver);
00053         //! Calculate synthetic receiver funtions from a model
00054         void CalcRecSynth(const std::string &filename,ResPkModel &Model,SeismicDataComp &Receiver, const bool cleanfiles = false);
00055         RecCalc& operator=(const RecCalc& source);
00056         //! The constructor takes the essential parameters that shouldn't change during different calculations
00057         RecCalc(const int myshift, const double myomega, const double mysigma, 
00058                         const double myc, const bool multicalc = false, const trfmethod themethod = specdiv);
00059         RecCalc(const RecCalc &Old);
00060         virtual ~RecCalc();
00061 };
00062 /* @} */
00063 #endif // CRECFUNC_H

Generated on Fri Jul 4 15:30:21 2008 for GPLIB++ by  doxygen 1.5.5