[cig-commits] [commit] pluggable: Add HDUR to -h. This allows me to always convolve with finite duration while my CMTSOLUTION is a step function. Fix the usage string. (acb2ea9)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Apr 9 08:56:02 PDT 2014
Repository : ssh://geoshell/specfem3d_globe
On branch : pluggable
Link : https://github.com/geodynamics/specfem3d_globe/compare/64e1b38f0c5ebb4056cce0b15d41c0b9f94ab6e5...099a4d330d5b173b21e51ad441f9f429e5d37842
>---------------------------------------------------------------
commit acb2ea9b7fd4f092256df90e530f7dc50c982a19
Author: Eh Tan <tan2 at earth.sinica.edu.tw>
Date: Sun May 10 20:24:26 2009 +0000
Add HDUR to -h. This allows me to always convolve with finite duration while my CMTSOLUTION is a step function. Fix the usage string.
>---------------------------------------------------------------
acb2ea9b7fd4f092256df90e530f7dc50c982a19
UTILS/seis_process/process_syn.pl.in | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/UTILS/seis_process/process_syn.pl.in b/UTILS/seis_process/process_syn.pl.in
index 2984633..fec0102 100755
--- a/UTILS/seis_process/process_syn.pl.in
+++ b/UTILS/seis_process/process_syn.pl.in
@@ -12,9 +12,10 @@ Usage: process_syn_new.pl
-i Dir -A amp_factor -p -a STAFILE -s sps -y t0/V0/t1/V1...
-c -d OutDir -x Ext synthetics_files
where
- -S already sac file, will not apply ascii2sac.csh
+ -S already sac file, will not apply asc2sac
-m CMTSOLUTION file for event origin, location and half duration
- -h convolve a triangle stf with half duration from -m
+ -h HDUR -- convolve a gaussian source time function with half duration HDUR,
+ or if HDUR <= 1, use the half duration from -m
-o moves the synthetics back by 'offset' from centroid time.
-l lmin/lmax start/end cut of trace
-t Tmin/Tmax -- shortest/longest period of bandpass filter
@@ -49,7 +50,7 @@ unless (-d $sacaux) {die("missing SAC aux directory: '$sacaux'\n");}
@ARGV > 1 or Usage();
-if (!getopts('Sm:ho:l:t:i:pP:a:cd:x:vs:y:A:')) {die(" check input arguments\n");}
+if (!getopts('Sm:h:o:l:t:i:pP:a:cd:x:vs:y:A:')) {die(" check input arguments\n");}
if ($opt_t) {($tmin, $tmax) = split(/\//,$opt_t);
$f1 = 1./$tmax; $f2=1./$tmin;}
@@ -65,6 +66,7 @@ if ($opt_o and not $opt_m) {die("Specify centroid time first\n");}
if ($opt_d and not -d $opt_d) {die("No such directory as $opt_d\n");}
if ($opt_i and not -d $opt_i) {die("No such directory as $opt_i\n");}
if ($opt_A) {if ($opt_A !~ /^\d/) {die("-A option should be numbers\n");}}
+if ($opt_h) {if ($opt_h !~ /^\d/) {die("-h option should be numbers\n");}}
$undef = -12345;
$eps = 0.1;
@@ -123,7 +125,8 @@ foreach $file (@ARGV) {
if ($opt_c) {open(SAC,"|$sac");}else {open(SAC,"|$sac > /dev/null");}
print SAC "echo on\n r $outfile\n";}
- if ($opt_h and $hdur > $min_hdur) { # convolve source time function
+ if (not $opt_h eq "") { # convolve source time function
+ if ($opt_h > $min_hdur) {$hdur = $opt_h;}
system("@prefix@/bin/convolve_stf g $hdur $outfile");
system("mv ${outfile}.conv ${outfile}");}
More information about the CIG-COMMITS
mailing list