Tools in /gaia/smeagol/local/bin that people may not know about.

First a word about environments.

Several environments are set by default. These can be refined and customized in your .cshrc file in your home directory. You can also clobber the defaults in the same way. For example, there are lots of things in the default path. Mine looks like this:

set path = ( $path /gaia/smeagol/home/seisadm/bin )
set path = ( $path /gaia/smeagol/local/usr/local/bin )
set path = ( $path /opt/SUNWspro/DOC5.0/bin)
set path = ( $path /gaia/smeagol/local/SUNWns)
set path = ( $path /gaia/smeagol/local/mysql/bin)
set path = ( $path . )

Note that all the settings have $path first then the directory I want to add. Without that, I'd be resetting the path instead of adding to it. For example, this would cause me to lose all the defaults:

set path = ( . )
set path = ( $path /gaia/smeagol/home/seisadm/bin )
set path = ( $path /gaia/smeagol/local/usr/local/bin )
set path = ( $path /opt/SUNWspro/DOC5.0/bin)
set path = ( $path /gaia/smeagol/local/SUNWns)
set path = ( $path /gaia/smeagol/local/mysql/bin)
(note the above is also a security hole because . is the first directory in the path).

One useful directory that should already be in your path (i.e. you don't need to add it in your .cshrc) is /gaia/smeagol/local/bin. I dump all sorts of things in there that I found useful at one point or another (or that others have asked for). There are normally one or more of three ways to figure out how to use the programs:

  1. Check the man page (not all programs have a man page).
  2. Call the program with a -h or --help.
  3. Just type the name of the program.

Some programs are just handy front ends to other programs. You can use more to find out what these are doing if its just a shell script that sets some environments and calls the real program (e.g. callxpick).


alchemy is proprietary software from Hadmade Software, Inc
It is a nice image conversion tool. It handles a gazillion different formats and can do other manipulations during the conversion (ImageMagick is also good for this but that's another ToT). I have aliases for the ones I use most that look like this:

This one converts a postscript file to a gif image.
alias aps2gif '/gaia/smeagol/local/bin/alchemy -o \!* -Zm2 -Ze -Zd 300 300 -g1 -c256'
You call it using aps2gif [myfile] where myfile is a .ps file. The .ps will be replaced with a .gif in the name of the gif file.

This one converts a postscript file to a jpeg image
alias aps2jpeg '/gaia/smeagol/local/bin/alchemy -o \!* -Zm2 -Ze -Zd 300 300 -j1 -c256'
You call it using aps2jpeg [myfile] where myfile is a .ps file. The .ps will be replaced with a .jpg in the name of the jpeg file.

This one converts a postscipt file to a pdf
alias aps2pdf '/gaia/smeagol/local/bin/alchemy/ -o \!* --d'
You call it using aps2pdf [myfile] where myfile is a .ps file. The .ps will be replaced with a .pdf in the name of the pdf file.

Note, I used aps2whatever instead of just ps2whatever (a represents alchemy) because there could be other programs called ps2whatever.

Use alchemy -h for more info.


Xmag and Xgrav from Steve Roeckor at RPI, are interactive tools to model gravity and magnetic data. You can use call.xgrav and call.xmag to get the appropriate environments. Both these programs and the documenation are provided as is.


Two standard seed tools from IRIS include rdseed and evalresp. evalresp is used evaluate so called RESP format response files created using rdseed and output ascii responses. rdseed is used to read a seed volume


focmec and associated programs are from Art Snoke at VA Tech and used to estimate and plot focal mechanisms using first motions, and amplitude ratios. Several people at CERI use it much more than I so ask around to find out more.

fpfit and associated programs are from Dave Oppenheimer at USGS and used to estimate and plot focal mechanisms based on first motions. Several people at CERI use it much more than I so ask around to find out more.


These programs are for interacting with an earthworm waveserver. All of our data are in one waveserver or another prior to being archived. In addition to the configuration files mentioned for the two modules, you also need an earthworm config file. Earthworm has a steep learning curve but you need not climb that hill just to use these modules. Until we make the complete switch to ew 7.x (sometime during fall 2007), an example ew config file is ew_sol_sparc.cmd. Use source ew_sol_sparc.cmd to get the proper environments prior to running modules mentioned here. See Mitch for some help if you need it.

getmenu and waveman2disk are earthworm standalone modules. getmenu will attach to an earthworm wave_serverV and return a list of available channels and their respective start and end times. The earthworm waveserver stores a continuously revolving first-in-first-out buffer of raw seismic waveform data. The CERI public waveserver is about a week long (varies considerably depending on channel). You need to know a valid ip and port to use getmenu and waveman2disk:
pubwave.ceri.memphis.edu:16021CERI node
pubwave.ceri.memphis.edu:16022New Madrid node
pubwave.ceri.memphis.edu:16023Lenox node
pubwave.ceri.memphis.edu:16024Marked Tree node
pubwave.ceri.memphis.edu:16025East TN nodes
pubwave.ceri.memphis.edu:16026USNSN data
pubwave.ceri.memphis.edu:16027Other data
pubwave.ceri.memphis.edu:16028ANSS-MA strongmotion data
An example config file for waveman2disk is getwave.d.

Use waveman2disk getwave.d to run it.
Use getmenu ip:port to run getmenu (no config file needed and ip:port is from the list above).

ew2mseed is from ISTI. It will extract data from an earthworm wave_serverV and output continuous miniseed. It requires earthworm 6.x. ew2mseed_scnl is the same as ew2mseed but is location code compliant and requires earthworm 7.x. An example config file for ew2mseed is ew2mseed.d. Be careful, you could very easily fill up many disks with this one.
Use ew2mseed ew2mseed.d to run it.


pine46 from the University of Washington is a Solaris, keyboard driven email client. There is only one dinosaur here that I'm aware of who uses it.


GCFTools from ISTI are tools for dealing with raw gcf data from Guralp instruments. They include:
dfdextractread GCF data off of a DFD SCSI/firewire disk
gcfclientreceive GCFtools UDP or GCF SCREAM or MSS100 GCF packets via a Network.
gcfconvCollect a GCF transmission stream on a UNIX serial port and write SEGY/AH/SAC files on disk
gcfdiskread GCF data off of a SCSI disk
gcfservserve GCF UDP or GCF SCREAM packets via Internet
gcfutiltest and collect a GCF transmission stream on a UNIX serial port


Programs Mitch wrote and put here in case others find them useful.
arc2sum Read a hypoellipse arc file and dump a human readable summary to the screen.
calldegainRun the degain program on a directory of NM network data.
calldegain2Run the degain program on a directory of ET network data.
degainProgram to remove gain ranging for isis and pandaII.
callxpickScript to set up environments, if they aren't already set, and call Xpick
distanceCalculate the great circle distance between two lat/lon pairs
losetimeFor a date and time, remove X number of seconds and return the new date and time.
mytoupperConverts an ascii string to all upper case
pqlpick2focConvert a pql format pick file to focmec format
rmrespAncient response removal. Probably better to use sac transfer or something instead.
sac2ascRead a sac file and spew ascii to the screen.
sacnewscnChange the SCN of a sac file.
sta2sacread a hypoellipse station file and populate the sac header with station information.
sync_sacChange the start and end times of two sac files so that they are the same.

Tools from Heather (are actually just links to executables in ~hdeshon/bin).
getsachdrread specified sac header fields
setsachdrwrite specified sac header fields


Sactools from Urs Kradolfer are several handy programs to manipulate sac data. From the README

A short description comes when running each of these programs whithout any argument except gse2sac and gseinfo, they are supposed to be used as filter. For gse2sac and gseinfo, you need to type something like gseinfo -help.

Warning: format 'INT' is broken in gse2sac and sac2gse. Use CM6!
gse2sacextracts signal to sac files from gse2 file or stdin
sac2gseconverts sac files to gse2 format (stdout)
gseinfodump gse header informations from file or stdin to stdout
sac2esstfconverts sac files (same station, same time) to esstf format
esstf2sacconverts esstf data into sac files
esstfinfodump esst header informations to stdout
SP2gseconverts renass short-period data to gse on stdout
SP2sacconverts renass short-period data to sac files if input files are .dat.gz and .hed.gz, gzip must be in your PATH
Clones of SAC commands:
chsacch
syncsacsynchronize
lhsaclh
mulsacmul
rgsacrg
rmeansacrmean
Other tools working on sac files
swapsacbyte-swapping
cleansacclears all the header fields but time, date and station infos
hdsacshort-cut of chsac, mainly to set event origin time and loc
cplocsaccopies event info and picks from a file to another
incsacincrements begin time by [int]n minutes
shiftsacincrements begin time by [double]f seconds
renamesacgenerates (to stdout) a command line as: mv YYYY.MM.DD-hh.mm.ss.STA.CHC[n]
sacmergecut or/and merge one or more files (same station and sample rate)
updateinfosac updates sac header (see infosta.doc)