printrhostar.cpp
Go to the documentation of this file.00001 #include "MTStation.h"
00002 #include "Util.h"
00003 #include <iostream>
00004 #include <iomanip>
00005
00006 using namespace std;
00007 using namespace gplib;
00008
00009 string version = "$Id: printrhostar.cpp 1845 2010-04-12 11:55:22Z mmoorkamp $";
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 void PrintRhosZs(const MTTensor &Elem)
00020 {
00021 cout << setw(10) << 1. / Elem.GetFrequency() << " Zxy*: ";
00022 cout << setw(10) << Elem.GetZxyStar() << " Zyx*: ";
00023 cout << setw(10) << Elem.GetZyxStar() << " Rhoxy*: ";
00024 cout << setw(10) << Elem.GetRhoxyStar() << " Rhoyx*: ";
00025 cout << setw(10) << Elem.GetRhoyxStar() << endl;
00026 }
00027
00028 int main(int argc, char *argv[])
00029 {
00030 string infilename;
00031 MTStation Data;
00032 cout
00033 << " This is printrhostar: Print Schmucker's rho* z* for a single site"
00034 << endl;
00035 cout << " Reads in a single station file and prints values to screen"
00036 << endl;
00037 cout
00038 << " Usage: printrhostar filename or just printrhostar for interactive mode"
00039 << endl;
00040 cout << " This is Version: " << version << endl << endl;
00041 if (argc == 2)
00042 {
00043 infilename = argv[1];
00044 }
00045 else
00046 {
00047 infilename = AskFilename("Input filename: ");
00048 }
00049 Data.GetData(infilename);
00050 for_each(Data.GetMTData().begin(), Data.GetMTData().end(), PrintRhosZs);
00051
00052 }
00053