00001 #include "RecCalc.h"
00002 #include "CCalcRecConf.h"
00003 #include "ResPkModel.h"
00004 #include "SeismicDataComp.h"
00005
00006 #include <iostream>
00007 #include <string>
00008 #include <algorithm>
00009 #include <readline/readline.h>
00010
00011 using namespace std;
00012
00013 int main()
00014 {
00015
00016 int npts;
00017 double dt;
00018 double slowness;
00019
00020 CCalcRecConf Config;
00021
00022 Config.GetData("calcrec.conf");
00023
00024
00025
00026 char *inputline = readline("Model Filename without extension (.mod): ");
00027 string modelfilename(inputline);
00028 free(inputline);
00029 cout << "Dt: ";
00030 cin >> dt;
00031 cout << "Npts: ";
00032 cin >> npts;
00033 cout << "Slowness: ";
00034 cin >> slowness;
00035 SeismicDataComp Result;
00036 RecCalc Receiver(Config.shift,Config.omega,Config.sigma,Config.cc);
00037 ResPkModel Model;
00038 Model.GetData(modelfilename+".mod");
00039 Model.dt = dt;
00040 Model.npts = npts;
00041 Model.slowness = slowness;
00042 Receiver.CalcRecSynth(modelfilename,Model,Result,false);
00043 Result.WriteAsSac(modelfilename+".rec");
00044 Model.WritePlot(modelfilename);
00045 }