07.31.2005 07:44

NGDC Coastal Relief Model

I just made a new fledermaus object: sbb-ngdc-coastal-relief-3sec.sd.bz2 [1.6 MB sd file]

I started at this web page: NGDC Coastal Relief Model Vol. 06 Shaded Relief Images - Southern California Coast Grids. From there I selected Design-a-Grid.

I made a 3 second ascii data file for my area using the "US Coastal Relief Model Grids. I then used IVS's DMagic program that comes with Fledermaus. In DMagic, I did an Import Surface and used the default shading and color maps. Using ascii is problable not the best, but it works. I just had to deal with a 30 MB data file to download.

This is what I got:

Now to blend this in with my figure of the SBB currents.

Posted by Kurt | Permalink

07.31.2005 05:41


The Society of Naval Architects and Marine Engineers

An amusing looking book: Build Your Own Underwater Robot (and Other Wet Projects)

Another interesting sounding book: Introduction to Mechatronics and Measurement Systems, 1999. By Histand and Alciatore.

Posted by Kurt | Permalink

07.30.2005 18:55

Python 3D

La Quinta at exit 294 south of Salt Lake has free wireless. Yeah! We are pretty wiped out from the driving. This hotel got 2 stars on the web, but is nicer than some 3 star hotels I have stayed at. We both passed out when we got here.

Soya 3D
Soya 3D is a high level 3D engine for Python. It relies on OpenGL, SDL
and Cal3D. It is designed with games in mind, focusing both on
performance and ease-of-use. Soya 3D is available under the GPL and
currently runs on GNU/Linux, though ports to other OS are planned (Mac
OS X, windows,...) since it uses only portable libraries.

Telemmersion System - 360° Spherical Video Capture (VR). I am sure this runs afoul of the annoying iPix patents and trademarks that makes it illegal to talk about "panospheric" images in papers.

I could have used this last year for some of my research: sniffing in a switched network.

Bash tutorial

Comprehensive TCP/IP and UDP/IP port numbers for when your /etc/services is not up to the task.

zipcode map - start typing the number and it will begin zooming in. Cool!

Brown Grad Student's Seismic Study Shakes Up Plate Tectonics. I would have to read the Nature paper before I can comment.
  PROVIDENCE, R.I. - Earth's cool, rigid upper layer, known as the
  lithosphere, rides on top of its warmer, more pliable neighbor, the
  asthenosphere, as a series of massive plates. Plates continuously
  shift and break, triggering earthquakes, sparking volcanic
  eruptions, sculpting mountains and carving trenches under the sea. 

But what, exactly, divides the lithosphere and the asthenosphere? In the latest issue of Nature, a trio of geophysicists from Brown University and the Massachusetts Institute of Technology publish research that sheds new light on the nature of the boundary between these rocky regions.

Lead author Catherine Rychert, a 26-year-old graduate student in Brown's Department of Geological Sciences, found a sharp dividing line between the lithosphere and the asthenosphere, according to data culled from seismic sensors sprinkled across the northeastern United States and southeastern Canada. Rychert and colleagues discovered that sound waves recorded by the sensors slow considerably about 90 to 110 kilometers below ground - a sign that the rock is getting weaker and that the lithosphere is giving way to the asthenosphere. Within in a distance of a mere 11 kilometers - roughly 7 miles or less - the transition is complete. ...

Posted by Kurt | Permalink

07.29.2005 14:51

Dueling google and microsoft maps

I wish I may, I wish I might... have the ability to turn off animated gifs in Sarfari. All these add images really chew up battery for no good reason!

Google and Microsoft maps side by side.

JTrack3D from NASA. Shows many satelites around the earth. I could only figure out how to zoom out using the standard Mac laptop track pad. But then again, I did not read the directions :)
he Photographer's Right - A Downloadable Flyer: Your Rights When You Are Stopped or Confronted for Photography

ipod battery v1.0 - Show a different battery display on the ipod. I have not tried this.

Ice Lake on Mars

Posted by Kurt | Permalink

07.28.2005 10:33

gmt contour map

I just created a very basic contour basemap for me to add currents to. I uses mbm_grdplot to get the basic file and then edited from there. I switched grdimage to be grdcontour along with other changes. Why in the world can illustrator not properly read the output of gnuplot and gmt that then goes through ps2pdf? Other programs can do this. And illustrator is up to correctly reading gmt ps files without mangling the line strokes. Really drives me crazy! Here are the final results:
#! /bin/csh -f
# This shellscript created by following command line:
# mbm_grdplot -IsantabarbC_bath.grd
# Then hacked by Kurt Schwehr

set PS_FILE         = santabarbC_bath.grd.ps
set CPT_FILE        = santabarbC_bath.grd.cpt
set MAP_SCALE       = 7.5
set MAP_REGION      = -120:30/-119:20/33:52/34.5
set X_OFFSET        = 1
set Y_OFFSET        = 2.2175
# Save existing GMT defaults
echo Saving GMT defaults...
gmtdefaults -L > gmtdefaults$$
# Set new GMT defaults
echo Setting new GMT defaults...
gmtset MEASURE_UNIT inch
gmtset PAPER_MEDIA archA+
gmtset ANOT_FONT Helvetica
gmtset LABEL_FONT Helvetica
gmtset HEADER_FONT Helvetica
gmtset FRAME_WIDTH 0.075
gmtset TICK_LENGTH 0.075
gmtset COLOR_FOREGROUND 255/255/255
gmtset COLOR_NAN 255/255/255
# Make color pallette table file
echo Making color pallette table file...
echo   -625  37  57 175 -562.5  40 127 251 > $CPT_FILE
echo -562.5  40 127 251   -500  50 190 255 >> $CPT_FILE
echo   -500  50 190 255 -437.5 106 235 255 >> $CPT_FILE
echo -437.5 106 235 255   -375 138 236 174 >> $CPT_FILE
echo   -375 138 236 174 -312.5 205 255 162 >> $CPT_FILE
echo -312.5 205 255 162   -250 240 236 121 >> $CPT_FILE
echo   -250 240 236 121 -187.5 255 189  87 >> $CPT_FILE
echo -187.5 255 189  87   -125 255 161  68 >> $CPT_FILE
echo   -125 255 161  68  -62.5 255 186 133 >> $CPT_FILE
echo  -62.5 255 186 133      0 255 255 255 >> $CPT_FILE
# Define data files to be plotted:
set DATA_FILE        = santabarbC_bath.grd

#set CONTOURS = -C200 # for quick look set CONTOURS = -C25

echo Running grdcontour... grdcontour $DATA_FILE $CONTOURS -J$MAP_PROJECTION$MAP_SCALE \ -R$MAP_REGION \ -X$X_OFFSET -Y$Y_OFFSET -K -V >! $PS_FILE

# 188 143 143 rosy brown # 188 143 143 RosyBrown # 139 69 19 saddle brown # 139 69 19 SaddleBrown # 244 164 96 sandy brown # 244 164 96 SandyBrown set brown = 165/42/42 # 255 193 193 RosyBrown1 # 238 180 180 RosyBrown2 # 205 155 155 RosyBrown3 # 139 105 105 RosyBrown4 # 255 64 64 brown1 # 238 59 59 brown2 # 205 51 51 brown3 # 139 35 35 brown4

# Where are all the rivers at? -Ia should be ALL pscoast -Ia30 -Df -W -G$brown -C0/0/255 -J$MAP_PROJECTION$MAP_SCALE \ -R$MAP_REGION -O -K -V >> $PS_FILE

echo Running psbasemap...

set TITLE = "Santa Barbara Basin Circulation"

psbasemap -J$MAP_PROJECTION$MAP_SCALE \ -Lfx1i/1i/0/10 \ -R$MAP_REGION \ -B5m/5m:."${TITLE}": \ -O -V >> $PS_FILE

echo Resetting GMT fonts... /bin/mv gmtdefaults$$ .gmtdefaults

gv santabarbC_bath.grd.ps &

Posted by Kurt | Permalink

07.28.2005 09:16

Emacs TeX mode

I just tried TeX -> Validate Buffer in the emacs TeX mode while editing my current paper. Hah. And that is not a good hah. Validate is pretty weak. Here is the output I get:
 12: \begin{document}
 29: \begin{abstract}
 48: \end{abstract}
 50: \begin{article}
