Changeset 46 for SH_SHM/trunk/util


Ignore:
Timestamp:
10/30/2008 10:54:18 PM (15 years ago)
Author:
marcus
Message:

r31 | svn | 2008-03-03 20:47:24 +0100 (Mo, 03 Mär 2008) | 1 line

first working version for reading ingres sfdb; new check for origin in 1970; fixed ps output of locate_by_ttfit

Location:
SH_SHM/trunk/util
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • SH_SHM/trunk/util/check_evt.c

    r16 r46  
    3939#include BC_SYSBASE 
    4040#include "eventdsc.h" 
     41#include "tcusrdef.h" 
    4142 
    4243 
     
    6869static float   efv_magn=0.0;              /* max. magnitude found */ 
    6970static int     efv_pkp_count=0;           /* number of PKP phases */ 
     71static BOOLEAN efv_illegal_origin;        /* illegal origin time */ 
    7072 
    7173 
     
    99101        /* efv_infile is used for messages, directory will be removed */ 
    100102        i = strlen( infile ) - 1; 
    101         while  (infile[i] != '/' && i > 0)  i--; 
    102                 strcpy( efv_infile, infile+i+1 ); 
     103        while  (infile[i] != '/' && i > 0) 
     104                i--; 
     105        strcpy( efv_infile, infile+i ); 
    103106 
    104107        status = EveNOERROR; 
     
    133136        BOOLEAN  is_p_phase;              /* phase is P or (P) */ 
    134137        BOOLEAN  loc_given;               /* location given in this record */ 
     138        NTIME    ntime;                   /* numeric origin time */ 
    135139 
    136140        /* executable code */ 
     
    181185                efv_uncorr_loc = TRUE; 
    182186                strcpy( efv_uncorrphase, event->phase ); 
     187        } /*endif*/ 
     188 
     189        /* is there an origin time from 1970? */ 
     190        if  (loc_given)  { 
     191                tc_t2n( event->origin_time, &ntime, status ); 
     192                if  (SySevere(status))  { 
     193                        efv_illegal_origin = TRUE; 
     194                } else if  (ntime.year == 1970)  { 
     195                        efv_illegal_origin = TRUE; 
     196                } /*endif*/ 
    183197        } /*endif*/ 
    184198 
  • SH_SHM/trunk/util/ev2view.c

    r16 r46  
    240240                if  (event->mag[EvcMagMs] != EvEMPTY_MAGNITUDE)  { 
    241241                        fprintf( view, "  MS: %3.1f", event->mag[EvcMagMs] ); 
     242                } /*endif*/ 
     243                if  (event->mag[EvcMagMbb] != EvEMPTY_MAGNITUDE)  { 
     244                        fprintf( view, "  Mbb: %3.1f", event->mag[EvcMagMbb] ); 
    242245                } /*endif*/ 
    243246        } /*endif*/ 
  • SH_SHM/trunk/util/locate_by_ttfit.csh

    r16 r46  
    44#      =================== 
    55# 
    6 # version 14, 4-Jun-2007 
     6# $Revision: 31 $, $Date: 2008-03-03 20:47:24 +0100 (Mo, 03 MÀr 2008) $ 
    77# 
    88# Locate event via travel time fit. 
     
    5252 
    5353chdir $SH_SCRATCH 
     54# set units for plot, want to change this to cm 
     55gmtdefaults -Du >.gmtdefaults 
    5456 
    5557# delete previously existing result file 
     
    296298#$PSVIEW -right $PWD/$psfile & # this dies after the shell terminates (on Sun) 
    297299 
    298 set xtmp=`whoami | cut -c1-6` 
    299  
    300 if  ("$xtmp" == "tmpusr")  then 
    301  
    302         $PSVIEW $PWD/$psfile & 
    303  
    304 else 
    305  
    306         set pos="" 
    307         if  ("`hostname`" == "ersn24")  set pos="-geometry 940x780+0+0" 
    308  
    309         rsh -n `hostname` "$PSVIEW -right -display $DISPLAY $pos $PWD/$psfile" & 
    310  
    311 endif 
     300$PSVIEW $PWD/$psfile & 
    312301 
    313302#\rm $fitxyz 
Note: See TracChangeset for help on using the changeset viewer.