pssac - Plot seismograms in SAC format on maps
pssac [ saclist|SACfiles ] -Jparameters -Rregion [ -B[p|s]parameters ] [ -C[t0/t1] ] [ -Ddx[/dy] ] [ -Ea|b|k|d|n[n]|u[n] ] [ -F[i][q][r] ] [ -G[p|n][+gfill][+zzero][+tt0/t1] ] [ -K ] [ -Msize[u][/alpha] ] [ -O ] [ -P ] [ -Q ] [ -Ssec_per_inch[unit] ] [ -T[+tn][+rreduce_vel][+sshift] ] [ -U[stamp] ] [ -V[level] ] [ -Wpen ] [ -Xx_offset ] [ -Yy_offset ] [ -ccopies ] [ -hheaders ] [ -ttransp ]
Note: No space is allowed between the option flag and the associated arguments.
pssac reads SACfiles in SAC format or reads filenames and controlling parameters from saclist [or standar input] and generates PostScript that will plot seismograms on a map. The PostScript code is written to standard output.
One ASCII data table file holding a number of data columns. If saclist is not given then we read from standard input. Parameters are expected to be in the following columns:
filename [X Y [pen]]
filename is the name of SAC file to plot. X and Y are the position of seismograms to plot on a map. On linear plots, the default X is the begin time of SAC file, which will be adjusted if -T option is used, the default Y is determined by -E option. On geographic plots, the default X and Y are station longitude and latitude specified in SAC header. The X and Y given here will override the position determined by command line options. pen, if given, will override the pen from -W option for current SAC file only.
Choose profile type (the type of Y axis).
a: azimuth profile.
b: back-azimuth profile.
k: epicentral distance (in km) profile.
d: epicentral distance (in degree) profile.
n: trace number profile. The Y position of first trace is numbered as n [Default n is 0].
u: user defined profile. The Y positions are determined by SAC header variable usern, default using user0.
Data preprocess before plotting.
i: integral
q: square
r: remove mean value
i|q|r can repeat multiple times. For example, -Frii will convert acceleration to displacement. The order of i|q|r controls the order of the data processing.
Paint positive or negative portion of traces. If only -G is used, default to fill the positive portion black.
p|n controls the painting of positive portion or negative portion. Repeat -G option to specify fills for positive and negative portions, respectively.
+gfill: color to fill
+tt0/t1: paint traces between t0 and t1 only. The reference time of t0 and t1 is determined by -T option.
+zzero: define zero line. From zero to top is positive portion, from zero to bottom is negative portion.
Vertical scaling.
size[u]: scale all traces size[u] on a map. The default unit is PROJ_LENGTH_UNIT. The scaling factor is defined as yscale = size*(north-south)/(depmax-depmin)/map_height.
size/alpha:
alpha < 0, use the same scaling factor for all traces. The scaling factor will scale the first trace to size[u].
alpha = 0, multiply all traces by size. No unit is allowed.
alpha > 0, multiply all traces by size*r^alpha, r is the distance range in km.
Time alignment and shift.
+ttmark: align all trace along time mark. tmark are -5(b), -4(e), -3(o), -2(a), 0-9(t0-t9).
+rreduce_vel: reduce velocity in km/s.
+sshift: shift all traces by shift seconds.
-X[a|c|f|r][x-shift[u]]
To plot a single seismogram seis.SAC (generated by SAC command funcgen seismogram) and paint positive portion black and negative portion red:
gmt pssac seis.SAC -JX10c/5c -R9/20/-2/2 -Baf -Fr -Gp+gblack -Gn+gred > single.ps
To plot several seismograms (generated by SAC command datagen sub tele *.z) on a distance profile:
gmt pssac *.z -R200/1600/12/45 -JX15c/5c -Bx200+l'T(s)' -By5+lDegree -BWSen \
-Ed -M1.5c -W0.5p,red > distance_profile.ps
To plot seismograms (generated by SAC command datagen sub tele *.z) on a geographic map:
gmt pssac *.z -JM15c -R-120/-40/35/65 -Baf -M1i -S1500c -K > map.ps
saclst stlo stla f *.z | gmt psxy -J -R -St0.4c -Gblack -i1,2 -O >> map.ps
Refer to SAC User Manual for more details on SAC format and SAC header variables.
Dongdong Tian, School of Earth and Space Sciences, University of Science and Technology of China, Hefei, Anhui, China