Tuesday, March 20, 2007

serial ports and Mac os X

It is pretty straightforward to add a serial port to your Mac using a serial to RS232 converter. I bought a USBG-232 converter from usbgear, that has a foot cable, and lights so you can check the connection at the hardware level.

Don't bother with the drivers on their website, which are outdated. Go to FTDI, the company that makes the chip inside. They have up-to-date drivers even for intel Macs.

To talk to your serial device, you could get goSerial, but I wanted to do some on-the-fly analysis using python (of course). For this, I use pyserial. You just have to make sure that you link to the serial device correctly, as the FTDI drivers call it something nonstandard.

Wednesday, March 7, 2007

non-linear colormaps in matplotlib

Here is a way to do non-linear colormaps in matplotlib. You can select a base colormap, and a series of levels, and this class will remap the (linear) colormap such that your new selected levels define the linear positions along the map. This can be used for plotting bathymetry, specifically, where you may want to have more contours in the shallows than deep. Grab the code here: nlcmap.py.

Wednesday, February 28, 2007

Hypoxia and river discharge.

Here is a plot of hypoxia and river discharge. The discharge is measured at Tarbert Landing, and is plotted in 1000 m3/s. The measured bottom hypoxic area is plotted as read lines in terms of area (1000 km2). The length of the lines represent the period over which the data were taken.

Figure after the jump

Tuesday, February 27, 2007

New submission of the hypoxia paper

I finally got around to doing my revisions, and sent the hypoxia paper in. You can get it here:

hypoxia.pdf [8 Mb]

Enjoy.

Saturday, February 24, 2007

Test post from Mars edit.

Ok, so my test post from TextMate never amounted to much. Here is another test post from MarsEdit. I think it can handle figures:
Photo 33.jpg
(automatically uploaded and linked -- cool). Now I just need better content....

Wednesday, February 7, 2007

PYROMS on Google code

I have put together some of the python tools I have been writing into a package called pyroms. It is available on google code:

http://code.google.com/p/pyroms/

Please contact me if you would like to be on the developer list.

How to make a grid (in python)

I just competed a movie on how to make a grid using pyth0n. The methods, I think, are about the same whatever platform you use. You can watch the movie online, or download the movie.