09.30.2005 22:45
Excellent article on fink at MacDevCenter
Update on the Cisco VPN for OSX at UCSD: Works pretty well but is annoying. It freaks in areas of spotty wireless. It demands to keep open it's window while running. How about a small icon on the menu bar like iChat or Adium? Also, it doens't show much about it's status.
Installing Fink on Mac OS X at MacDevCenter looks like a very nice article and tutorial on using Fink. I'm biased since it is very positive and I'm on the fink developer team (but definitely not a core member).
... The Fink project, which began in December 2000, has two goals. It aims to port all this software to Mac OS X ("porting") and makes it available for install ("packaging"). As a full package management system, based on Debian's apt system, it installs and uninstalls packages, tracks dependencies, installs the packages that are needed, updates the packages, etc. Bottom line: installing Unix software on Mac OS X with Fink is a piece of cake (most of the time). There can be challenges, however, and I'll cover those in a minute. ...I emailed Vince my fink recovery notes earlier today, so I figured I would post them here. Sometimes fink gets a little confused.
for fink, it you are having trouble, here are my quick debugging tipsAlso, if X11 refuses to install saying that it is alread there, you may need to delete the Receipt for X11. Be careful... just move the Folder to your desktop first and then try to reinstall it. On 10.3, receipts are in /Library/Receipts. BE CAREFUL with this!
* Make sure you have Xcode installed (e.g. you have /Developer) * Make sure you have Apples X11 installed * Install the X11SDK (Xcode leaves this out)
Then run this command:
sudo /sw/lib/fink/postinstall.pl
Then make sure /sw/etc/fink.conf has all of the trees. Using the unstable tree is critical...
Trees: local/main stable/main stable/crypto unstable/crypto unstable/main
Then in fink commander do Source->Selfupdate rsync ( do NOT use CVS... it is Slowwwww)
Then Source->ScanPackages
Also make sure that you don't have any stale buildlock files around. Open FinkCommander, and type lock in the search window. If you see any build locks and are not currently building anything, remove those packages.
That has fixed just about every problem I've run into... but never fear, you can always nuke /sw and reinstall fink from scratch. It doesn't take too long to get back up and running.
Maybe Dru will have an update for what works with 10.4.
09.30.2005 11:16
PyGMT
I just cooked up a fink info file for PyGMT 0.3. However, I am unable
to use it with the grd files that I have. I am not sure what is up at
this point. I really could use this code right now for my thesis, so
I will give with a whirl.
BTW, Aquaemacs is frustrating... only Esc for meta? That sucks.
BTW, Aquaemacs is frustrating... only Esc for meta? That sucks.
ipython
In [5]: import PyGMT
In [6]: grdfile = open("foo.grd")
In [7]: grd = PyGMT.read_grid(grdfile) ====================================================================== exceptions.ValueError Traceback (most recent call last)
/Users/schwehr/Desktop/pygmt-test/<console>
/sw/lib/python2.4/site-packages/PyGMT/PyGMTgrid.py in read_grid(file) 200 # new grid 201 grid = Grid() --> 202 (grid.x_minmax,grid.y_minmax,grid.node_offset,grid.z_scale,grid .z_offset,grid.xunits,grid.yunits,grid.zunits,grid.title,grid.remark,grid.d ata) = gmtio.read(file) 203 204 return grid
/sw/lib/python2.4/site-packages/PyGMT/PyGMTgrid.py in __set_node_offset(sel f, val) 81 def __set_node_offset(self,val): 82 if val not in [0,1]: ---> 83 raise ValueError, 'Node_offset can be either 0 or 1.' 84 self.__node_offset = val 85 def __get_node_offset(self):
ValueError: Node_offset can be either 0 or 1.
09.30.2005 08:47
Skateboarding is not a crime
Portsmouth NH local news...
Using a skate board to getting from point a to b should not be a crime. Now skateboarding that destroys property is not cool. But just skateboarding around should not be outlawed. The other day, I saw an elderly man on his power chair driving in the middle of traffic. He was in the center lane mixing it up with cars. Now that is scary. He was going SLOWWWWWW.
City must end discrimination of skateboarders
Using a skate board to getting from point a to b should not be a crime. Now skateboarding that destroys property is not cool. But just skateboarding around should not be outlawed. The other day, I saw an elderly man on his power chair driving in the middle of traffic. He was in the center lane mixing it up with cars. Now that is scary. He was going SLOWWWWWW.
City must end discrimination of skateboarders
... Police have not only been called on to periodically remove these young adults from Market Square, a city ordinance allows the ticketing of teens who use their skateboards - sometimes the only transportation they have - on city streets.
It is disheartening, to say the least, to see a teen sitting in court with drunken drivers, drug addicts and wife beaters, just because he or she was apprehended skateboarding on town property. It is even more disheartening to see that same youngster have to plead with the court to get the skateboard - possibly the most valuable thing he or she owns - returned.
City officials justify keeping skateboarders off city streets as a safety issue, not only for pedestrians, but for the kids themselves. But older citizens racing around the city on bicycles, dodging through traffic, doesn't seem to concern those same officials. ...
09.29.2005 22:16
a2ps works well with python
A guy sitting next to me on the bus had a nice printout of a python
program. He said that he used "a2ps -4", so here is a2ps segy.py
-4 -g -o segy.py.ps; ps2pdf segy.py.ps; open segy.py.pdf after
install in a2ps from fink.
09.29.2005 20:32
bunch of bookmarks
python-ldap definitely looks handy for those with ldap. See setting up shop
aquaemacs... trying to download it now.
I ran out of ITconversations to listen to on the bus today. odeo has more podcasts/audiocasts.
World Wind src
Another earth3d visualization program.
Drawing arbitrary GIS data on Google Maps
How To Build a Game In A Week From Scratch With No Budget - Using PyGame
aggdraw is a drawing library for PIL (Python Imaging Library).
Shed Skin - A Python-to-C++ Compiler - Sounds like what what was done eith JIT with Java.
Photon sounds like an interesting plugin for iPhoto (did not know that it had plugins) for working with blogs.
uber-converter - convert 3d formats. Lots of potential here.
MayaVI - PyVTK visualization. This is on my MUST CHECK OUT list.
09.29.2005 08:57
segy-py 0.26 release
Just released segy-py 0.26 with these changes:
- segysqlgmt.py: added --trace-key to range which traces to use
- segysqlgmt.py: CoordTransform can survive no ScalerCoord field
- segywaterbottom.py: Added --time and --key. More usable!
- segywaterbottom.py: Handle empty picks better
- gnis.py: USGS place name database. Needs major help.
09.28.2005 22:34
UCSD VPN
Now that I am getting close to graduating, at Christie's prompting I
gave the UCSD VPN a try. The docs are really confusing. For
the mac, I started here:
http://www-ono.ucsd.edu/documentation/vpn/
Then registered on this page: https://www-no.ucsd.edu/cgi-bin/vpnsignup/signup.pl
Then click on the Mac 4.7 client link to get to this page: http://www-ono.ucsd.edu/documentation/vpn/mac/47/index.html
Under step 2, there is a little here link to download the Cisco VPN client software... http://www-ono.ucsd.edu/documentation/vpn/mac/47/UCSD-vpnclient-4.7.dmg
After downloading the VPN software, double click the dmg to open the Disk Image. Double click the "Cicso VPN Client.mpkg". Go through the install process, but do not eject this dmg!
Go into your applications folder and run the VPN client program. You now need to go through the import button twice. There are two setting that you need to pull in from the Profiles folder of the dmg:
You will need to enter your UCSD campus username and password. This is the same as your UCSD username and password for pop, ieng9, squirl mail, etc. NOT your IGPP username and password.
Keep the VPN running as long as you need services that require being at UCSD.
http://www-ono.ucsd.edu/documentation/vpn/
Then registered on this page: https://www-no.ucsd.edu/cgi-bin/vpnsignup/signup.pl
Then click on the Mac 4.7 client link to get to this page: http://www-ono.ucsd.edu/documentation/vpn/mac/47/index.html
Under step 2, there is a little here link to download the Cisco VPN client software... http://www-ono.ucsd.edu/documentation/vpn/mac/47/UCSD-vpnclient-4.7.dmg
After downloading the VPN software, double click the dmg to open the Disk Image. Double click the "Cicso VPN Client.mpkg". Go through the install process, but do not eject this dmg!
Go into your applications folder and run the VPN client program. You now need to go through the import button twice. There are two setting that you need to pull in from the Profiles folder of the dmg:
- allthruucsd.pcf
- split.pcf
You will need to enter your UCSD campus username and password. This is the same as your UCSD username and password for pop, ieng9, squirl mail, etc. NOT your IGPP username and password.
Keep the VPN running as long as you need services that require being at UCSD.
09.28.2005 18:27
parsing the USGS GNIS
The USGS has a handy name database full of all sorts of strange names.
Here is some python code to quickly parse the name, type of name, and
location. This first program (gnis.py) creates a sqlite database.
#!/usr/bin/env pythonThen I wrote up something to search a bounding box and look for names that are of type cape, channel, or stream. The I only wanted rivers, so toss out a few extra names.
""" Parse the USGS Geophraphic Names Information System (GNIS) files and create an sqlite database.
http://geonames.usgs.gov/stategaz/ """ import sqlite import os import sys
if __name__ == "__main__": cx = sqlite.connect('ca-names.db') # No, this has nothing to do with DNS!! cu = cx.cursor() cu.execute('CREATE TABLE places ( name VARCHAR(60), type VARCHAR(50), lon REAL, lat REAL);') cx.commit() count = 0 for line in open ('CA_DECI.TXT','r').xreadlines(): count += 1 if count%500==0: print count fields = line.split('|') name = fields[2] if -1 != name.find("'"): print 'skipping ',name, continue type = fields[3] try: lon = float(fields[10]) lat = float(fields[9]) except ValueError: print "skipping line (bad lon/lat): ",line, continue insertStr = 'INSERT INTO places (name,type,lon,lat) VALUES (' insertStr += "'"+name+"'" insertStr += ", '"+type+"'" insertStr += ', '+str(lon) insertStr += ', '+str(lat) insertStr += ');' cu.execute (insertStr) cx.commit()
#!/usr/bin/env python """ Get the Eel River Basin names """ import sqlite import os import sysIf I then do a grep -v skipping on the results, I get a list like this:
if __name__ == "__main__": cx = sqlite.connect('ca-names.db') # No, this has nothing to do with DNS!! cu = cx.cursor() searchStr = 'SELECT lon,lat,name,type FROM places WHERE ' searchStr += ' lon > -125.0' searchStr += ' AND lon < -123.8' # -123.0' searchStr += ' AND lat > 40.1' # 39.5' searchStr += ' AND lat < 42' searchStr += ' AND (type="cape" OR type="channel" OR type="stream")' searchStr += ';' cu.execute(searchStr) for row in cu.fetchall(): if (-1 != row['name'].find('Stream')) or \ -1 != row['name'].find('Creek') or \ -1 != row['name'].find('Slough'): print 'skipping ', row['name'] continue print row['lon'], row['lat'], (' white "'+row['name']+'"')
-124.16139 40.80722 "Inner Reach" -124.08222 41.54722 "Klamath River" -124.01167 40.68833 "Little North Fork North Branch North Fork Elk River" -124.11 41.02722 "Little River" -124.09611 40.67333 "Little South Fork Elk River" -124.09361 41.28 "Lookout Point" -124.0175 41.02889 "Lower South Fork Little River" -124.13389 40.94222 "Mad River" -124.3525 40.305 "Mattole Point" ...The final step is to import the points into the Fledermaus scene using Import->Points and setting the solid color button. Do a drape and all is well.
09.28.2005 18:10
slough
What a fun word! There are lots of them in the Eel River area. What fun
slough
n 1: necrotic tissue; a mortified or gangrenous part or mass
[syn: {gangrene}, {sphacelus}]
2: a hollow filled with mud
3: a stagnant swamp (especially as part of a bayou)
4: any outer covering that can be shed or cast off (such as the
cast-off skin of a snake)
v : cast off hair, skin, horn, or feathers; "out dog sheds every
Spring" [syn: {shed}, {molt}, {exuviate}, {moult}]
09.28.2005 14:48
Small pieces loosely joined
Check out John Udell's Google walking tour
The actual flash movie is >http://weblog.infoworld.com/udell/gems/gmap2_flash.html
Key phrases I heard today (podcasts while on the bus):
- People add photo notes to a space / User annotation
- Users add value - harness the user
- Yahoo has an API now too
- Remixable -- anti-fragility
- eventful.com - http://api.evdb.com/
- Windows is a bag of drivers. That's where it's power resides.
09.28.2005 13:08
python 2.4.2 released
Python 2.4.2 is out today.
Looks like lots of little bug fixes over 2.4.1.
09.27.2005 17:48
sql query builder
I really need a simple SQL statement builder. I am ending up with
some seriously ugly code deciding when to put AND's and WHERE's in a
query! It would be nice to say something like this:
q = sqlselect() q.fields(['name','address','occupation']) q.where('age>200') q.where('weight<50') q.limit(10) q.from('strangePeople') q.close() print qinstead of this mess...
SELECT name,address,occupation FROM strangePeople \ WHERE age>200 AND weight<50 LIMIT 10;
#!/usr/bin/env pythonHow to handle AND vrs OR? I know that C# can do all this and it is just like typing the sql query right into the code (except backwards). But I'm doing python.
def buildFledermausLines(cx, options):
cu = cx.cursor()
searchStr = "SELECT fileKey,x,y FROM segyTrace "
if (None != options.minFileKey) or (None != options.maxFileKey) \ or (None != options.traceRangeMin) or (None != options.traceRangeMax): searchStr += ' WHERE'
if (None != options.minFileKey): searchStr += ' fileKey>='+str(options.minFileKey) if (None != options.minFileKey) and (None != options.maxFileKey): searchStr += ' and' if (None != options.maxFileKey): searchStr += ' fileKey<='+str(options.maxFileKey)
if (None != options.maxFileKey) and (None != options.minFileKey): searchStr += ' AND ' if (None != options.traceRangeMin): searchStr += ' '+options.traceKey+'<='+str(options.traceRangeMin) if (None != options.maxFileKey) and (None != options.minFileKey) \ and (None != options.traceRangeMin): searchStr += ' AND ' if (None != options.traceRangeMax): searchStr += ' AND '+options.traceKey+'<='+str(options.traceRangeMax)
searchStr += ';'
09.27.2005 16:18
XStar NMEA weirdness
I was trying to plot the raw xstar longitudes and latitudes (after
deviding by 1000), but I was getting a step function that was really
nasty. I figured it was time to finally check out what the values in
NMEALong, NMEALongSmall, NMEALat, and NMEALatSmall look like. The
answer is not good. It is very possible that this is a bug in my
code, but it might not be. The longitude values are ok, but the
latitude functions seems to be experiencing some rounding or update
issues.
./nav.py | head -10 -448195 -74699200 147016 373 -- -124.49861111 -124.49866667 40.83777778 -448195 -74699200 147016 373 -- -124.49861111 -124.49866667 40.83777778 -448195 -74699200 147016 373 -- -124.49861111 -124.49866667 40.83777778 -448195 -74699220 147016 373 -- -124.49861111 -124.49870000 40.83777778 -448195 -74699220 147016 373 -- -124.49861111 -124.49870000 40.83777778 -448195 -74699230 147016 373 -- -124.49861111 -124.49871667 40.83777778 -448195 -74699230 147016 373 -- -124.49861111 -124.49871667 40.83777778 -448195 -74699230 147016 373 -- -124.49861111 -124.49871667 40.83777778 -448195 -74699260 147016 373 -- -124.49861111 -124.49876667 40.83777778 -448195 -74699260 147016 373 -- -124.49861111 -124.49876667 40.83777778The code that basically generated the above is this bit-o-python
#!/usr/bin/env python import sqlite import os import sys import math cx = sqlite.connect('segy.db') cu = cx.cursor() cu.execute('SELECT NMEALong, NMEALongSmall, NMEALat, NMEALatSmall from segyTrace')NMEALatSmall looks complete screwed up with that constant value of 373. At least NMEALonSmall works better than X or NMEALon. What to do? Here is what I have right now for looks:
for row in cu.fetchall(): print row['NMEALong'], row['NMEALongSmall'], row['NMEALat'], row['NMEALatSmall'], ' ---- ', print ("%15.8f" % (float(row['NMEALong'])/3600.)), ("%15.8f" %(row['NMEALongSmall']/600000.)), print ("%15.8f" % (row['NMEALat']/3600.)), float(row['NMEALatSmall'])/600000.
09.27.2005 15:20
SIO Viz competition
Good luck to all the SIO grad students!
Please join us for Dr. Bridget Smith's introductory class for the 2005 SIO Graduate Student Visualization Contest:
Friday September 30th (official contest to be held on October 14th) 11AM to Noon SIO VizCenter (Top floor of the Revelle 4000 Blding)
Topics will include, but not be limited to:
- Using GMT and Fledermaus to create 3D scene files and movies using topography grids and scaler data - Using ImageReady to assemble frames for Quicktime movies - Using iMovie for creative & compact presentation - Using Garage Band for recording sound/narration - What the prizes will be this year - Who are the judges - How you can be a winner
09.27.2005 10:47
segysqldump.py with pretty Longitude/Latitude
I just fixed up segysqldump.py to allow for pretty printing of X,Y
locations for shots. Sometimes it just takes a piece of paper to
figure out a silly little equation like calculating the seconds from a
decimal coordinate. I am still wondering how I avoid the fun
traceback with head that you will see below. I guess I could wrap my
printing code in try: foo except IOError: quietly die, but that seems
ugly.
I tried to lookup my old UCSD library checkout record to find a book I was looking at last year. Nope. They dump all records once a book is returned for privacy reasons. Both good and bad. I have to keep my own records better.
segysqldump.py --verbosity=0 -n1 --min-sec -w 15| head ['fileKey', 'traceNumber', 'X', 'Y', 'EnsembleNo', 'FieldRecNo', 'Xensemble', 'Yensemble', 'Shotpoint', 'TraceNoEnsemble'] ['fileKey', 'traceNumber', 'X', 'Y', 'Shotpoint']I am sitting in a coffee shop and what do I get next to me, but a group of moms meeting about being Brownie troop leaders
fileKey traceNumber X Y Shotpoint
1 1 124 29 55.00 W 40 50 16.00 N 88500 1 2 124 29 55.00 W 40 50 16.00 N 88501 1 3 124 29 55.00 W 40 50 16.00 N 88502 1 4 124 29 55.00 W 40 50 16.00 N 88503 1 5 124 29 55.00 W 40 50 16.00 N 88504 Traceback (most recent call last): File "/Users/schwehr/x/src/segy-py/segysqldump.py", line 260, in ? print val,' ', IOError: [Errno 32] Broken pipe
# schwehr@CatBoxII 38 $ cd && segysqldump.py --verbosity=0 -n1 --min-sec -w 15| tail 1 1495 124 31 5.00 W 40 50 24.00 N 89994 1 1496 124 31 5.00 W 40 50 24.00 N 89995 1 1497 124 31 6.00 W 40 50 24.00 N 89996 1 1498 124 31 6.00 W 40 50 24.00 N 89997 1 1499 124 31 6.00 W 40 50 24.00 N 89998 1 1500 124 31 6.00 W 40 50 24.00 N 89999
I tried to lookup my old UCSD library checkout record to find a book I was looking at last year. Nope. They dump all records once a book is returned for privacy reasons. Both good and bad. I have to keep my own records better.
09.27.2005 08:33
IOgear gme225b bluetooth mouse
UPDATE: I returned the iogear junk and am very happy with a Kensignton PocketMouse Optical Pro.
I am not too happy with my mouse purchase from yesterday... an IOgear GME225B bluetooth mouse. I should have stuck with a straight USB mouse. I only had a few minutes to get it before the shuttle came. Here is what I found this morning...
One has to turn off the Authentication check box in the bluetooth setup icon in sys preferences and then it will reappear after a screen saver causes it to lose connection or if it is powered down and powered up. You can then turn on authentication and the IOGear mouse will stay connected for a while but if you lose the connection again for any reason, and there are many, it will not reappear unless you set it up all over again or just go and uncheck the Authentication box again and then recheck it. This is a major headache. The reason this is happening is that it does NOT pair properly. Using the OS setup assistant, it appears to PAIR but when you go to the BlueTooth icon after the setup, i.e. in System Preferences, and check the Devices tab, you'll see that it is indeed NOT paired. If this one problem were fixed, the mouse would be GREAT, but unfortunately, I have to give it only ONE star for a Mac, hoping that either the company or Apple's new Tiger OS will work with it. The manual needs updating a bit too.The manual sucks. What do the different red and green blinking patterns mean? Why not label the connect button on the bottom of the mouse. It is not 100% clear which way batteries go in. I got it to work for a couple minutes at one point and 2x it has clicked and scroll wheeled, but no mouse movement. What gives?
I am trying to use it with 10.3.9 on an Tibook 1.5GHz... sigh.
09.25.2005 19:08
ipython rocks!
IPython rocks! Gareth gave me a quick tutorial and I just used it to
debug a segy-py bug. Actually, segy-py really could use a complete
rewrite. I wrote the whole thing and I still get a bit confused each
time I try to get header values. I think all the subclasses just
cause more trouble than they are worth.
Here is what I did with ipython:
Calls to getBinHeader were bailing on me and I couldn't figure out what was wrong. When I did print type(traceHeader) python just said that it was an instance. So I popped open an ipython just before this point to see what methods were available from traceHeader.
Brought to you by Unwritten and JoJo on my iPod
Here is what I did with ipython:
Calls to getBinHeader were bailing on me and I couldn't figure out what was wrong. When I did print type(traceHeader) python just said that it was an instance. So I popped open an ipython just before this point to see what methods were available from traceHeader.
def offset2seconds(segy, trace, offset): traceHeader = segy.getTraceHdr(1)#trace) from IPython.Shell import IPShellEmbed ipshell = IPShellEmbed(argv=[]) ipshell() print type(traceHeader) interval = traceHeader.getBinHeader('SampleInterval')/1000000. delay = traceHeader.getBinHeader('Delay') time = delay + interval * offset return timeThen at the ipython prompt, I just typed traceHeader.[tab] where [tab] is hitting the tab key.
In [2]: traceHeader. traceHeader.__class__ traceHeader.getHeader traceHeader.__doc__ traceHeader.getTextTranslateValue traceHeader.__init__ traceHeader.printHeader traceHeader.__module__ traceHeader.segyHdr traceHeader.data traceHeader.sqlInsert traceHeader.drv traceHeader.startAha! I was reading the methods for the wrong class. Not getBinHeader, but getHeader. Now all is well.
Brought to you by Unwritten and JoJo on my iPod
09.25.2005 17:37
segy-py 0.25 ... finding the bottom of the sea
I just added segywaterbottom.py to segy-py and released it as segy
0.25 (mud-sucker). So far it only does thresholding. That does not
work so grate on a lot of datasets. This is more a place to put
further algorithms.
I can imagine all sorts of algorithms for finding the water bottom. The type and shape of the water bottom (sediment-water interface) is going to drastically alter how each type of algorithm works. This is a lot like stereo computer vision. There are many basic algorithms and for each the details of the actual implementation really make a big difference. Paul has implement many of them. Python should be easier for us non-Fortran types to give them a try. I think a method that does multiple passes with a couple methods could make a rock solid detector.
SEE ALSO: http://sioseis.ucsd.edu/wbt.html
I can imagine all sorts of algorithms for finding the water bottom. The type and shape of the water bottom (sediment-water interface) is going to drastically alter how each type of algorithm works. This is a lot like stereo computer vision. There are many basic algorithms and for each the details of the actual implementation really make a big difference. Paul has implement many of them. Python should be easier for us non-Fortran types to give them a try. I think a method that does multiple passes with a couple methods could make a rock solid detector.
SEE ALSO: http://sioseis.ucsd.edu/wbt.html
09.25.2005 15:29
Water bottom thresholding
I have been trying to see what is up with the water bottom
thresholding that I was working on in sioseis. It was hard to see
what was going, so I took a few minutes to start writing a water
bottom program. Right now, I have only implemented thresholding. It
is clear that thresholding is very touchy. I am doing 4 thresholds at
dn levels of 15000, 10000, and 5000. The sensor is clipping at +/-
32000 for a few percent of the pings. Here is the command:
A few things are clear. 10000 is very close to finding the water bottom. It occasionally triggers early. 5000 triggers too soon for most of the line (until ~17000). 15000 never triggers for a lot of traces. This freaks out gnuplot with data like this:
./segywaterbottom.py -t 15000 -t 10000 -t 5000 -t 1000 \ -f line43.sgy -s 10 > fooThen I did a quick gnuplot:
head foo
# FILE: line43.sgy 10 818 818 143 1 20 819 819 85 3 30 817 814 176 0 40 814 814 0 0 50 817 814 71 8 60 815 812 203 3 70 815 812 139 0 80 813 813 213 2
gnuplot> set title 'water bottom thresholding' gnuplot> set yrange [0:2000] gnuplot> set terminal gif Terminal type set to 'gif' Options are 'small size 640,480 ' gnuplot> set output 'threshold.gif' gnuplot> plot 'foo' with l title '15000'\ , 'foo' using 1:3 with lp title '10000'\ , 'foo' using 1:4 with l title '5000'
A few things are clear. 10000 is very close to finding the water bottom. It occasionally triggers early. 5000 triggers too soon for most of the line (until ~17000). 15000 never triggers for a lot of traces. This freaks out gnuplot with data like this:
7640 None None 35 9 14350 None 452 26 5 14500 None 632 3 0 17890 None 82 6 1 17900 None 463 28 5
09.25.2005 14:03
Reverse switch - Mac to Windows
My thoughts as to this guys comments on Mac OSX:
Why I Might Switch Back...
Say what? I typically reboot my laptop every couple of weeks. I have hit a few crashes from overheating, but that's my fault.
If you made it this far, you should know that I hardly know how to use Windows at this point. I will be relearning Windows starting in January, so maybe I will change my mind then. But I don't want to give up fink!
Current complaints about Windows:
Why I Might Switch Back...
1. Anyone who says that Macs are more stable than Windows are smoking dope. I have two brand new Macs and they regularly go wacky and need reboots.
Say what? I typically reboot my laptop every couple of weeks. I have hit a few crashes from overheating, but that's my fault.
2. My mini and PowerBook are 1.42Ghz and 1.5Ghz, with 1GB and 512MB respectively. They are both sloooooow. Though the PowerBook is a bit better, neither is as snappy as my two year old Celeron, and not anywhere near the cutting edge x86 laptops.What have you got running? My powerbook is pretty snappy for general use.
3. Also, the graphics power suck. ATI Radeon 9200 is anemic in 2005. Playing Halo on either computer is a drastically reduced experience than on my Celeron 2Ghz Toshiba.Yeah, but last time I tried messing with windows graphics drivers, my life sucked. On the Mac it either works (which is usually the case) or doesn't.
4. I don't like Mail or Safari. I much prefer Thunderbird and Firefox, both of which don't get much attention on the Mac platform.Say what? I am happily using the latest Firefox on OSX.
5. I really dislike iPhoto. I much prefer the Windows thumbnails.You don't have to use iPhoto if you don't want to.
6. I hate the Finder. I thought the Windows Explorer was bad and wacky, but I had no idea. Finder makes me want to hurt someone. I especially love when folders don't merge, but replace.What do you mean merge? That sounds like a strange behavior!
7. Trillian is so much better than Adium or Fire, and iChat is non-starter.No clue what Trillian is like. I like Adium. Wish it did IRC and handled the iSight.
8. I'm not a musician, GarageBand to me isn't particularly compelling.So delete it like I did.
9. Like it or not, it's a Windows world, and interop has to be a priority. If I take a few screen shots, paste them into a PowerPoint For Mac presentation and send them off, and no one can see them because the images have defaulted to some wacky Quicktime tiff? That's bad.How in the world did you end up with a quicktime tiff??? Are you sure you are using Mac OSX? Are you running classic or something?
10. Keynote and Pages are both interesting, but non-standard. I wouldn't do any real work with them because I'd be afraid of trying to send documents to my coworkers.Hmm... I still use Word and Powerpoint all the time in OSX.
11. Yahoo! Products work better on Windows: Yahoo! Messenger and Yahoo! Music Engine are awesome on the PC. Yes Y! could concentrate more on Mac products, but they're hardly alone here.Adium does just fine with yahoo messenging.
12. In fact, most stuff is available on Windows first, sadly. And I'm a bleeding edge junkie.Ummm... try using bleading edge open source stuff in cygwin. Not fun.
13. I like UltraEdit 32 over TextWrangler or TextEditHave you tried BBEdit? I really dislike it and prefer emacs, but that's me.
14. You know, .Mac is interesting, but way too expensive.I value my time. 15. The widescreen on the Powerbook is completely overrated. Web pages and documents are tall, not wide. Because the wide screen lowers the viewing center of the screen, I end up getting a crik in my neck looking "down" at the wide screen, rather than more straight ahead on PC based laptops. How is a Mac or Windows laptop different in terms of the screen?
16. Having to remember my DVI to VGA adapter to hook up my PowerBook to an overhead is a pain in the ass. The wide-screen to 800×600 presentation view is also jarring and painful.Why are you running 800x600?
17. What is the friggin' deal with the .dmg files? The install process is so broken. Unzip .dmg.gz, mount .dmg, copy to Applications, unmount .dmg, delete .dmg, delete dmg.gz. Bleh.And the windows registry is better? How about uninstalling? Grab the app, throw it in the trash. Done.
18. Do you know how long it took me to get the idea that I had to empty the trash before I disconnected any external drives, memory cards, etc. otherwise the files just stayed whereever they were. And those fucking .DS_Store files...And windows ate my USB drive.
19. I don't use iMovie. It'd be nice if I did, but it's not a plus as I don't have a DVD burner, and if I wanted to buy one, it'd cost me a ton.A firewire DVD burner does not cost more if you blog it into one OS or another.
20. Everything for Macs cost more. From my $50 Mighty Mouse to my $150 iSight camera.Take your windows mouse and keyboard, plug them into your mac. I use a microsoft split keyboard on my mac.
21. I thought having "Unix" underneath would be an advantage. But it's not Linux. Linux is what I know, the wackiness that is OSX confuses the hell out of me. I can barely figure out what's running and not running. I installed some HP Printer software drivers months ago and the control panel starts up automatically every day and sits in the Dock, despite my best efforts to track down where the HELL it's started from.How is the HP Printer driver a Mac Unix problem. That is should be in the HP is truly a lame company catagory. How do I get rid of that damn thing? Why is HP the only printer driver install on OSX that makes me reboot. HP, what in the world are you folks doing?
22. I thought Expose was cool at first, but then realized I was going blind trying to find the right window. Spatial memory, what? Expose just randomly throws the windows around the screen, it's nuts.Then turn it off. I use it to get to the desktop. That's it.
23. I hate the Dock too. Each app responds differently. So some apps you can click on and the window appears at the top, others it ignores. And if you Minimize the window, well, it never pops up. WHY?!?! Urgh. Thank god I discovered Command+~ to swap between windows of the same app... I was losing my mind for a while trying to find things.Things like Photoshop and Illustrator work much better with the Dock than on windows. Why can't I drop a file on the Windows tool bar app?
24. The hardware support isn't great. I've got several devices which just are completely ignored by the Mac, including a WebCam and several USB devices. And my iSight doesn't play nice with anything but iChat. WTF? Why isn't it just a DV device?I agree with the iSight, but nothing beats the linux method of opening /dev/isight and getting a ppm image. Can't get that on either.
25. iSync is only marginally better than nothing. I thought it was a holy grail... it's really not. In fact, I tried to sync my wife's phone and wasn't being careful and it defaulted to a destructive sync and blanked out my wife's phone. ARRRGGGH. WHY!?!?What is isync? 26. I really don't like the fact that some apps close when their window goes away (like System preferences, and Windows Video for the Mac) and other apps stay there in memory forever until you notice them by accident... That is a little strange, but compaired to all the windows app differences, it is really minor.
27. Spotlight isn't great. It's slow and doesn't seem to find what I'm looking for.I use locate and find.
28. Dashboard is pretty useless as well. I've installed Yahoo! Widgets (Konfabulator) and that's much more what Dashboard should've worked like.So use Konfabulator.
29. Does anyone use Sherlock any more?No way do I use Sherlock.
30. Windows Anti-aliasing for LCDs is more refined than OS X. You'd think it'd be opposite, but to me Macs seem fuzzy.What are you doing wrong? I have very crisp text on all my displays.
31. OSX mouse tracking isn't great. Why is that? Didn't they invent it? Why do I have to go get separate mouse drivers for my Microsoft, Logitech and MightyMouse mice? That's insane.I have never installed a mouse driver on OSX.
32. Rendezvous/Bonjour works as advertised... but since no one around me uses a Mac, it really doesn't matter except for iTunes, and the Windows version supports that functionality any ways.Just ignore it then. Most of us do anyway.
33. Hitting F11 by accident is a wonderful way to lose your mind. "AHHH!"That seems pretty minor.
If you made it this far, you should know that I hardly know how to use Windows at this point. I will be relearning Windows starting in January, so maybe I will change my mind then. But I don't want to give up fink!
Current complaints about Windows:
- Viruses and worms galore
- Why am I giving money to zone alarm and symantec
- I am terrified of updates/service packs
- Explorer is deep in the OS for no apparently good reason
- Drag and drop doesn't work so well
- Shell access sucks
- Cygwin is clunky, but at least I get bash and a working emacs
- Why am I supposed to be paying for every little thing?
- Why does a C/C++ compiler cost more
- Visual basic...
- Did you read the article about Vista starting over from scratch? Yeah, Mac OS < 10 really sucked too. Maybe the new OS will rock too.
- When my disk crashes, I have to go buy another copy of windows since the system did not come with a set of real install CD/DVD media.
- The registry
- Embrace and extend. Okay, so Apple makes me nervous too.
- If will be 10 years before a windows box is let into JPL's flight ops networks.
- Swiss cheese by default.
- Where are python, ruby, perl in the default install?
- IIS and all those damn log messages I get from people thinking my Mac is Windows box that they can buffer overflow...
09.25.2005 13:05
segy-py 0.24
segy-py version 0.24 is out.
- segysql-sioseis-plt.py: New program to create a sioseis bash script
- makepltsegy.py: More verbosity
- segysqldump.py: Add --list-keys, --limit, and printing many keys
09.25.2005 12:34
sioseis water bottom picks
Just created an interesting little water bottom pick visualization.
This is in the total hack catagory!
First, in my sioseis script, I have been trying to add gains hung off the water bottom with no luck. But here is what I have:
First, in my sioseis script, I have been trying to add gains hung off the water bottom with no luck. But here is what I have:
wbt3 lprint 2 thres 10000 track 0.5 end endI picked 10000 as a guess based on what I saw in this graph of the 100th trace in line43.sgy. I used 0.5 seconds for track, so that it basically would not track at all. The then ran the sioseis plot script with gave lots of these warnings:
**** 0 ERRORS IN THIS JOB **** *** WARNING *** No pick, using last. picked time is 0. *** WARNING *** Pick of 0.793249965 is outside the track. picked time is 0. *** WARNING *** Pick of 0.710500002 is outside the track. picked time is 0. *** WARNING *** Pick of 0.760999978 is outside the track. picked time is 0. *** WARNING *** Pick of 0.712249994 is outside the track. picked time is 0.Wait, those pick times in the warnings look great. So maybe the track time needs to be larger, but before that I wanted to see what they look like:
grep WARN foo | awk '{print $6}' | grep '0\.' > foo2I can definitely see the water bottom.
09.25.2005 08:44
skateboarding is a crime in Portsmouth
Doh! I understand about trying to prevent skaters from ripping up
benches and railings, but totally blocking skaters (the law is
actually for roller skaters!) is a big bummer.
Skateboarders using public spaces risk a trip to court [seacoastonline]
Pedestrian hit by truck downtown, hospitalized
Skateboarders using public spaces risk a trip to court [seacoastonline]
Pedestrian hit by truck downtown, hospitalized
09.25.2005 08:29
pyblosxom
I finally got a chance to check out pyblosxom while on the
plane last night. One thing I liked about nanoblogger that I did not
experience with pyblosxom, is instant success. With nanoblogger, I
had a demo page that looked nice and had a few posts in under a half
an hour without any hard work. The reality is that there are
thousands of tools that I should checkout and learn, but there is
never enough time. So unless there is a clear reason for me to dive
into a tool that requires substantial learning before I can see some
good progress, I won't even try it. That happened to me with all the
seismic tools. It was only when truly forced to that I finally
figured out the basics to sioseis and pltsegy. The other tools have
only received a few minutes of my attention.
Back to pyblosxom. I had this package high on my list of interesting projects due to being built on python. Most blogging tools are written in PHP. I have worked a bit with PHP, but I really like python - it is easy to work with and very expressive. I don't really want to have to figure out all the details of yet another programming language. Nanoblogger (my current tool) is great, but working with bash is challenging. Bash as a language is a million times better than csh, but it is just not up to building manageable API's for us mortals. Yes, it can be done, but I'd rather have python where I get a slew of API's that I can use to extend the blogging engine.
pyblosxom is a python cgi program and that was my first rough spot. Apache's http.conf is not someplace that I like to go into. I've setup virtual hosting and done a few things like that, but it is such a large beast that I end up with a lot of trial and error (mostly error). I used apache2 from fink with all the extras enabled (which I don't know how to use), so I started by editing /sw/etc/apache2/httpd.conf. I finally nuked the whole <Directory /Users/*/Sites> section and put it this:
I then tweaked ~/Sites/cgi-bin/config.py with the path to data and log dirs. Then I put a dummy file in data and fired up firefox with a open http://localhost/~schwehr/cgi-bin/pyblosxom.cgi. That worked, but what I got was ugly. My data file (post1.txt):
Another pyblosxom blog
Back to pyblosxom. I had this package high on my list of interesting projects due to being built on python. Most blogging tools are written in PHP. I have worked a bit with PHP, but I really like python - it is easy to work with and very expressive. I don't really want to have to figure out all the details of yet another programming language. Nanoblogger (my current tool) is great, but working with bash is challenging. Bash as a language is a million times better than csh, but it is just not up to building manageable API's for us mortals. Yes, it can be done, but I'd rather have python where I get a slew of API's that I can use to extend the blogging engine.
pyblosxom is a python cgi program and that was my first rough spot. Apache's http.conf is not someplace that I like to go into. I've setup virtual hosting and done a few things like that, but it is such a large beast that I end up with a lot of trial and error (mostly error). I used apache2 from fink with all the extras enabled (which I don't know how to use), so I started by editing /sw/etc/apache2/httpd.conf. I finally nuked the whole <Directory /Users/*/Sites> section and put it this:
AddHandler cgi-script .cgi .pl <Directory /Users/schwehr/Sites/*> Options +ExecCGI </Directory>I did not want to use a ScriptAlias. After about 50 apachectl restarts I had a test cgi working. I never did figure out how to get php5 to work
I then tweaked ~/Sites/cgi-bin/config.py with the path to data and log dirs. Then I put a dummy file in data and fired up firefox with a open http://localhost/~schwehr/cgi-bin/pyblosxom.cgi. That worked, but what I got was ugly. My data file (post1.txt):
yada <b>yada</b> yada <font color="red">red</font>The results...
Another pyblosxom blog
Another pyblosxom blog
Sat, 24 Sep 2005
yada yada yada red
posted at: 18:59 | path: / | permanent link to this entry