/******************************************************** * Show SAC data max. abs amplitude for each seismogram * Usage: * lsac0 sac_files ... * Modified by Zhigang Peng, Tue Apr 17 17:29:23 PDT 2001 * By adding abs to the max amplitude * Take the b e as the t1 and t2 ********************************************************/ #include #include #include "sac.h" int main(int argc, char **argv) { SACHEAD hd; int i,j,n,n1,n2; float *ar; float t1, t2, am, t, sigma; if (argc < 2) { fprintf(stderr, "Usage: %s sac_files ...\n",argv[0]); return -1; } for (i=1;ihd.npts-2) n2=hd.npts-2; if (n1>n2) { fprintf(stderr,"no time window for %s\n",argv[i]); continue; } for(am=ar[n1],n=j=n1;j