SAC Commands

SAC commands are entered at the command prompt.  Generally data are constructed within SAC or read from a file before other operations are attempted.  Alternatively, sometimes certain SAC commands are invoked to prepare a certain kind of data operation or to set up parameters for a plot.

The definitive website on SAC commands is located at .

Here is an alphabetical list of commands contained within SAC.  Note, that a command may have a shorthand form (on the left of each word pair).
absolutevalue absolutevalue
abs           abs
add           add
addf          addf
am            keepam
apk           apk
axes          axes
axis          axes
fortran       external_interface
fft           fft
dft           fft
fileid        fileid
filterdesign  filterdesign
fd            filterdesign
fir           fir
floor         floor
funcgen       funcgen
fg            funcgen
lds           lds
listdatasets  lds
line          line
linefit       linefit
linlin        linlin
linlog        linlog
listhdr       listhdr
lh            listhdr
load          load
loadctable    loadctable
lct           loadctable
log           log
log10         log10
loglab        loglab
loglin        loglin
loglog        loglog
lowpass       lowpass
lp            lowpass
qdp           qdp
quantize      quantize
quit          quit
done          quit
end           quit
exit          quit
q             quit
quitsub       quitsub
vspace        vspace
vsp           vspace
bandpass      bandpass
bp            bandpass
bandrej       bandrej
br            bandrej
bbfk          bbfk
beam          beam
beamform      beam
begindevices  begindevices
bd            begindevices
begg          begindevices
bg            begindevices
beginframe    beginframe
begfr         beginframe
bf            beginframe
beginwindow   beginwindow
bw            beginwindow
benioff       benioff
binoperr      binoperr
boec          binoperr
border        border
getbb         getbb
gmap          gmap
grayscale     grayscale
gs            grayscale
grid          grid
group         group
gtext         gtext
gt            gtext
macro         macro
m             macro
map           map
markptp       markptp
markp         markptp
marktimes     marktimes
markt         marktimes
markvalue     markvalue
markv         markvalue
merge         merge
message       message
mes           message
mtw           mtw
mul           mul
mulf          mulf
mulomega      mulomega
read          read
r             read
readalpha     readalpha
ra            readalpha
readbbf       readbbf
rbbf          readbbf
readcss       readcss
rcss          readcss
readerr       readerr
rerr          readerr
readhdr       readhdr
rh            readhdr
readsdd       readsdd
rsdd          readsdd
readsp        readsp
rsp           readsp
rename        rename
report        report
reverse       reverse
rglitches     rglitches
rmean         rmean
rms           rms
rotate        rotate
rot           rotate
rq            rq
rtrend        rtrend
rtr           rtrend
wait          wait
wcss          writecss
whpf          whpf
width         width
wiener        wiener
wnr           wiener
wild          wild
window        window
write         write
w             write
writebbf      writebbf
wbbf          writebbf
writecss      writecss
wcss          writecss
writehdr      writehdr
wh            writehdr
writesdd      writesdd
writesp       writesp
wsp           writesp
capf          capf
ccipf         capf
cds           cds
currentdataset cds
chnhdr        chnhdr
ch            chnhdr
chpf          chpf
color         color
col           color
comcor        comcor
contour       contour
cont          contour
convert       convert
conv          convert
convolve      convolve
convo         convolve
copy          copy
copyhdr       copyhdr
correlate     correlate
cor           correlate
cut           cut
cuterr        cuterr
hanning       hanning
han           hanning
help          help
h             help
highpass      highpass
hp            highpass
hilbert       hilbert
news          news
nplotc        nplotc
null          null
scallop       scallop
scp           scallop
setbb         setbb
setdevice     setdevice
setmacro      setmacro
sgf           sgf
hcd           sgf
smooth        smooth
spe           spe
spectrogram   spectrogram
spg           spectrogram
sqr           sqr
sqrt          sqrt
sss           sss
stretch       stretch
sub           sub
subf          subf
symbol        symbol
sym           symbol
synchronize   synchronize
synch         synchronize
syntax        syntax
syn           syntax
systemcommand systemcommand
sc            systemcommand
xdiv          xdiv
xfudge        xfudge
xfull         xfull
xgrid         xgrid
xlabel        xlabel
xlabl         xlabel
xlim          xlim
xlin          xlin
xlog          xlog
xvport        xvport
xvp           xvport
xwind         xvport
datagen       datagen
dg            datagen
decimate      decimate
delete        delete
dif           dif
div           div
divf          divf
divomega      divomega
ifft          ifft
idft          ifft
image         image
inicm         inicm
installmacro  installmacro
int           int
interpolate   interpolate
interp        interpolate
oapf          oapf
ocipf         oapf
ohpf          ohpf
taper         taper
ticks         ticks
title         title
trace         trace
transcript    transcript
transfer      transfer
trans         transfer
transfertable transfertable
tsize         tsize
ydiv          ydiv
yfudge        yfudge
yfull         yfull
ygrid         ygrid
ylabel        ylabel
ylabl         ylabel
ylim          ylim
ylin          ylin
ylog          ylog
yvport        yvport
yvp           yvport
ywind         yvport
echo          echo
enddevices    enddevices
ed            enddevices
eg            enddevices
endg          enddevices
endframe      endframe
ef            endframe
endfr         endframe
envelope      envelope
erase         erase
era           erase
evaluate      evaluate
eval          evaluate
exp           exp
exp10         exp10
external      external_interface
ext           external_interface
keepam        keepam
khronhite     khronhite
pause         pause
picks         picks
plabel        plabel
plot          plot
p             plot
plot1         plot1
p1            plot1
plot2         plot2
p2            plot2
plotalpha     plotalpha
pa            plotalpha
plotc         plotc
pc            plotc
plotctable    plotctable
plotdy        plotdy
plotpk        plotpk
ppk           plotpk
plotpktable   plotpktable
plotpm        plotpm
ppm           plotpm
plotsp        plotsp
psp           plotsp
plotxy        plotxy
pxy           plotxy
production    production
prod          production
unsetbb       unsetbb
unwrap        unwrap
zcolors       zcolors
zlabels       zlabels
zlevels       zlevels
zlines        zlines
zticks        zticks

A description of each command can be obtained while in the SAC program by typing

SAC> help commandname

For example, here is what you would see for the command, abs:

SAC> help abs

 SAC Command Reference Manual                                      ABS

 Takes the absolute value of each data point.


 1301: No data files read in.

 1307: Illegal operation on spectral file


 January 8, 1983 (Version 8.0)

SAC commands can be grouped into several functional categories:

As you can probably tell, there are many things that you can tell the SAC program to do.  Usually, it pays to "play" with SAC, executing commands to process a few seismograms to understand what you want to do with the data.  Once you have your processing clarified, the commands can be written into a file and used as a script - the SAC macro - to process more data, or to keep a record of exactly what you did to the data.


last modified 3/05/01