datasynplot.macro
macro name = datasynplot.macro
Comments
*datasynplot.macro stationame datfile synfile flag tstart tfin
*                     $1         $2      $3    $4    $5    $6
*
*    stationame = Tanzania station name 4 letters
*    datfile    = data file name
*    synfile    = synthetic seismogram file name
*    flag       = 1, Z component
*               = 2, R component
*               = 3, T component
*    tstart     = xlim begin time
*    tfin       = xlim end time
*
r $2 $3
synchronize
qdp off
*
*   correct data and synthetic to 10^6 nm
*    (0.41 factor is for actual regional moment, 11/1/00)
mul 1 1000
div 1000000.
mul 1 0.41
*
*   normalize the amplitudes and save scale factors
*
setbb datscale (max &1,depmax (abs &1,depmin ) )
setbb synscale (max &2,depmax (abs &2,depmin ) )
div %datscale% %synscale%
*
*  get 3 significant places to the scale factors
*
setbb d1 %datscale%
setbb d2 %synscale%
*
*    Choose component type and set plot parameters
*
if $4 eq 1
*    Z component
xvport 0.1 0.35
yvport 0.5 0.9
setbb pdat 0.275
setbb psyn 0.275
setbb snm 0.1
setbb cnm 0.1
setbb comp 'Z'
setbb stat $1
*
elseif $4 eq 2
*    R component
xvport 0.4 0.65
yvport 0.5 0.9
setbb pdat 0.6
setbb psyn 0.6
setbb snm 0.4
setbb cnm 0.4
setbb comp 'R'
setbb stat ' '
*
elseif $4 eq 3
*    T component
xvport 0.7 0.95
yvport 0.5 0.9
setbb pdat 0.9
setbb psyn 0.9
setbb snm 0.7
setbb cnm 0.7
setbb comp 'T'
setbb stat ' '
*
endif
*
xlim $5 $6
ticks off top right left
axes off top right left
fileid off
picks off
xlabel on 'Time from Origin, sec'
plabel '%stat ' size medium position %snm% 0.85
plabel '%comp% ' size medium position %cnm% 0.7
plabel "%d1% " size tiny position %pdat% 0.9
plabel "%d2% " size tiny position %psyn% 0.7
gtext font 1 size small
p1
 

dependent variable driven
 
 
 
 
 
 
 
 
 
 
 

Fudge factors for amplitude, moment scaling
 
 
 
 
 
 
 

blackboard variables
 
 
 
 
 
 
 
 
 
 
 
 

Conditional IF statements
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Control ticks and axes
 
 
 
 
 

label the plot 

Actually, this macro is called from another macro which has specific file information and time windows for the data and synthetics.

tetemeko {langston} 67 > cat datsyn.plot.macro
bd sgf
beginframe
macro datasynplot.macro  puge /space/langston/ts0/JSP/TzRukwa/sac/puge.d.z ruk.z.008.027 1  45 125
macro datasynplot.macro  puge /space/langston/ts0/JSP/TzRukwa/sac/puge.d.r ruk.r.008.027 2  45 125
macro datasynplot.macro  puge /space/langston/ts0/JSP/TzRukwa/sac/puge.d.t ruk.t.008.027 3  45 125
endframe
ed sgf
quit

Running datsyn.plot.macro and converting the resulting sgf file into postscript makes the following plot:



Return



last modified 3/06/01