exportFile
Posted: Thu Sep 29, 2011 2:09 pm
Hi All,
I learning, slowly. I see that I can implement command-line macros to run automatically some commands without using the GUIs, and this is one of my needs.
Questions:
1) how can I provide to the macro some input parameters?
2) how can I manage file-names into the macro?
The first basic thing I would like to do is
- read a file
- apply filters
- export the file into a new file.
So I run:
geopsy -waveform macro.gs my_file.sac
where macro.gs is:
filter("Butterworth", "BandPass", 1, 5, -4);
exportFile("new_file.sac",false,"SacBigEndian");
Now this should be done for several files and different corner frequencies, so I would like to input from the command line the two corner frequencies ( 1 and 5) and export the file with name my_file.1.5.sac according to the used corners.
Can anybody give me some hints ?
thanks
Marco
I learning, slowly. I see that I can implement command-line macros to run automatically some commands without using the GUIs, and this is one of my needs.
Questions:
1) how can I provide to the macro some input parameters?
2) how can I manage file-names into the macro?
The first basic thing I would like to do is
- read a file
- apply filters
- export the file into a new file.
So I run:
geopsy -waveform macro.gs my_file.sac
where macro.gs is:
filter("Butterworth", "BandPass", 1, 5, -4);
exportFile("new_file.sac",false,"SacBigEndian");
Now this should be done for several files and different corner frequencies, so I would like to input from the command line the two corner frequencies ( 1 and 5) and export the file with name my_file.1.5.sac according to the used corners.
Can anybody give me some hints ?
thanks
Marco