10 string version =
"$Id: sac2asc.cpp 1816 2009-09-07 11:28:35Z mmoorkamp $";
12 int main(
int argc,
char *argv[])
14 cout <<
" This is sac2asc: Convert sac to plain ascii format" << endl;
15 cout <<
" Reads in a file in SAC format and writes it as an ascii file"
18 <<
" Most header values are ignored, only npts, dt and b are written to the output file"
20 cout <<
" This is Version: " <<
version << endl << endl;
23 string outfilename, infilename;
30 infilename = AskFilename(
"Input file: ");
32 outfilename = infilename +
".asc";
38 cerr << e.what() << endl;
int ReadData(const std::string &filename, tseismicdataformat format=sac)
Read in data from a file, as we cannot determine the type from the ending we have to provide it...
int main(int argc, char *argv[])
int WriteAsAscii(const std::string &filename) const
Write the data in plain ascii format.
The basic exception class for all errors that arise in gplib.