00001 #ifndef __IW_SAMP__
00002 #define __IW_SAMP__
00003
00004 #include "except.hh"
00005 #include "parser.h"
00006 #include "parserdecl.hh"
00007 #include "iwave.h"
00008 #include "grid.h"
00009 #include "traceio.h"
00010
00011 namespace TSOpt {
00012 using RVL::parse;
00013 using RVL::valparse;
00014 using RVL::RVLException;
00015 using RVL::ProtectedDivision;
00016
00017 class IWaveSampler {
00018 private:
00019 string samplekey;
00020 string suffix;
00021 string pname;
00022
00023 std::vector<axis *> axes;
00024 axis const * getTimeAxis(int dim) const;
00025 bool has_Axis(int i) const;
00026 bool has_Spatial_Axes;
00027 mutable int prev_panelindex;
00028 bool increment;
00029
00030
00031 IPNT gmin;
00032 IPNT gmax;
00033
00034
00035
00036 tracegeom * tg;
00037 int sampord;
00038 int tracestart;
00039 int tracestop;
00040 int taperwidth;
00041 int timewidth;
00042
00043 float muteslope;
00044 float mutezotime;
00045 float mutewidth;
00046
00047 int dump_term;
00048
00049 public:
00054 IWaveSampler(IWAVE * state, string key, PARARRAY & pars, FILE * stream);
00055 virtual ~IWaveSampler();
00056 int getNumAxes() const { return axes.size(); }
00057 axis const & getAxis(int i) const;
00058 ireal getCellVol() const;
00059 ireal getRecipCellVol() const;
00060 int const * get_gmin() const { return gmin; }
00061 int const * get_gmax() const { return gmax; }
00073 void sample(grid g, IPNT step, IPNT gtype, bool fwd, bool input,
00074 IWAVE * state, int ridx, int iwdx, FILE * stream,
00075 bool dryrun=false, ostream & drystr=cerr);
00076 };
00077
00078 }
00079
00080 #endif