prem - prem is a simple program to return the PREM velocities and density for an input depth. It seems I am often wondering what the PREM velocity at some depth is so this makes that lookup easy. It also returns the PREM values with an input dVs, etc. so one can quickly retrieve the actual velocity associated with a tomography model for example.
sachead - sachead returns the value of a specified SAC header variable to standard out. Is useful in shell scripts when you want to set a shell variable to the value stored in the header of a SAC file, or to just quickly see the value of a SAC header variable without starting SAC.
usage: >> sachead sacfile headervariable
where: sacfile is the name of the input SAC file to retrieve the header information from; headervariable is the SAC header variable (e.g., gcarc, evla, stla, ...)
Example of how to set a cshell variable to the SAC header variable gcarc.
>> set gc = `sachead foo.sac gcarc | awk '{print $2}'`
sac2xy - sac2xy takes an input SAC file and returns a table of x,y pairs of time and amplitude of the SAC trace. This is useful when using a program such as GMT to plot seismic waveforms.
usage: >> sac2xy sacfile outputfile
where: sacfile is the name of the input SAC file; outputfile is the name of the file to write the x,y pairs to.
Example, write the trace in foo.sac to foo.xy
>> sax2xy foo.sac foo.xy
xy2sac - this is a rather crude program to take an input Ascii table of values and convert them into SAC format. It only sets the most minimal of header values because most header values are specific to what you are converting. But, it will take your ascii data and turn it into a SAC file, which is the hardest part. For this program the input data must have column 1 = time values, column 2 = amplitude values.
amp2sac - similar to xy2sac but takes as input a vector of amplitude values and converts to a SAC file. Command line input lets you set the sampling interval.