277: %@article{
611: \end{article}   
729: \caption{ Core 1 is located in the toe of the Gaviota Slide
747: \caption{ Core 2 is located in the toe of the Gaviota Slide (See
760: \caption{ Core 4 is located in the above the crack between the Gaviota
774: %% \caption{ Core 6 is located in top of the center lobe of the Goleta
784: \end{document}
Oh look, there are indeed matching begin and ends for the document and abstract tags. This did not find one valid complaint and it is not honoring comments. My other major touble is that highlighting freaks out after CVS checkin. I have to do a M-x revert-buffer to get highlighting to work again.

Posted by Kurt | Permalink

07.28.2005 08:35

My latest slashdot article - Free Audio Content for Long Drives?

I got an article accepted on slashdot this week. Here it is and some of the feedback. I am not going to bother responding to the folks that are upset that I did not specify which country we are driving across. Does it matter? Is my mp3 file going to care whether this is Australia, Canada, or the US? I was NOT looking for podcasts. I can only take so many of those.
Free Audio Content for Long Drives?

We are going to be driving across the country at the end of the week to a new job and wondered if there are good sources for free books/stories on tape that we could put on our iPod to make the long hours of freeway driving go much faster. What are your favorite stories for the road and where are good places to pickup content? Old radio shows, mysteries, etc are all good!"

WARNING: I have yet to preview any of this audio. Could be complete junk. And no, I don't have time to fiddle with converting ram real audio files to mp3. That's it for now. How about some more bookmarks? Ok.

http://www.criminalcheck.com/ - find out how good or bad your zip code is. Can be a little bit unnerving!

C++ pointer tutorial - Jeremy, maybe this will help?

MisterHouse -- It Knows Kung-Fu - X10 type stuff

  Building upon concepts and designs from the past several decades,
  the Mars Homestead Project seeks to develop a unified plan for
  building the first habitat on Mars by exploiting local
  materials. The ultimate goal of the project is to build a growing,
  permanent settlement beyond the Earth, thus allowing civilization to
  spread beyond the limits of our small planet. 

To Arrive, Survive & Thrive!TM
Trade mark??? Are you kidding me? This looks like the Stanford International Mars Mission project but with CAD rendering systems and lots of pretty ray traced pictures.

Posted by Kurt | Permalink

07.28.2005 08:33

Saturn of the Valley and bibtex

I am in the "Saturn of the Valley" this morning getting an oil change and some other stuff done before going across the country. Not all Saturns are created equally. Yes, this one has donuts (not all do), but no donut holes :)
I made a trivial change to my x/doc/BPSIO-04/Makefile for sucking in Endnote bibliographic info into Bibtex. My new rule looks like this:
# Assumes santabarbara.txt was export from EndNote onto the Desktop
	-mv ${NAME}.bib ${NAME}.bib.bak
	/sw/bin/tr '\r' '\n' < ~/Desktop/${NAME}.txt > ${NAME}.bib
	diff ${NAME}.bib.bak ${NAME}.bib
The rule now makes a backup of the bibtex file, then translates the new Mac format bibtex from the desktop to create a new santabarbara.bib. Then it gives me some feedback as to what changed.

Posted by Kurt | Permalink

07.27.2005 20:04

Google Map for the Space Shuttle

Posted by Kurt | Permalink

07.27.2005 16:57

pydoc complaints

It is great that pydoc is built into the python distributions, but it is missing some features that I think would be really important.

First, I would really like it to have an option to complain about undocumented functions and arguments. I like that feature in doxygen. Having a friendly reminder to keep documenting is a good thing!

Secondly, it would be much better to have a standard way to specify arguments as with doxygen. There is nothing inside the doc string that knows about args. This is really a part of the first gripe.

Third, when I import unittest and derive a subclass for my tests, I want a couple of different options. One would be to turn on and off the documentation of the test cases. The other would be to show or the methods from the parent class. I don't really want people using one of my classes to have to wade through the documentation of failIfEqual, failUnless, etc.

Fourth, what about an epilog section for less important text. I really don't like putting the whole GPL license text at the front. I could do a one liner there and include the whole deal at the end. That would be better!

Fifth, how do I get the links to other modules to work? file:///Users/schwehr/projects/xcore/src/segy-py/unittest.html is not where the unittest.html doc lives!!!

Finially, it would be nice to have the option to either sort the methods or not sort the methods. Why? It is easier to see the structure of the code file to not sort the methods. Then when I release code, I will rebuild the documentation to be sorted.

Just so nobody is confused... I think pydoc is a "REALLY GOOD THING" and I appreciate the python community for putting it in there.

Posted by Kurt | Permalink

07.27.2005 16:31

Santa Barbara oil and gas platforms

I can't remember what A, B, and C are...
  -120.646389 34.455083 HERMOSA
  -120.680817 34.469136 HARVEST
  -120.729428 34.610419 IRENE
  -120.702289 34.495014 HIDALGO
  -120.279183 34.350392 HERITAGE
  -120.120531 34.390731 HONDO
  -120.167525 34.376675 HARMONY
  -119.276258 34.117497 GINA
  -119.400217 34.125081 GAIL
  -119.418564 34.182342 GILDA
  -119.467828 34.179572 GRACE
  -119.588094 34.286617 HABITAT
  -119.541486 34.337675 HOGAN
  -119.552117 34.334992 HOUCHIN
  -119.603247 34.331344 HILLHOUSE
  -119.560397 34.333256 HENRY
  -119.612469 34.331886 A
  -119.621536 34.332342 B
  -119.630767 34.332925 C
  -118.116494 33.563781 EUREKA
  -118.128222 33.582367 ELLEN
  -118.140686 33.595786 EDITH

Posted by Kurt | Permalink

07.27.2005 16:21

WARNING to Mac Laptop users

WARNING^2 - This material is unconfirmed and is my recollection of what the Genius Bar guy said.

I just paid a visit to the Apple Store in the Grove. I had a question about my battery freaking out. Turns out that there is a big no-no with Mac laptops:
  ALWAYS plug in your power adapter to the wall first.  Then plug the
  adapter into the laptop afterwards.
The guy said that it is extremely hard on the power supply module and the battery to plug and unplug the wall socket with the connector still in the laptop. He also said, "Didn't you read about this in the manual?"

Yikes, so even a power outage is really hard on laptops. This sucks. So you really don't want to have a power strip that you turn on and off instead of plugging and unplugging the power adapter.

He did a power management unit reset with a key combo that I don't remember. He first turn off nntp. He wanted to see the date get lost. When it was lost on reset, then he declared the PMU ok. Strange voodoo.

As for my laptop getting really hot, his suggestion was to reduce the CPU power (speed) in System Preferences -> Energy Saver -> Options -> Processor performace. Set this to "Reduced."

Hopefully that will help some of my crashing issues. But I just had another emacs weirdness. This one jumped suddenly to the "PROBLEMS" buffer. Never seen that one before.

Finally, thanks to Skip Heller who was ahead of me in line at the Apple store for pointed out MacJanitor for cleaning up a Mac disk. And double thanks for the CD.

Posted by Kurt | Permalink

07.27.2005 09:03

Konfabulator bought by Yahoo

Yahoo has bought Konfabulator which is now free. Woo hoo! If you don't know this program, you need to give it a try.

Mars Reconnaissance Orbiter

Looks like there is a new version of TkSU floating around. But it is not at the HenryThorson site

There is an interesting CNN story out there: Meteor study pours cold water on warm Mars theory... yet more from ALH84001.
  WASHINGTON (Reuters) -- A study of meteorites chipped off the
  surface of Mars suggests the planet has been frozen for 4 billion
  years and probably never had the warm wet conditions that could have
  given rise to life, two researchers said Thursday. 

Their study of two meteorites that fell to Earth suggests they were never in warm conditions. The report, published in the journal Science, contradicts theories the now-frozen planet may once have been warm enough for life to have arisen.

"First, we evaluated what the meteorites could have experienced during ejection from Mars, 11 to 15 million years ago, in order to set an upper limit on the temperatures in a worst-case scenario for shock-heating," said Benjamin Weiss, an assistant professor at the Massachusetts Institute of Technology. He did the work while a graduate student at the California Institute of Technology.

They concluded the two meteorites were unlikely to have been above the boiling point of water during their ejection from the Martian surface 11 million years ago.

Then Weiss and fellow student David Shuster measured the amount of argon remaining in the samples.

Argon, a gas, is known to leak out of rocks at a rate that depends on temperature.

The cooler the rock has been, the more argon will have been retained. ...
Tom's Hardware has an article entitled Five Key Gaming Concepts Sounded like there would be some interesting ideas until I saw the list:
  1. Voice Recognition
  2. Physical Involvement
  3. Real Life Elements
  4. Games On Your Phone
  5. Putting Yourself Into the Game
I am not sure what I expected from that title.

xbox giveaway

You Don't Know Jack About Firefox!

Create a 'parent directory' Toolbar button

Futuristic design for new Antarctic base

Posted by Kurt | Permalink

07.25.2005 10:03

Crashed my iMac

Just managed to hang my iMac 700MHz G4 gumdrop. Bummer :(

Posted by Kurt | Permalink

07.24.2005 09:34

Underwater noise from Dec 26 quake

The Sound of a Distant Rumble: Researchers Track Underwater Noise Generated by December 26 Earthquake

AGU Helpdesk has the AGU's LaTeX info.

ctan agu++

http://virtualearth.msn.com/ - Microsofts challenge to google maps. I have to say that right now it sucks. I tried to use the satellite view for Portsmouth, NH and it sent me to Atlanta, GA. Yikes.

Mac OSX certifications from Apple - sample test questions included

Lauguage guide for many many programming languages.

Posted by Kurt | Permalink

07.23.2005 09:13

python type checking

typecheck provides a decorator for python functions that does type checking. Nice.
@typecheck(int, str, str)
def my_func(a, b, c):

my_func('5', 'x', 'y')

Just had a kernel panic on my Mac OSX laptop. I think this is about the 4th or 5th time since I bought the laptop last October. I wish there was a way to know what it was that is causing these. I realize that with what I am doing, Windows would be crashing all the time, but it still sucks.

LaTeX news group thread on the AGU style This guy is using agu04.bst

Posted by Kurt | Permalink

07.22.2005 16:25

Game controllers for PCs

I would really like to hook up the PS/2 shock interface for some of my 3D research. Could be a really awesome flythrough controller. Retrozone controllers uses a USB adaptor. Looks cool!

NASA Scrubbs Mars Telecommunications Orbiter

Posted by Kurt | Permalink

07.22.2005 14:25

Posted by Kurt | Permalink

07.22.2005 07:58

radar images

pyRadar is retrieves and displays radar images from NOAA's NEXRAD
radar stations, which are located around the United States and its
territories. These images are released into the public domain on
behalf of the American public.
The Haughton Mars Project has updates on line.


Windows open source 1st person shooter game ... wish their was a mac version so I could try it.

Posted by Kurt | Permalink

07.21.2005 15:25


NewsMac looks like another nice and free News/RSS reader. I have not tried this one. It is supposed to sync with iPods and Palms.

Posted by Kurt | Permalink

07.21.2005 12:50

LaTeX landscape figures, centering, and C++ Matrix Template Library

One more note on centering. I found this also works too:
\caption{Locations and lengths of the cores.
Jeremy asked about a Matrix package for C++ and then he found this: The Matrix Template Library. No idea about how good or bad it is. GSL is powerful, but a bit frustrating to use, so maybe this is much better, but it is not in fink.

I figured out one way to do landscape figures. It looks like there are many ways to do landscaping, but this is the first one I successfully used.

\begin{landscape} \begin{figure} \includegraphics{05-watercontent-v2} \caption{Core 4 is located in the above the crack between the Gaviota and Goleta Slides (See Figure~\ref{fig:crack}.) \label{fig:core4} \end{figure} \end{landscape}

BTW, I added trivial additions to to my Intro to Scientific Programming on debugging with gdb. Wow, that document needs some serious work! I should really be writing that document in latex or docbook rather than straight HTML. It seems silly to manually do a table of contents.

Posted by Kurt | Permalink

07.21.2005 09:53

LaTeX table centering trouble fixed

I have been having issues with centering a table in my paper. I wanted this table to be a floating figure (aka not in 2 column mode like the rest of the paper). I got that to work with \begin{table*}. Note the * that makes this a "floating" table. But when I centered the table so it looked nicer, the references to the table in the document disappeared and no error or warning was being issued. Grrr. Turns out I was doing the centering wrong. You can not include the caption in the centering. Do NOT do this:


\begin{table*}[htb] \begin{center} \begin{tabular}{|c|c|} aa & b \\ c & d \end{tabular} \caption{Locations and lengths of the cores} \end{center} \label{tab:coreloctab} \end{table*}

970 meters of ODP holes 893A,B (see Table~\ref{tab:coreloctab} for

Instead do this, which works just fine:


\begin{table*}[htb] \begin{center} \begin{tabular}{|c|c|} aa & b \\ c & d \end{tabular} \end{center} \caption{Locations and lengths of the cores} \label{tab:coreloctab} \end{table*}

970 meters of ODP holes 893A,B (see Table~\ref{tab:coreloctab} for


Posted by Kurt | Permalink

07.21.2005 08:54

Scripps expedition to Japan

There is a new Scripps Expdition web page: Volcano Expedition to Japan: The Ins and Outs of how Earth Works

Who else at SIO has a blog of expeditions and research???

Posted by Kurt | Permalink

07.21.2005 08:48

Rain in San Diego in the summer time

Wow. It actually rained yesterday here in San Diego. Woo hoo!

Making an RSS Feed

[Warning: slashdot...] The Hawaiian Autonomous Undersea Robot: the first autonomous robotic vehicle for deep-ocean work and The Hawaiian Autonomous Undersea Robot... and then I saw this acronym which I am sure is misspelled: Center for Underwater Robotic Technology (CURT)

XEmacs Carbon for Mac OSX

Posted by Kurt | Permalink

07.20.2005 17:45

Sand Avalanches

The SPE python IDE looks interesting. Here is the PyPi SPE entry:
Spe is a free python IDE with auto indentation & completion, call
tips, syntax coloring & highlighting, uml viewer, class explorer,
source index, auto todo list, sticky notes, pycrust shell, file
browsers, drag&drop, context help, Blender support, ... Spe ships with
wxGlade (gui designer), PyChecker (source code doctor) and Kiki (regex

From NSF: Underwater Sand Avalanches Linked to Sea-Level Changes in Gulf of Mexico
July 8, 2005

New evidence has been found linking underwater catastrophic sand avalanches to rapid sea-level changes in deep waters of the Gulf of Mexico, according to marine geologists affiliated with the Integrated Ocean Drilling Program (IODP).

By analyzing sediment cores, IODP scientists are reconstructing the history of a sea-floor area formed approximately 20,000 years ago, when sea level fell so low the Texas shoreline shifted almost 100 miles to the south. The data are important to reconstructing climate change history and gathering insights into the development and placement of natural resources.

"These new results will help scientists better understand the processes that occur with shifts in sea level," said Rodey Batiza, program director in NSF's division of ocean sciences, which supports IODP. "What is preserved in ancient ocean sediments can shed light on sea-floor processes going on today."

IODP is an international marine-research drilling program that advances scientific understanding of the Earth by monitoring and sampling sub-sea floor environments. With multiple platforms, IODP scientists explore the deep biosphere, environmental change, and solid-earth cycles.

Expedition scientists are studying areas known as basins, which "are the ultimate repositories for sediments transported by the Brazos and Trinity Rivers [that empty into the Gulf of Mexico]," said Peter Flemings of Pennsylvania State University. "Over the past 120,000 years, the basins accumulated enough sand and mud to cover the entire city of Houston with a layer 20 feet thick."

During the last glacial period when more of Earth's water was locked up in glaciers and sea level was lower, sediments discharged by rivers such as the Brazos and Trinity formed beaches and deltas near the continental shelf's edge. Catastrophic underwater sand avalanches, called turbidity currents, carried the sediments into the deep waters of the Gulf of Mexico, where they accumulated in bowl-shaped basins.

Carlos Pirmez, an expedition geologist affiliated with Shell International in Houston, said, "basins are now buried thousands of meters beneath the Gulf of Mexico sea floor, and likely host billions of barrels of oil and gas. Sediment records we acquire from the basin off Texas shores will boost our understanding of how these deeply buried reservoirs are formed."

Expedition scientists plan to obtain detailed measurements of changes in sediment and fluid properties to enable prediction of turbidity currents, which can carry large amounts of sand and mud in suspension, sometimes for hundreds of miles, at speeds up to 70 miles per hour near the seabed.

Jan Behrmann, a scientist at Germany's University of Freiburg, emphasizes that, "The goal of this expedition was not to explore or drill for oil, which lies much deeper than the sediments we recovered. In the next several months, we will analyze sediment samples and gain an understanding of when and how turbidites form. We will then have a better picture of why and where these important [petroleum] deposits are formed."

The expedition, which concludes July 10, is taking place aboard the JOIDES Resolution, a riserless drillship operated for IODP by the JOI Alliance: the Joint Oceanographic Institutions, Texas A & M University, and the Lamont-Doherty Earth Observatory of Columbia University.

IODP's initial 10-year, $1.5 billion science plan is primarily supported by the U.S. National Science Foundation and Japan's Ministry of Education, Culture, Sports, Science, and Technology. Other support comes from the European Consortium for Ocean Research Drilling and the People's Republic of China Ministry of Science and Technology.

Apple to clear out current Mac minis, older G5s - Mac Mini may be sold at overstock.com for cheap.

From the Grok Lab... How do I easily turn a word doc into a set of ul's? LITA ORT Important Points 7/20/05 Sorry about the formatting!

  • Focus for 05 Mission - Mapping of environment
    • Ability to tie together data products to build story
  • How new data products impact team

  • 2 Nav Cam
    • 3 Not Color Balanced to match SPI
    • 3 Kim "Very important to biology"

  • 2 Periodic Sampling
  • 3 Develop "Situation Awareness"
  • 3 Navigation Cams face way Zoe is facing, recorded in meta data
  • 3 Pan/Tilt Information from SPI, available in meta data
  • 3 Very data intensive\
  • 2 Onboard Weather Data Logger
    • 3 Independent of ZoŽ power (i.e. will collect through night and any other powered down times)
  • 2 Neutron Detector
  • 1 Triangulation is very important to science team success
  • 1 Does science team access and manipulate meta data files
  • 1 What do we want ground truth wise concerning slopes and such (personnel equipment needs
  • 1 EventScope - Plan Uplink
  • 2 Copy Pin (Template Function)
  • 3 Can't copy actions from within same pin
  • 3 Watch for Scientist Created Dummy Pin
  • 3 Access Pins from past days
  • 2 Bandwidth & Time Constraint Status Bar
  • 2 Action Parameters
  • 2 Drive Precise
  • 2 Periodic Sampling
  • 3 Must be first item entered at ending point locale
  • 2 Arrangement of Parameters so that most changed is near top
  • 1 EventScope - Triangulation
  • 2 Beta Status, EventScope member will operate with scientist assistance
  • 2 Distance of landmark from rover
  • 2 Cross-checks (Which ones, and how to add?)
  • 2 Impact of Orientation (Roll/Pitch)
  • 1 EventScope - Science Website

    • 2 Support Doc
      • 3 When/How Accessed
      • 3 Scanorama - resizes to window size...unknown resolution
      • 3 Wks-FI Overlay
      • 3 FI-Stacking

  • 1 Scaled to similar parameters for a set (Scaled at field)
  • 3 Transect
  • 1 Video - Nav Cam (>2m)
  • 1 Waypoint - Where SPI/FI collected (>30m)
  • 1 EventScope - Science on the Fly
  • 2 Middle SPI
  • 2 Right Nav
  • 3 Odometer to determine position
  • 2 Returned Data
  • 3 Available Bandwidth Determined by Science Team
  • 3 Class Priorities
  • 3 % Bandwidth Available to Class
  • 3 Minimum Meters between Samples
  • 3 Largest Number of Samples
  • 2 Statistics Page

    sql in 60 seconds

    Debian Linux ARM system for under $200.

  • Posted by Kurt | Permalink

    07.20.2005 12:54

    Fortran 77 question

    Jeff and Julie posed a fortran 77 question that I did not know how to answer this morning. How do you write text to stdout with number that don't have spaces between them? The goal is to creat GMT commands like -R-129/-127/33.5/-35.5. My one suggestion was to do a tr ' ' '' on the results of the fortran program and if you want to have a space stay, write out a tab character.

    Any better suggestions? I hate it when I can't just do the equivalent of man printf to find out how a function works. I wish there was a way to get man pages for C++ namespaces and classes. Python has pydoc, but for c++ I just don't know. man -k iostream just gives nothing :(

    Posted by Kurt | Permalink

    07.20.2005 12:40

    Eventscope, Firefox 1.0.6, qt zoomable area

    I really need to learn how to use the zoomable area stuff listed on The qt4 resource center as A Zommable Picture Viewer. Then I want to be able to draw vector graphics over this image. Back to the days of the PDDT (Panorama Display and Designation Tool) that I did in 1996 using SGI's ImageVision library.

    LITA ORT Documentation from GrokLab and Peter Coppin's EventScope crew.

    Linux on the WRT54G

    80 security tips - Mostly windows PC stuff.

    Marcel recommends the free for home use avg anti-virus program for MS-Windows. My recommendation for Mac OSX is do not run an anti-virus program. All anti-virus programs on Mac OSX is mess things up (especially installation programs from Apple).

    Posted by Kurt | Permalink

    07.20.2005 11:55

    netcdf and hdf py

    pycdf and pyhdf look like handy tools to have around!

    New Periodic Table of the Elements - the periodic galaxy. Strange.

    Remote SSH access and SSH tunneling with the WRT54G

    Posted by Kurt | Permalink

    07.20.2005 09:27

    mac util programs and more

    Mac OSX util programs:
    drutil(1)                - interact with CD/DVD burners
    escputil(1)              - maintain Epson Stylus inkjet printers
    hdiutil(1)               - manipulate disk images
    mdutil(1)                - manage the metadata stores used by Spotlight
    niutil(1)                - NetInfo utility
    plutil(1)                - property list utility
    smbutil(1)               - interface to the SMB requester
    textutil(1)              - text utility
    textutil(n)              - Procedures to manipulate texts and strings
    tiffutil(1), - tiffutil(1) - manipulates tiff files
    JWZ asks about X11-Aqua pasteboard/clip bourd issues - This has been bugging me for quite a while. Some discussion of autocutsel. Does it work?

    Also, his discussion of backup solutions

    Google Moon

    Posted by Kurt | Permalink

    07.19.2005 14:29


    SPE Stani's Python Editor

    Five Habits for Successful Regular Expressions

    New ibooks any day now?

    Wouldn't it be great if IBM OpenSourced OS/2? I have never actually used an OS/2 machine, but I hear that were pretty cool 10 years ago. I know that it may not be possible with other companies' codes embedded deep in there.

    Posted by Kurt | Permalink

    07.19.2005 08:24

    Posted by Kurt | Permalink

    07.17.2005 11:27


    Check out picotux which is the size of an ethernet connector! Now if this thing had 2 A/D and 2 D/A ports, this could be the entire computer for a chirp seismic system! Then the only thing taking up space in the pressure bottle would be the power amps and maybe a preamp/filter for the receivers. 55 MHz might be a little under powered, but if the system is only doing chirp that would be enough. Imagine running a web server on the system too with status and system configuration. That would be awesome. That would mean the end of MS-DOS and an actually spinning hard disk in the chirp. More A/D ports on the thing the better. Then we could do more help (especially temp) monitoring of the gear and extra sensor.

    Russia says it wants to go for Mars

    How To: Make your own Home Theatre Mac (HTMac) (if you have the right set top box)

    http://sqlzoo.net/ - A "gentle" introduction to SQL.

    http://ext2fsd.sourceforge.net/ - ext2/3 on Windows XP?!?!

    $99 Linux device with WiFi.

    Who lives on your street? using google maps

    Posted by Kurt | Permalink

    07.16.2005 20:24

    damn small linux

    I had meant to use an old knoppix cd, but it disappeared somewhere in all the boxes. I figured I would try Damn Small Linux since 50MB would take 30 minutes (much more reasonable than downloading knoppix again).

    I have to say that it works perfectly on the old P3 500MHz machine. Very nice. The one bummer is that it does seem to have NFS serving built in. I dropped in an 100Mb ethernet NIC and I am copying files.

    Scientific Linux also looks cool. It as OpenAFS!


    BashPodder and BPConf

    But python is cooler than bash: pyPodder

    Then get podcasts from techpodcasts

    Mac OSX keyboard shortcuts

    Posted by Kurt | Permalink

    07.16.2005 10:59



    I got this email today from southwest air. Is there really such a law?
      Southwest Airlines Needs Your Help Now!
      Wright Is Wrong! Set Love Free!

    I am sending you this ALERT today to ask for your help. By now, you have probably heard about our fight to repeal the Wright Amendment, the 1979 law that makes it illegal to fly or advertise flights from Dallas Love Field to points beyond the four states surrounding Texas, plus Alabama, Mississippi, and Kansas. We need your help to make this happen!

    The Wright Amendment has a strong history of stifling competition and creating high fares. Simply put, the Wright Amendment is Wrong! It's time to Set Love Free and repeal this archaic, antiquated law now! Southwest wants to bring you low fares and Legendary Customer Service from Love Field to many of the 60 cities that we currently serve across the nation.

    Please join our efforts to Set Love Free by visiting our web site: setlovefree.com to take action now.
    Air Traffic Control Algorithms Take Off - Might be good (and easier) for ships!
      The first step though is to develop the mathematical algorithms that
      would be at the heart of an advanced collision avoidance system. To
      do that, Bayen and his colleagues use formulas to describe the set
      of all possible positions of the two aircraft relative to each
      other. By solving the problem for the worst-case scenario, they
      prepare for the worst and hoping for better. 

    "We solve it under the assumption that one aircraft will do everything possible to avoid being hit and that the intruder aircraft is trying its hardest to collide," Bayen says. "In real life, hopefully the intruder won't act so badly."

    To deal with the complexities of the problem, Bayen employs the mathematics of level sets, a method developed in 1988 at UC Berkeley and UCLA to track and simulate shifting boundaries of dynamic objects and materials. Rather than compute each of the aircraft's possible trajectories, the planes are represented by level sets incorporating an infinite number of trajectories.

    This .avi video clip depicts air traffic over a period of ten hours in several sectors covered by the Oakland Air Route Traffic Control Center. Aircraft flying above 33,000 feet are displayed. Aircraft that appear to collide are actually traveling at different altitudes. The visualization was created using Enhanced Traffic Management System data provided by NASA Ames. [Video]

    "If you can compute these sets, it gives you a mathematical border," Bayen says. "Outside the border, you're safe. Inside, you're not safe. As soon as an aircraft hits the border of the unsafe set, the pilot will receive an alert that might say, 'Warning! Here is the way to avoid a collision.' We can prove mathematically that if the pilot responds right away, he or she can escape the danger."

    In Bayen's laboratory, the researchers are applying the algorithms to air traffic computer simulations developed jointly with NASA Ames. Meanwhile, his former adviser at Stanford University , aeronautics professor and Berkeley alumna Claire Tomlin, is experimenting with hardware implementations based on the algorithms and testing the systems on manned and unmanned aerial vehicles.

    Posted by Kurt | Permalink

    07.15.2005 18:02


    Andrew Goodwillie is here at SIO this week.


    Download the java jar and double click. Looks like this is going to be very cool!

    Posted by Kurt | Permalink

    07.14.2005 15:58

    Tips on programming (not from me)

    How to be a Programmer: A Short, Comprehensive, and Personal Summary by Robert L Read has some nice little tips in my 2 minute quick skim.
    How to Handle Boring Tasks

    Sometimes it is not possible to avoid boring tasks that are critical to the success of the company or the project. These tasks can really hurt the morale of those that have to do them. The best technique for dealing with this is to invoke or promote Larry Wall's programmer's virtue of Laziness. Try to find some way to get the computer to do the task for you or to help your teammates do this. Working for a week on a program to do a task that will take a week to do by hand has the great advantage of being more educational and sometimes more repeatable.

    If all else fails, apologize to those who have to do the boring task, but under no circumstances allow them to do it alone. At a minimum assign a team of two to do the work and promote healthy teamwork to get the task done.

    Posted by Kurt | Permalink

    07.14.2005 12:00

    Coping with Mail.app botching base64 mime encoding

    I got an email today that Mail.app refused to decode into the pdf that was the email:
    Content-Transfer-Encoding: base64
    Content-Type: application/pdf;
    Content-Disposition: inline;

    I found the base64 program in fink. Worked like a charm. Copy all of the test in the base64 block. Here that was from JVBER down to the next blank line. Then run base64 on this file:
      base64 -d some.pdf.mime  > some.pdf
      file some.pdf
      open some.pdf
    That's it!

    Posted by Kurt | Permalink

    07.14.2005 10:04

    Mapping in fledermaus

    Basic mapping in Fledermaus off of topography is just about as easy as it was in Viz 1.0 for MPL. Still missing are ways to mess with each waypoint on a polyline.

    I loaded in terrain C from the Santa Barbara CD and zoomed over to the western slide. Then I did Data->Add 3D Line. Then I selected the Polygon Select (P) function. Use the left mouse button to click around the outside edge of a unit. Double click on the last point to close the polygon. In the Internal 3D lines object, click the Add Polygon Selection. Now to get it to an ascii xyz file, click Export YZ. That is it!

    I saved two files: westernslide-excavated.xyz westernslide-toe.xyz To plot these up, just use the 3D plotting feature of gnuplot:
      splot 'westernslide-excavated.xyz' with l, 'westernslide-toe.xyz' with l
    This is what you will see!!!

    Posted by Kurt | Permalink

    07.13.2005 19:44

    Fastdike - stochastic seafloor spreading simulation

    From the wayback machine...

    There was discussion today about simulating sea floor spreading. I wish had more to offer them or time that I could create a better simulation system. My recommendation was to keep using Fortran 77, add some optimization flags, and just abuse a few G5 Macs. The optimization flags that I recommended (but do know know if g77 accepts them) are:
      F77FLAGS := -O3
      F77FLAGS += -funroll-loops 
      F77FLAGS += -fexpensive-optimizations
      F77FLAGS += -DNDEBUG
      F77FLAGS += -ffast-math
      F77FLAGS += -mpowerpc
    There probably are more and maybe even some G5 specific arch type flags, but that is what I had in my density pkg Makefile.

    It would be nice to really turn my old C++ code into a real application. It would be great to put in the magnetics forward modeling code to actually generate the synthetic magnetic curve. Also I was thinking about a set of gengetopt command line options that allow selection of model sizes and flow types. Being able to specify the distributions for material and flow types would really make this a great tool. It would also be nice to work in the longitude and latitude and depth profiles so that it can be easily matched to actual ship or vehicle tracks.

    And what about a 3D model? That would be a lot more trouble, but fun to work on.

    From fastdike, here it the README: I added a new paragraph what was on the web and added that as a README... hence the jump from 1.11 to 1.12. The code is all the same. I am sure it would run a lot faster on today's computers :) Looking back on this code, I have to warn you that the C++ programming style is not great. I used macros for TRUE and FALSE, .h on C and C++ headers that should not have them. This is before I learned doxygen and gengetopts.

    -Kurt 7/2005
    This was inspired by a seminar with J. Gee and S. Cande. We read a paper simulating mid ocean ridge spreading. This is an attempt to recreate the process, but use a different data structure. The data structure is a doubly linked list. Inside the each column in an array that grows over time as lava flows over the top. The first element in the array is deepest and new lava is appended on the end of the array. If the array becomes longer than the current space allocated, the program reallocs the array with more space. It also is able to prune things as they move far away from the spreading center. Jeff estimated a run might take 1/2 hour. I don't know if that was with or without the magnetics being calculated. This program takes about 20 seconds (PII 333 w/196MB to produce a 6483 x 1435 simulation), but does not do the magnetics. Most of that time is spent writing the data to disk.

    Idea from "Central anomaly magnetization high: constraints on the volcanic constructin and architecture of seismic layer 2A at a fast-spreading mid-ocean ridge, the EPR at 9deg30'-50'N," 1999, H. Shouten, M. Tivey, D. Fornari, J. Cochran, EPSL 169, p37-50.

    Kurt Schwehr -- Feb 2002

    From the National Institude of Standards and Technology: Dictionary of Algorithms and Data Structures

    As an example, I looked up Octrees. It sent me to Octree Algorithms here http://www.cg.tuwien.ac.at/research/vr/lodestar/tech/octree/

    It is missing things like path planning with A*, but it looks like a nice online resource for simple browsing.

    Posted by Kurt | Permalink

    07.13.2005 16:41

    More LaTeX help

    Becca pointed out this one...

    Hypertext Help with LaTeX from Switzerland

    Hurricane Dennis Flips Sunken Ship Upright
      KEY LARGO, Fla. (AP) -- What humans were unable to do, Hurricane
      Dennis handled nicely. The former USS Spiegel Grove, serving as
      artificial reef on the bottom in 130 feet of water off Key Largo,
      flipped upright as the core of the storm passed some 200 miles to
      the west. 

    It's a position project organizers wanted since the retired 510-foot ship prematurely sank and rolled over May 17, 2002, leaving its upside-down bow protruding from the water.

    A salvage team managed to fully sink the vessel three weeks later - on its right side instead of its keel.

    The Spiegel Grove is the most popular artificial wreck in the Florida Keys, home at least 166 different fish species, said Lad Akins of the Reef Environmental Education Foundation.

    But its realignment will make it a better platform for sports divers.

    Posted by Kurt | Permalink

    07.13.2005 10:39

    segy-py does it again

    I just made use of segy-py to help with a figure. I wanted the shot position x,y (lon/lat) pairs for the shots in my seismic figure of the Santa Barbara Crack. SBC - am I in trouble yet? I just used the database!
      sqlite segy.db 'select x/3600.0,y/3600.0 from segyTrace \
        where Shotpoint>=82000 and Shotpoint<=84000' \
        | tr '|' ' '\
        > ~/Desktop/core4-fig.xy
    Which gives:
     head -1 ~/Desktop/core4-fig.xy 
        -120.058333333333 34.3691666666667

    tail -1 ~/Desktop/core4-fig.xy -119.553333333333 34.3786111111111
    Now there is a problem. The shot number got reset a few times throughout the cruise. The solution is to plot the cores at the same time just to make sure. loc.dat:
      -120.05883333 34.36566666 
      -120.05716666 34.37899999 
    Then gnuplot> plot 'core4-fig.xy' with lp, 'loc'

    Now we need a better query that uses some geographic bounding to avoid the other shot numbers!
      sqlite segy.db 'select x/3600.0,y/3600.0 from segyTrace where \
        Shotpoint>=82000 and Shotpoint<=84000 and y>34.36*3600 and \
        x<-119.8*3600' \
        | tr '|' ' ' \
        > ~/Desktop/core4-fig.xy 
    Notice that you can see the issues with the GPS logging that are in the xstar format files.

    On a totally different topic: sdcf is a python library for writing DXF CAD files. However, I can't tell if this library can read in DXF.

    Posted by Kurt | Permalink

    07.13.2005 09:32

    Good luck to the space shuttle crew today

    I hope NASA has a successful space shuttle launch today!

    There is a RSS feed from NASA: http://www.nasa.gov/rss/rtf_news.rss

    Posted by Kurt | Permalink

    07.12.2005 21:57

    CMU Sandstorm goes 200 Miles

    So it was on a track. It is still a great feat!

    Carnegie Mellon's Sandstorm Robot Makes Unprecedented 200-Mile Autonomous Run

    42 gmail tips

    Setting up a reverse SSH tunnel by Vincent Danen. [techrepublic.com]
      This is useful if you have a service on the remote end that you want
      to have connected to something on the local machine, but you don't
      wish to open up your firewall or have SSH private keys stored on the
      remote machine. By using a reverse tunnel, you maintain all of the
      control on the local machine. An example usage for this would be for
      logging messages; by setting up a reverse SSH tunnel, you can have a
      logger on the remote system send logs to the local system (i.e.,

    To set up the reverse tunnel, use:

    $ ssh -nNT -R 1100:local.mydomain.com:1100 remote.mydomain.com What this does is initiate a connection to remote.mydomain.com and forwards TCP port 1100 on remote.mydomain.com to TCP port 1100 on local.mydomain.com. The "-n" option tells ssh to associate standard input with /dev/null, "-N" tells ssh to just set up the tunnel and not to prepare a command stream, and "-T" tells ssh not to allocate a pseudo-tty on the remote system. These options are useful because all that is desired is the tunnel and no actual commands will be sent through the tunnel, unlike a normal SSH login session. The "-R" option tells ssh to set up the tunnel as a reverse tunnel ...

    Posted by Kurt | Permalink

    07.12.2005 17:38


    Saw this post today. I was thinking about the same kind of thing and was getting tempted to do some preprocessor magic.
    From: brotherelf -- at -- gmx.net (Ulrich M. Schwarz)

    "Jim Jim" writes:

    > Where \isdraft is a command I've made up for the example (that I'd like to > have).

    Quick and dirty version: %% isdraft.sty starts here \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{isdraft}[2005/07/12 v0.2 isdraft.sty (ums)] \DeclareOption{draft}{\drafttrue}% \@ifundefined{ifdraft}{% % it's all great, we don't know ifdraft \newif\ifdraft \draftfalse \ProcessOptions\relax }{% %oh my, isdraft is already defined as a command or boolean! \PackageWarningNoLine{isdraft}{% There already is a command ifdraft.\MessageBreak I'm not touching it} } %% isdraft.sty ends here

    \documentclass[final]{report} \usepackage{isdraft}

    \ifdraft \typeout{draft} \else \typeout{final} \fi

    \begin{document} Hello \end{document}

    As usual, the global option can be overridden by a package-option [final] or [draft].

    HTH Ulrich

    Posted by Kurt | Permalink

    07.12.2005 13:56

    The Not So Short Introduction to LaTeX2e

    I have been working on improving my LaTeX skills as I write the chapters of my thesis. I am just beginning to get a better feel for things. I subscribed to the gmail digest of comp.tex (or whatever the exact name). The volume of traffic is very impressive, but a bit overwhelming. I have been sort of skimming some just to get a feel for things. Today I started working through an 147 page tutorial called:

    The Not So Short Introduction to LaTeX2e

    This free pdf book is actually pretty good. In under an hour, I have a much better feel for things. I would bet that this document would be hard on someone just starting out. My current paper is my 3rd journal article that I have done in LaTeX. I did not really understand what I was doing in the previous two, but it worked. I would like to start having more control over what I am doing!

    Today I figured out how to add a table of contents to my article. I know, I know! This was not very hard. Here is what I did:
    LaTeX then picked up my \section and \subsection definitions and made a nice table of contents. Very cool.

    Now back to working on the paper.

    Posted by Kurt | Permalink

    07.12.2005 08:17

    Tuesday morning

    Boxes, boxes, boxes. A sea of boxes. I need to brave Costco this morning.

    Pumping Out the Juice: Power Supplies Explained - For when I need to understand PSU's.

    In fink: "userutils" - Add/Remove users and groups via the command line from osxgnu.org

    rename from linux is in the util-linux package. That should really be in fink, right?

    NASA Satellites Measure And Monitor Sea Level

    40,000-year-old footprint of first Americans - Whoever is doing this research needs a better scale. What in the world is that red and white thing? Is that footprint big or little?

    Lacie Mac Mini drives. These look very cool! Now they need a G5 Mac Mini!!!

    Posted by Kurt | Permalink

    07.11.2005 16:20

    text-to-speech into a file

    I have used SGI say and now the much better (but not great) Mac OSX say for quite a while. I just saw a discussion over at JWZ that you can use say to write out an aiff sound file. Nice. I suppose that if I had actually read the say man page, I would have already known :) OPTIONS string Specify the text to speak on the command line. This can consist of multiple arguments, which are considered to be separated by spaces.

    -f file Specify a file to be spoken. If file is - or neither this parameter nor a message is specified, read from standard input.

    -v voice Specify the voice to be used. Default is the voice selected in Sys- tem Preferences.

    -o out.aiff Specify an AIFF file to be written.

    If the input is a TTY, text is spoken line by line, and the output file, if specified, will only contain audio for the last line of the input. Otherwise, text is spoken all at once. Maybe festival has better voices?

    When key loggers are a good thing - Like loggin aim chats for later reference, only I get to see every typo and correction. Oh joy.

    Otherpower.com - make your own wind turbine. Turbines were awesome in antarctica (until the wind got too strong).

    Super Santa Barbara Basin summary paper:
    Physiography of an active transpressive margin basin: high-resolution
    bathymetry of the Santa Barbara basin, Southern California continental

    Eichhubl, Greenea, Maher

    High-resolution swath bathymetry and backscatter data from the Santa Barbara basin reveal a distinct assemblage of morphologic and sedimentologic features characteristic of the tectonically active setting of the basin. Such characteristics include the north-south asymmetry of the basin, the presence of an intra-basinal structural and morphologic high, extensive mass wasting, and fields of mounds and pockmarks. The north-south asymmetry of the basin and the increased abundance of slope failure along the northern basin slope likely reflect higher rates of tectonic shortening and sediment accumulation along the northern basin margin. High sedimentation rates lead to high pore water content of the sediment which, in combination with seismic shaking, may explain the abundance of mass wasting features even on shallowly inclined lower basin slopes. Mounds and pockmarks are the surface expression of locally extensive fluid seepage which we interpret to be driven by a combination of high sedimentation rates, a high organic content of sediment, and anoxic bottom water conditions during extended periods in Neogene and Quaternary times. During ROV dives we observed active fluid seepage to have occurred preferentially on the shelf and on a structural and topographic high, presumably due to structural focusing of migrating formation fluids. The preferred alignment of some pockmarks along faults is consistent with structurally controlled expulsion of formation fluids from underlying Neogene units. Despite the high tectonic activity of the basin, fault scarps are rare and only observed in areas of low sediment accumulation on the shelf and on topographic highs. Mass balance considerations suggest that sedimentation rates averaged over interseismic time scales are too high and scarp growth rates too low for scarps to be characteristic features of the basin floor. Long-term sediment accumulation rates that account for the effect of sediment compaction are low enough, however, to lead to long-wavelength surface expressions of the most active faults.

    Posted by Kurt | Permalink

    07.11.2005 15:31

    EndNote 7.0 to Bibtex

    Here is how I export my endnote references to bibtex:
    Select all of the references   Apple-A

    Edit->Output styles-> Style manager Add BibTeX Export to your list Edit->Output styles->BibTeX File->Export Save to something like mypaper-bib.txt Then open a shell and

    mactounix ~/Desktop/mypaper-bib.txt > mypaper.bib

    Where mactounix looks like this:

    cat ~/bin/mactounix #!/bin/bash

    /sw/bin/tr '\r' '\n' < $1

    Posted by Kurt | Permalink

    07.11.2005 14:29

    lame ucsd email system

    Arg. I just had my incoming email wiped by the high quality UCSD email system. Pop stopped working, so I logged in and got an over quota message. When I ran pine, there was nothing. Now:
    > acsquota -v
    Disk quotas for kdschweh (uid 805):
    Filesystem     usage  quota  limit    timeleft  files  quota  limit    timeleft
    /var            5169   5000  20000    7.0 days      3    300    500            
    /var/mail       3800  18000  30000                  1      5     10            
    /var/mail/kdschweh (mail inbox)
                       0   3072  15360                  1      1      1
                    3800  18000  30000                  1      5     10            
                   22096 100000 100000                125   7000   7000   
    Shoot me now. Oh wait. Five minutes later, there is mail inbox. Where did it go for that time? 15MB is such a pitiful quota!

    wordpress theme browser

    Paida is yet another graphic package for python.

    Tour a missle silo

    SSH tunneling with the WRT54G

    Posted by Kurt | Permalink

    07.11.2005 06:53

    Monday morning

    Building a Home Power Monitoring System - Now I need a home to monitor!

    Aimtrack - track who looks at your aim instant messanger profile.

    Posted by Kurt | Permalink

    07.09.2005 19:54

    No garage sale sunday!!

    Thanks to all who came out today! We met lots of very nice people. It went great, but I am very sunburnt.

    NOTE: No garage sale sunday!

    Posted by Kurt | Permalink

    07.08.2005 19:55

    Garage Sale Saturday and Sunday!

    Come by tomorrow or the day after for a garage sale on mission blvd. We will have way more out for this one than was on the web page for the sale. Tons of stuff!!!
    Garage Sale Address & Information:
    3599 Mission Blvd.
    Mission Bay, Ca 92109

    Cross Street = San Juan Place

    Saturday 7/9/05 = 10:00am - 3:00pm Sunday 7/10/05 = 9:00am - 3:00pm

    Posted by Kurt | Permalink

    07.08.2005 19:51

    Backpack hotspot for the true geek

    Gansta Name - very cheesy

    Be Your Own Hotspot "Turn a backpack into a portable, solar-powered Wi-Fi hotspot, and share a high-speed connection anywhere"

    Posted by Kurt | Permalink

    07.08.2005 14:31

    link soup

    texnik.de - LaTeX tips and tricks

    regexlib.com -
      Regular Expression Library. Currently we have indexed 1000
      expressions from contributors around the world. We hope you'll find
      this site useful and come back whenever you're looking for an
      expression for a particular task, or have just figured out a new
      expression that does something useful.
    morse code in a minute - NOT. But interesting

    Hydrogen power does not seem very good: First Hydrogen-Fired Electrical Generator Planned for Scotland
      convert natural gas to hydrogen and carbon dioxide. The hydrogen
      would fuel the turbines for electricity production, and the carbon
      dioxide would be pumped into the nearly-depleted offshore oil fields
    New C book - Free pdf

    ll-ansistyle Enables colored text output via ANSI escape sequences

    Posted by Kurt | Permalink

    07.08.2005 14:09

    LaTeX links and tricks

    I went digging for more info on LaTeX/Bibtex issues and came up with some links but did not really learn much.

    tug.org - TeX Users Group

    Spell checkers for TeX. Excalibur looks interesting. I already use ispell/aspell from within emacs.

    Word count for TeX documents: (note that detex is a separate fink package)
      detex  | wc -w
    Making hyperlinked TeX documents - making html or texinfo.

    buildbib - ebib is supposed to run 'inside' emacs

    Making Custom bib styles

    Forcing capitalization in bibtex

        howpublished = "\url{http://...}"
    What exactly is natbib?

    Listing all bib entries: \nocite{*}

    Floating figures in multicolumn documents:
    include: using include verses input and emitting new pages.

    www.latex-project.org: LaTeX - A document preparation system

    Posted by Kurt | Permalink

    07.07.2005 14:04

    PowerPC 970MP

    Awesome! Dual core G5's. I definitely want a 4-way G5 workstation. I could definitely put that thing to use! Also it is exciting to see the possibilities for G5 laptops finally happening. Maybe the whole Macintel thing will just go away.

    IBM Announces the (long rumored) PowerPC 970MP
    Dual core
    Each core has 1MB L2 cache
    One core can be swiched off for low power mode

    Also low power 970FX processors were described:

    1.2GHz at 13W 1.4GHz at 13W 1.6GHz at 16W

    Posted by Kurt | Permalink

    07.07.2005 06:44

    More shell scripting

    Introduction to Shell Scripting, part 6

    Faces is a python project management system.

    A new Mars/Antarctic vehicle.

    .htaccess tutorial.

    Linux podcasts

    GCC Summit 2005 Diary

    Posted by Kurt | Permalink

    07.06.2005 20:05

    AquaMinds NoteTaker

    I am considering buying AquaMinds NoteTaker. Jeff Dingler has been using it for a while. I tried OmniOutliner and it does not look quite a nice as NoteTaker. I could not get OmniOutliner v 2.x to insert images. I was amused to see the Stanford campus in one of the NoteTaker demos.

    Posted by Kurt | Permalink

    07.06.2005 13:58

    Resurrecting endnote databases

    When you have an EndNote file that has only been cp'ed rather than Mac OSX dragged, it looses its resource fork info. EndNote will refuse to open this file. I get something like this:
    open references.end

    2005-07-06 13:55:22.831 open[1271] LSOpenFromURLSpec() returned -10814 for application (null) path references.end. 2005-07-06 13:55:22.831 open[1271] Couldn't open file: references.end
    There is an easy solution:
      /Developer/Tools/SetFile -c ENDN -t ENDB references.end

    Posted by Kurt | Permalink

    07.06.2005 07:45

    References for MB-System and Seismic Unix

    I got responses back for the best ways to reference Seismic Unix and MB-System. Here is what their authors have to say.
    From John Stockwell:

    Approved Reference Format: In publications, please refer to SU as per the following example: Cohen, J. K. and Stockwell, Jr. J. W., (200_), CWP/SU: Seismic Un*x Release No. __: a free package for seismic research and processing, Center for Wave Phenomena, Colorado School of Mines.
    Recent articles about SU in peer-reviewed journals:
    • Saeki, T., (1999), A guide to Seismic Un*x (SU)(2)---examples of data processing (part 1), data input and preparation of headers, Butsuri-Tansa (Geophysical Exploration), vol. 52, no. 5, 465-477.

    • Stockwell, Jr. J. W. (1999), The CWP/SU: Seismic Un*x Package, Computers and Geosciences, May 1999.

    • Stockwell, Jr. J. W. (1997), Free Software in Education: A case study of CWP/SU: Seismic Un*x, The Leading Edge, July 1997.

    • Templeton, M. E., Gough, C.A., (1998), Web Seismic Un*x: Making seismic reflection processing more accessible, Computers and Geosciences, in press.
    From Dave Caress:

    We're trying to write a short G3 technical paper to provide a recent reference, but haven't got it done. In the meantime, I use a combination of a 1996 paper and a reference to the MB-System web site:
    • Caress, D. W., and D. N. Chayes, Improved processing of Hydrosweep DS multibeam data on the R/V Maurice Ewing, Mar. Geophys. Res., 18, 631-650, 1996.

    • Caress, D. W., D. N. Chayes, and V. Schmidt, "MB-System",

    07.06.2005 06:32

    python outliner?

      Leo is: 1) a programmers, outlining editor and a flexible browser, 2)
      a literate programming tool, 3) a data organizer and project
      manager. 4) fully scriptable using Python, 5) Portable. Leo.py will
      run on any platform with Python and Tk/tcl.
    Pseusdo static typing for python: http://merlin.fit.vutbr.cz/wiki/index.php?title=Inventor_Projects_2005

    Most of authors have placed them in the public domain, however they will be happy if you keep their names with the sources. You can also send an email to the author if you really liked his project or want to discuss something.

    Note: The sources are without support, just as the people put them there. Some of them are excelent, some of them just do something.

    BeOS: Has-Been Or Will-Be? open-BeOS (Haiku)

    Button Maker

    pystats is only at 0.1, but could be useful .

    Posted by Kurt | Permalink

    07.05.2005 21:34


    JWZ on Mail.app flags - one of those things that someday I could really use, so I will paste it here.
      Mail.app in 10.4 stores each message in its own file. The first line
      has an ASCII integer on it, the length in bytes of the message; then
      comes the message; then an XML "plist" blob with a few key/value
      pairs like "sender" and "subject". One of those properties is
      "flags", holding an integer, presumably bits indicating "unread",
      "replied", etc. But there are a lot of bits set in there -- some
      otherwise-uncomplicated messages seem to make use of up to 30
      bits. What are they? 

    Update: An anonymous benefactor has the goods:

    0 read 1 << 0 1 deleted 1 << 1 2 answered 1 << 2 3 encrypted 1 << 3 4 flagged 1 << 4 5 recent 1 << 5 6 draft 1 << 6 7 initial (no longer used) 1 << 7 8 forwarded 1 << 8 9 redirected 1 << 9 10-15 attachment count 3F << 10 (6 bits) 16-22 priority level 7F << 16 (7 bits) 23 signed 1 << 23 24 is junk 1 << 24 25 is not junk 1 << 25 26-28 font size delta 7 << 26 (3 bits) 29 junk mail level recorded 1 << 29 30 highlight text in toc 1 << 30 31 (unused)
    Not being able to truly use the capabilities in my cell phone is really annoying. Especially when I see that the tech support area in the Verizon store is just a PC with a big black box serial port selector box to cope with all the different connectors. From slashdot: Hacking the Motorola v265
      Unfortunately, Verizon Wireless cripples their phones so that you
      have to use their fee-based service in order to add new ringtones,
      or to transfer the pictures you take with the camera. The Verizon
      logo conceals the date display on the main screen and covers over
      the top portion of the background, among various other corporate
      silliness. Selling a device that is intentionally crippled is just
      plain ridiculous. Of course, the only natural thing to do in a
      situation like this is to hack it. 

    From Geb/GROK Lab came this link. Now that I think about it, competition with China might be almost an exact duplicate to the cold war and end up with us putting people on the Moon or Mars. The space program works in strange ways. The Future of NASA from the Daily Kos

    Now this is cool: Google Maps with Transparencies!

    History of the NeXT - If only I could have figured out how to make the NeXT get past /afs/ to ir.stanford.edu without waiting 30 minutes to stat all the cells across the US... then I might have really started to like using the NeXT boxes that were around. Hey JJ, you have got to write up some of your experiences! A lot of us would love to hear some of your war stories!

    Posted by Kurt | Permalink

    07.05.2005 05:42

    4th of July

    We got an excellent dual show last night. First the red tide was going strong with nuclear green waves coming in to the beach. The we got two good firework shows looking out at La Jolla.

    Windows XP services

    Graphics In Science. Nature online: Artists and scientists conspire at conference
    Cartoons and morphing software may help to convey scientists' finds.

    "We must do this more often" was the constant refrain at a gathering of scientists, artists, film makers, designers, writers, editors and art historians at a meeting in Los Angeles. They were there to explore the use of images in science, for both understanding data and communicating it to others.

    Image and Meaning 2, held from 23 to 25 June at the Getty art museum, was the successor to the first conference of this sort, staged in 2001 at the Massachusetts Institute of Technology (MIT) in Boston.

    The conference series is the brainchild of Felice Frankel, a science photographer working at MIT. Frankel helps scientists present their work using imagery that is both informative and striking. Her photographs have graced many covers of Nature and Science.

    Frankel convened the meeting because, she says, "we have a serious problem. There is an assumption that in science our graphics communicate. But they often don't." Frankel argues that many scientists don't see imagery as an integral part of the scientific process. This, she says, is doing the community a disservice. ...

    NASA's Deep Impact did it's thing yesterday.

    BBC news: Japan monitors 'volcanic' steam

    An underwater volcano is thought to be behind a huge column of steam above the Pacific Ocean, Japanese officials say.

    The coast guard sent helicopters to monitor the 1,000m (3,280ft) cloud, 1,120km (700 miles) south-east of Tokyo, and warned ships to stay away.

    The team said the area around the site appeared to be red.

    "It's highly likely that it's caused by an eruption of an underwater volcano," coast guard spokesman Shigeyuki Sato said, adding it had happened before.

    Japanese troops stationed on the island of Iwo Jima first noticed the cloud of steam on Saturday.

    Television footage showed white smoke billowing into the sky from the brick-red water.
    A better picture is on MSNBC

    A artical on Dan Mass who has made some really nice 3D movies of NASA projects.

    Win XP Tweaking Companion - 170 page pdf

    Posted by Kurt | Permalink

    07.03.2005 12:06

    RSS, trackpads, etc

    Just had my track pad freak out. Zooming across the screen when I let go. Restarted and all is better now. Phew!

    RSS inventor slams Apple's podcast approach
      Cupertino (CA) - With the release of iTunes 4.9, Apple included the
      first edition of a long-anticipated XML document type definition
      (DTD) for RSS 2.0, that will enable access to podcasts. Apple aims
      to build podcast support directly into both the software and iPod,
      but leaders in the RSS community, including the standard's own
      creator, are taking Apple to task for developing an ill-advised DTD
      without seeking input and guidance from the community. 

    So-called "media RSS" implementations would enable podcasts to be categorized by any syndication service, the way existing RSS tags today enable text pages--including Tom's Hardware Guide pages--to be listed on many syndication services today, including Moreover. Last February, Yahoo released an updated media RSS specification that, while receiving minor critiques, has been generally embraced for its openness and adaptability.

    But last Tuesday, responding to Apple's iTunes 4.9 release on one of his many blogs, Dave Winer, the creator of the original RSS standard and its most vocal supporter, chastised Apple for explicitly using the name of its technology, "itunes," within the DTD namespace. With this and other measures that appear, at least on the surface, to be part of an unsupported effort to make the iTunes DTD proprietary, and a podcast's inclusion in the iTunes catalog exclusive to Apple.

    Suddenly, the company indirectly responsible for naming one of today's hottest technologies, is being chastised not only for being slow to adopt, but also appearing to hide an ulterior motive.

    By toughing out the development of the iTunes DTD on its own, stated Tristan Louis, one of RSS' earliest proponents and editor of TNL.net, "Apple has made a number of mistakes that show that they don't truly understand a) how XML works, b) how RSS works, and c) how the RSS community and community process works. Now, this is not the first time that Apple is using a standard to extend its own agenda. However, considering the level of support that RSS has been getting from other vendors--most recently, Microsoft--it is surprising to see that Apple would want to corner itself into its own small space." Microsoft recently announced its plans to support RSS within Longhorn, the next generation of Windows; and its appeal for community support and input has lately received some praise.


    Publishing audio podcasts with CL-HTTP
      Apple has just released iTunes 4.9 with support for
      podcasts. Podcasts are audio content you can download to your
      computer. Apple hosts a large list of free podcasts. You can add
      podcasts that are not listed at Apple to iTunes, too. Just drag the
      podcast URL onto your iTunes podcast listing. iTunes will by default
      look once a day if there are new podcasts that you have subscribed
      to and download them. If you have an iPod, you can sync them to the
      iPod, take them with you and listen to the audio while you are on
      the road, in a train, ... Podcasting brings Internet-based audio
      broadcasting to the masses. 

    Clearly even with a Lisp-based web server, we want to join the movement. Time for a little experiment: publishing podcasts for iTunes with CL-HTTP.
    Crazy stuff!

    Blogging for dollars - I don't make any money off this, but others do. My 1000 views last month would not add up to much anyways.
      In mid-July of this year, the new weblog service Typepad launched,
      and after a couple months of beta-testing I was hooked on the
      features. Rather than try and move my highly-customized blog over to
      the service, I decided starting a new site would be much easier, so
      I decided my next site would be housed at Typepad. 

    I've long been a fan of TiVo, having owned one for the past three years. Last year I finally started hacking them and found it to be much easier than I thought. I have always followed TiVo news, I'm often writing long emails evangelizing the product to those that ask, and I've wanted to write easier how-tos than the ones I'd read on TiVo hacking. I realized then that a blog focused on the digital recorder space would be perfect for Typepad, and PVRblog was born (actually I originally wanted to call it DVRblog, but accidentally bought pvrblog.com before I realized my mistake, so pvrblog it is).

    When I started planning and designing the site, I realized that since it was at Typepad, it was going to cost me some money to run it each month. Currently I already have one commercial unix account, a co-located debian server, and a co-located windows server. I wasn't looking forward to another monthly bill, so I looked at my options and realized I could throw Google's Adsense textads into the template and perhaps defray the costs. I designed the site templates with this in mind, making sure there was room for it.


    ExtremeTech recommended gear

    Posted by Kurt | Permalink

    07.03.2005 07:34

    Martian MI relief

    Check out the relief on this Opportunity MI picture: 1M173457552EFF55W4P2956M2M1

    2005 IDEA design contest.

    Whacked out signs

    MOC image of a dusty volcanoe

    Posted by Kurt | Permalink

    07.02.2005 19:05


    Tips for photographing fireworks. Yes, I already know that I should use a tripod.

    vObject - python library for vCard and vCalendar files.

    Not like I have time to go to these things, but I have always wanted to see what a Usenix even is like. USENIX Lisa 05 in San Diego. Lisa == Large Installation System Administration
      Join us in San Diego, CA, December 4-9, 2005, for the most in-depth,
      real-world system administration training available.  The annual
      LISA conference is the meeting place of choice for system, network,
      database, storage, security, and all other computer-related
      administrators. Administrators of all specialties and levels of
      expertise meet at LISA to exchange ideas, sharpen old skills, learn
      new techniques, debate current issues, and meet colleagues and

    Posted by Kurt | Permalink

    07.02.2005 18:53

    CSH considered harmful

    Some things are worth really quoting. I would have disagreed with this until 1999. Now I know that bash is better than csh/tcsh. If you write scripts in csh/tcsh. STOP RIGHT NOW It is not that hard to switch, so SWITCH TO BASH!

    And if you are doing complicated stuff, shouldn't you be using python?

    Csh Programming Considered Harmful

    From: Tom Christiansen <tchrist@mox.perl.com>
    Newsgroups: comp.unix.shell, comp.unix.questions, comp.unix.programmer, 
    Subject: Csh Programming Considered Harmful
    Date: 6 Oct 1996 14:03:18 GMT
    Message-ID: <538e76$8uq$1@csnews.cs.colorado.edu>

    Archive-name: unix-faq/shell/csh-whynot Version: $Id: csh-faq,v 1.7 95/09/28 12:52:17 tchrist Exp Locker: tchrist $

    The following periodic article answers in excruciating detail the frequently asked question "Why shouldn't I program in csh?". It is available for anon FTP from perl.com in /pub/perl/versus/csh.whynot.gz


    Resolved: The csh is a tool utterly inadequate for programming, and its use for such purposes should be strictly banned!

    I am continually shocked and dismayed to see people write test cases, install scripts, and other random hackery using the csh. Lack of proficiency in the Bourne shell has been known to cause errors in /etc/rc and .cronrc files, which is a problem, because you *must* write these files in that language.

    The csh is seductive because the conditionals are more C-like, so the path of least resistance is chosen and a csh script is written. Sadly, this is a lost cause, and the programmer seldom even realizes it, even when they find that many simple things they wish to do range from cumbersome to impossible in the csh.


    The most common problem encountered in csh programming is that you can't do file-descriptor manipulation. All you are able to do is redirect stdin, or stdout, or dup stderr into stdout. Bourne-compatible shells offer you an abundance of more exotic possibilities.

    1a. Writing Files

    In the Bourne shell, you can open or dup arbitrary file descriptors. For example,

    exec 2>errs.out

    means that from then on, stderr goes into errs file.

    Or what if you just want to throw away stderr and leave stdout alone? Pretty simple operation, eh?

    cmd 2>/dev/null

    Works in the Bourne shell. In the csh, you can only make a pitiful attempt like this:

    (cmd > /dev/tty) >& /dev/null

    But who said that stdout was my tty? So it's wrong. This simple operation *CANNOT BE DONE* in the csh.

    Along these same lines, you can't direct error messages in csh scripts out stderr as is considered proper. In the Bourne shell, you might say:

    echo "$0: cannot find $file" 1>&2

    but in the csh, you can't redirect stdout out stderr, so you end up doing something silly like this:

    sh -c 'echo "$0: cannot find $file" 1>&2'

    1b. Reading Files

    In the csh, all you've got is $<, which reads a line from your tty. What if you've redirected stdin? Tough noogies, you still get your tty, which you really can't redirect. Now, the read statement in the Bourne shell allows you to read from stdin, which catches redirection. It also means that you can do things like this:

    exec 3<file1 exec 4<file2

    Now you can read from fd 3 and get lines from file1, or from file2 through fd 4. In modern, Bourne-like shells, this suffices:

    read some_var 0<&3 read another_var 0<&4

    Although in older ones where read only goes from 0, you trick it:

    exec 5<&0 # save old stdin exec 0<&3; read some_var exec 0<&4; read another_var exec 0<&5 # restore it

    1c. Closing FDs

    In the Bourne shell, you can close file descriptors you don't want open, like 2>&-, which isn't the same as redirecting it to /dev/null.

    1d. More Elaborate Combinations

    Maybe you want to pipe stderr to a command and leave stdout alone. Not too hard an idea, right? You can't do this in the csh as I mentioned in 1a. In a Bourne shell, you can do things like this:

    exec 3>&1; grep yyy xxx 2>&1 1>&3 3>&- | sed s/file/foobar/ 1>&2 3>&- grep: xxx: No such foobar or directory

    Normal output would be unaffected. The closes there were in case something really cared about all its FDs. We send stderr to sed, and then put it back out 2.

    Consider the pipeline:

    A | B | C

    You want to know the status of C, well, that's easy: it's in $?, or $status in csh. But if you want it from A, you're out of luck -- if you're in the csh, that is. In the Bourne shell, you can get it, although doing so is a bit tricky. Here's something I had to do where I ran dd's stderr into a grep -v pipe to get rid of the records in/out noise, but had to return the dd's exit status, not the grep's:

    device=/dev/rmt8 dd_noise='^[0-9]+\+[0-9]+ records (in|out)$' exec 3>&1 status=`((dd if=$device ibs=64k 2>&1 1>&3 3>&- 4>&-; echo $? >&4) | egrep -v "$dd_noise" 1>&2 3>&- 4>&-) 4>&1` exit $status;

    The csh has also been known to close all open file descriptors besides the ones it knows about, making it unsuitable for applications that intend to inherit open file descriptors.


    2a. Built-ins

    The csh is a horrid botch with its built-ins. You can't put them together in many reasonable ways. Even simple little things like this:

    % time | echo

    which while nonsensical, shouldn't give me this message:

    Reset tty pgrp from 9341 to 26678

    Others are more fun:

    % sleep 1 | while while: Too few arguments. [5] 9402 % jobs [5] 9402 Done sleep |

    Some can even hang your shell. Try typing ^Z while you're sourcing something, or redirecting a source command. Just make sure you have another window handy. Or try

    % history | more

    on some systems.

    Aliases are not evaluated everywhere you would like them do be:

    % alias lu 'ls -u' % lu HISTORY News bin fortran lib lyrics misc tex Mail TEX dehnung hpview logs mbox netlib % repeat 3 lu lu: Command not found. lu: Command not found. lu: Command not found.

    % time lu lu: Command not found.

    2b. Flow control

    You can't mix flow-control and commands, like this: who | while read line; do echo "gotta $line" done

    You can't combine multiline constructs in a csh using semicolons. There's no easy way to do this

    alias cmd 'if (foo) then bar; else snark; endif'

    You can't perform redirections with if statements that are evaluated solely for their exit status:

    if ( { grep vt100 /etc/termcap > /dev/null } ) echo ok

    And even pipes don't work:

    if ( { grep vt100 /etc/termcap | sed 's/$/###' } ) echo ok

    But these work just fine in the Bourne shell:

    if grep vt100 /etc/termcap > /dev/null ; then echo ok; fi

    if grep vt100 /etc/termcap | sed 's/$/###/' ; then echo ok; fi

    Consider the following reasonable construct:

    if ( { command1 | command2 } ) then ... endif

    The output of command1 won't go into the input of command2. You will get the output of both commands on standard output. No error is raised. In the Bourne shell or its clones, you would say

    if command1 | command2 ; then ... fi

    2c. Stupid parsing bugs

    Certain reasonable things just don't work, like this:

    % kill -1 `cat foo` `cat foo`: Ambiguous.

    But this is ok:

    % /bin/kill -1 `cat foo`

    If you have a stopped job:

    [2] Stopped rlogin globhost

    You should be able to kill it with

    % kill %?glob kill: No match


    % fg %?glob


    White space can matter:


    may fail on some versions of csh, while

    if (expr)

    works! Your vendor may have attempted to fix this bug, but odds are good that their csh still won't be able to handle

    if(0) then if(1) then echo A: got here else echo B: got here endif echo We should never execute this statement endif

    3. SIGNALS

    In the csh, all you can do with signals is trap SIGINT. In the Bourne shell, you can trap any signal, or the end-of-program exit. For example, to blow away a tempfile on any of a variety of signals:

    $ trap 'rm -f /usr/adm/tmp/i$$ ; echo "ERROR: abnormal exit"; exit' 1 2 3 15

    $ trap 'rm tmp.$$' 0 # on program exit

    4. QUOTING

    You can't quote things reasonably in the csh:

    set foo = "Bill asked, \"How's tricks?\""

    doesn't work. This makes it really hard to construct strings with mixed quotes in them. In the Bourne shell, this works just fine. In fact, so does this:

    cd /mnt; /usr/ucb/finger -m -s `ls \`u\``

    Dollar signs cannot be escaped in double quotes in the csh. Ug.

    set foo = "this is a \$dollar quoted and this is $HOME not quoted" dollar: Undefined variable.

    You have to use backslashes for newlines, and it's just darn hard to get them into strings sometimes.

    set foo = "this \ and that"; echo $foo this and that echo "$foo" Unmatched ".

    Say what? You don't have these problems in the Bourne shell, where it's just fine to write things like this:

    echo 'This is some text that contains several newlines.'

    As distributed, quoting history references is a challenge. Consider:

    % mail adec23!alberta!pixel.Convex.COM!tchrist alberta!pixel.Convex.COM!tchri: Event not found.


    There's this big difference between global (environment) and local (shell) variables. In csh, you use a totally different syntax to set one from the other.

    In the Bourne shell, this VAR=foo cmds args is the same as (export VAR; VAR=foo; cmd args) or csh's (setenv VAR; cmd args) You can't use :t, :h, etc on envariables. Watch: echo Try testing with $SHELL:t

    It's really nice to be able to say ${PAGER-more} or FOO=${BAR:-${BAZ}}

    to be able to run the user's PAGER if set, and more otherwise. You can't do this in the csh. It takes more verbiage.

    You can't get the process number of the last background command from the csh, something you might like to do if you're starting up several jobs in the background. In the Bourne shell, the pid of the last command put in the background is available in $!.

    The csh is also flaky about what it does when it imports an environment variable into a local shell variable, as it does with HOME, USER, PATH, and TERM. Consider this:

    % setenv TERM '`/bin/ls -l / > /dev/tty`' % csh -f

    And watch the fun!


    Consider this statement in the csh:

    if ($?MANPAGER) setenv PAGER $MANPAGER

    Despite your attempts to only set PAGER when you want to, the csh aborts:

    MANPAGER: Undefined variable.

    That's because it parses the whole line anyway AND EVALUATES IT! You have to write this:

    if ($?MANPAGER) then setenv PAGER $MANPAGER endif

    That's the same problem you have here:

    if ($?X && $X == 'foo') echo ok X: Undefined variable

    This forces you to write a couple nested if statements. This is highly undesirable because it renders short-circuit booleans useless in situations like these. If the csh were the really C-like, you would expect to be able to safely employ this kind of logic. Consider the common C construct:

    if (p && p->member)

    Undefined variables are not fatal errors in the Bourne shell, so this issue does not arise there.

    While the csh does have built-in expression handling, it's not what you might think. In fact, it's space sensitive. This is an error

    @ a = 4/2

    but this is ok

    @ a = 4 / 2

    The ad hoc parsing csh employs fouls you up in other places as well. Consider:

    % alias foo 'echo hi' ; foo foo: Command not found. % foo hi


    Wouldn't it be nice to know you had an error in your script before you ran it? That's what the -n flag is for: just check the syntax. This is especially good to make sure seldom taken segments of code code are correct. Alas, the csh implementation of this doesn't work. Consider this statement:

    exit (i)

    Of course, they really meant

    exit (1)

    or just

    exit 1

    Either shell will complain about this. But if you hide this in an if clause, like so:

    #!/bin/csh -fn if (1) then exit (i) endif

    The csh tells you there's nothing wrong with this script. The equivalent construct in the Bourne shell, on the other hand, tells you this:

    #!/bin/sh -n if (1) then exit (i) endif

    /tmp/x: syntax error at line 3: `(' unexpected


    Here's one:

    fg %?string ^Z kill %?string No match.

    Huh? Here's another


    Coredump, or garbage.

    If you have an alias with backquotes, and use that in backquotes in another one, you get a coredump.

    Try this: % repeat 3 echo "/vmu*" /vmu* /vmunix /vmunix What???

    Here's another one:

    % mkdir tst % cd tst % touch '[foo]bar' % foreach var ( * ) > echo "File named $var" > end foreach: No match.

    8. SUMMARY

    While some vendors have fixed some of the csh's bugs (the tcsh also does much better here), many have added new ones. Most of its problems can never be solved because they're not actually bugs per se, but rather the direct consequences of braindead design decisions. It's inherently flawed.

    Do yourself a favor, and if you *have* to write a shell script, do it in the Bourne shell. It's on every UNIX system out there. However, behavior can vary.

    There are other possibilities.

    The Korn shell is the preferred programming shell by many sh addicts, but it still suffers from inherent problems in the Bourne shell's design, such as parsing and evaluation horrors. The Korn shell or its public-domain clones and supersets (like bash) aren't quite so ubiquitous as sh, so it probably wouldn't be wise to write a sharchive in them that you post to the net. When 1003.2 becomes a real standard that companies are forced to adhere to, then we'll be in much better shape. Until then, we'll be stuck with bug-incompatible versions of the sh lying about.

    The Plan 9 shell, rc, is much cleaner in its parsing and evaluation; it is not widely available, so you'd be significantly sacrificing portability. No vendor is shipping it yet.

    If you don't have to use a shell, but just want an interpreted language, many other free possibilities present themselves, like Perl, REXX, TCL, Scheme, or Python. Of these, Perl is probably the most widely available on UNIX (and many other) systems and certainly comes with the most extensive UNIX interface. Increasing numbers vendors ship Perl with their standard systems. (See the comp.lang.perl FAQ for a list.)

    If you have a problem that would ordinarily use sed or awk or sh, but it exceeds their capabilities or must run a little faster, and you don't want to write the silly thing in C, then Perl may be for you. You can get at networking functions, binary data, and most of the C library. There are also translators to turn your sed and awk scripts into Perl scripts, as well as a symbolic debugger. Tchrist's personal rule of thumb is that if it's the size that fits in a Makefile, it gets written in the Bourne shell, but anything bigger gets written in Perl.

    See the comp.lang.{perl,rexx,tcl} newsgroups for details about these languages (including FAQs), or David Muir Sharnoff's comparison of freely available languages and tools in comp.lang.misc and news.answers.

    NOTE: Doug Hamilton <hamilton@bix.com> has a program that he sells for profit for little toy non-UNIX systems. He calls it 'csh' or the 'hamilton csh', but it's not a csh as it's neither bug nor feature compatible with the real csh. Actually, he's fixed a great deal, but in doing so, has created a totally different shell. -- Tom Christiansen Perl Consultant, Gamer, Hiker tchrist@mox.perl.com "Espousing the eponymous /cgi-bin/perl.exe?FMH.pl execution model is like reading a suicide note -- three days too late." --Tom Christiansen <tchrist@mox.perl.com>

    Posted by Kurt | Permalink

    07.01.2005 10:18

    Posted by Kurt | Permalink

    07.01.2005 09:24

    sioseis filter

    Yesterday, I tried to do some seismic processing while writing up a blog entry. When I did a display line.tif and an doing a ghostscript conversion at the same time. That totally locked up laptop. I got a blue screen and a rainbow pinwheel of doom. Music kept playing and the mouse worked, but after 20 minutes, it was still very hung. Lost the blog entry too :(
    Yesterday, I talked to Jeff Dingler about what made the difference between the seismic images he makes verses what Dan Brothers made. Turns out the difference is primarily with the band pass filter. To get rid of the banding, just turn up the frequency of the bottom limit of the band pass filter.

    I was using this filter before:
        fno $FNO lno $LNO ftype 99  pass 150 6500 end
    Moving from 150 Hz to 600 Hz made a big difference:
        fno $FNO lno $LNO ftype 99  pass 600 6500 end
    The problem with this narrower band pass is that a lot of detail is getting washed out.

    Another good note. The gif image format does an excellent job of encoding these images at a small file size.

    Posted by Kurt | Permalink

    07.01.2005 09:10

    matlab figures on Mac OSX

    A tip from Alison LaBonte:

    For best resolution for Matlab figures:
    1. Maximize the figure window
    2. File menu - export settings (whatever changes you want to make) - apply to figure
    3. make any additional changes to figure
    4. File menu - page setup click 'landscape', 'man position and size', 'max aspect' or 'fill page'
    5. File menu - export settings - 'export' as a pdf
    Note: after you apply export settings to figure, if you go into export settings again but don't want to make any changes, you must click OK to exit. If you click cancel to close the export settings window, it will undo original changes you had made.

    Posted by Kurt | Permalink