[cig-commits] r14882 - seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/UTILS/seis_process

leif at geodynamics.org leif at geodynamics.org
Tue May 5 20:39:40 PDT 2009


Author: leif
Date: 2009-05-05 20:39:40 -0700 (Tue, 05 May 2009)
New Revision: 14882

Modified:
   seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/UTILS/seis_process/convolve_stf.c
Log:
No need for undef, eps.


Modified: seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/UTILS/seis_process/convolve_stf.c
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/UTILS/seis_process/convolve_stf.c	2009-05-06 03:10:21 UTC (rev 14881)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/UTILS/seis_process/convolve_stf.c	2009-05-06 03:39:40 UTC (rev 14882)
@@ -104,14 +104,12 @@
     float hdur, *data;
     int errno, j, datasize, len_fn;
     const int min_nhdur = 10;
-    const float undef = -12345.0;
-    const float eps = 1e-3;
 
 
     if(argc < 4) {
         fprintf(stderr,
-                "Usage: %s g[|t] hdur sacfiles\n"
-                "  This program convolves sacfiles with gaussion(|triangle)\n"
+                "Usage: %s g[|t] HDUR FILE...\n"
+                "  This program convolves SAC files with gaussian(|triangle)\n"
                 "  source time function of given half duration\n",
                 argv[0]);
         return -1;
@@ -184,7 +182,7 @@
         /* get additional info */
         getfhv("delta", &dt, &nerr, strlen("delta"));
         getfhv("o", &origin, &nerr, strlen("o"));
-        if(fabs(origin - undef) < eps) {
+        if(nerr) {
             fprintf(stderr,"No origin time is defined for the sac file\n");
             return -1;
         }



More information about the CIG-COMMITS mailing list