[cig-commits] r14964 - seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/UTILS/seis_process
tan2 at geodynamics.org
tan2 at geodynamics.org
Sun May 10 13:24:27 PDT 2009
Author: tan2
Date: 2009-05-10 13:24:26 -0700 (Sun, 10 May 2009)
New Revision: 14964
Modified:
seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/UTILS/seis_process/process_syn.pl.in
Log:
Add HDUR to -h. This allows me to always convolve with finite duration while my CMTSOLUTION is a step function. Fix the usage string.
Modified: seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/UTILS/seis_process/process_syn.pl.in
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/UTILS/seis_process/process_syn.pl.in 2009-05-10 20:07:47 UTC (rev 14963)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/UTILS/seis_process/process_syn.pl.in 2009-05-10 20:24:26 UTC (rev 14964)
@@ -12,9 +12,10 @@
-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 @@
@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_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 @@
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