Projected Tentacles

20101101-j6nj2utq9yatjg4xrwj8cedusd

For a Halloween party at the inimitable Langton Labs, I projected this tentacle generator on a roll of Tyvek weather barrier hung from the sealing (completely covering Tristan’s window - thanks Tristan!). This image shows the state of my laptop when I unblanked the screen the next day; the program had been running for many hours in a row with the fade level set to zero. The result is densely tentacled, in my favorite hue! You can play with the javascript version of the software here.
0 Comments

Happy Octopus Day!


IMGP8500-small


This sign once announced a well-regarded & affordable Japanese restaurant, and now hangs in an art gallery near Pioneer Square. Takohachi apparently means "octopus eight", which sounds like a fierce gang of urban marine biologists! Happy Octopus Day, you fiercest of undersea explorers!

Seattle, Washington - August, 2010.
0 Comments

Surfing the Light Field

dudette light field surfing-1
Blue Crush, now in 4D!


The creator of the “bullet time” video effect, Tim Macmillan and his bro Callum of Timeslice Films, setup a triggerable linear array of 52 Canon Rebel SLRs around a wavepool. The resulting shots of dudes & dudettes exploding over crystal-blue waves, fins carving droplet arcs into the warm Australian air, are spectacular! Please find below the finished video, and check the petaixel blog link for more info and a behind the scenes exposé.





I do wonder: why didn’t the filmmakers use the video function of the Rebel, to get true 4D (or 5D if you count color as a dimension!) video? They were probably worried about accurate triggering for video mode, and the lack of a genlock feature to keep all the frames in sync across cameras. Camera companies: take notice! People will take advantage of these advanced features, and make your hardware look extra shiny and dollar-worthy! Pentax, you can be the manufacturer to bust into new spaces like this!

sketching angles in the sand-1
Sketching plenoptic functions in the golden sand.


Also, I just found petaixel.com via a google alert, and I have to say, this is the raddest blog I’ve come across in quite some time. Good on ya, PetaPixel!

0 Comments

Installing Spyderlib, a really nice Python IDE, on OSX

Spyder logo vector

I’ve been using Python (x,y) on Windows XP, and really like the Spyder IDE with comes with it (that’s a vectorized version of the Spyder logo above - a worm-like python stuck in a spider web!). It is kind of like MatLab, but of course uses Python and is free! There does not seem to be a short cut for running a code snippet in the interactive interpreter, and I can’t figure out debugging yet; however, it is much nicer looking, and I like Python syntax.

I usually use OSX or Ubuntu, though, and especially wanted to get Spyder on my Macbook for epic mobile coding seshes. One of the main dependencies is PyQT, which I had already installed (at great pain) to make a GUI for processing light field microscopy focal stacks. So, installing Spyder was easy, and I was very happy... until I tried to import numpy in the interactive interpreter and was straight DE-NIGHED! I guess I’d installed numpy (and its ilk: scipy, matplotlib, etc) via the Enthought distribution, and Spyderlib was installed in the OSX Python... area. Why such harsh border controls exist between the various states of the Python Empire I do not know. So for awhile, I edited using Spyder, and then ran the script from the terminal. But come on, this is 2010 and that shit ain’t right!

On a separate storyline, I was noticing that as my 500 gb hard drive neared capacity, my laptop becoming more and more creaky, taking for-freaking-ever to open or close Lightroom, for example. I heard about these new hybrid SSD - spinning hard disks from Seagate (Momentus XT), and decided to give one a shot. I figured this would give me a good reason to clear out some disk space, and also reinstall OSX. What do people think - does a reinstallation help as OSX speed as much as it did Windows XP? I know OSX is not supposed to accrue tumors as fast as the old Microsoft offering, but still... so creaky...

Anyway, I installed the new drive, and the computer rebooted in the time it took me to spread some peanut butter on a cracker! My goodness... so fast... so creak-less. Bursting to 80 MB/sec right off the bat, and supposedly the hybrid drive learns what to keep on the SSD portion, so as to make things even faster! I was pretty excited, and set about reinstalling / transferring all the crucial digital detritus. As I got to Spyder, I figured might as well have another go at installing it, now that my drive was no longer a seething hive of warring Python installation fiefdoms.

Turns out there is a specific order of installation required to keep your hair attached to your head, and I thought I’d share my flow here for others (and my future self) to attempt. I’m using a 2009 Macbook Pro, with OSX 10.6.4 (Snow Leopard, aka Snow Leps).

1) Okay, the first thing I didn’t do was install another Python distribution via Enthought or MacPorts or anything; I just used the Python that comes with OSX. Maybe this will come back to bite me, only time will tell.

2) Install Xcode, etc from Apple Developer, making sure to select “Unix tools”, cuz you need GCC to get your make on!

3) Install QT: the first time I did this I had to build all kinds of stuff that took FOREVER. I got a "You are building a 64-bit application, but using a 32-bit version of Qt. Check your build configuration" error about halfway through the process, and thought I had to rebuild from source, but I now believe I mis-read which binary to double-click. So, go to http://qt.nokia.com/downloads/mac-os-cpp and double-click the one that says qt-mac-cocoa-opensource-4.6.2.dmg. The COCOA part is the important part, as it includes the 64-bitness. Really you wait for it to download, then unzip, then double-click qt.mpkg, and the installer takes care of the rest!

4) Install SIP: I don’t know why you need this, but you do. Go to http://www.riverbankcomputing.co.uk/software/sip/download and get the .tar.gz version. Double-click that fool to unzip (or un-tar, un-gz = detarguzz). Then open Terminal, cd to the detarguzzed folder, and type:
python configure.py
make
sudo make install


5) Install PyQt: this is wrapper for the QT C code. Go to http://www.riverbankcomputing.co.uk/software/pyqt/download and get the Mac version (called PyQt-mac-gpl-4.7.7.tar.gz on the night I did it). Detarguzz that beast, find the folder in Terminal, and type the familiar (the make step will take awhile, unless it is the future and you have a iMegaKore processor):
python configure.py
make
sudo make install

6) Test the PyQt install by typing (of course you’re on your own if there is a problem, cuz it worked for me!):
python -c 'import PyQt4; print PyQt4'

7) Install QScintilla: again, not sure what this does, but you need it for PyQt. Go to http://www.riverbankcomputing.co.uk/software/qscintilla/download and get the Mac version (called QScintilla-gpl-2.4.5.tar.gz at the moment). Detarguzzle that fuzzle, and then Termify these lines:
cd QScintilla-gpl-2.4.5/Qt4
qmake qscintilla.pro -spec macx-g++
make
sudo make install
cd ../Python
python configure.py
make
sudo make install
make clean


8) Install Python math packages: we’re getting there, PyQt is now installed, and we just want to make sure we can import numpy in Spyder. The Scipy Superpack is a really easy way to get a bunch of nerdtasty Python libraries; go to http://stronginference.com/scipy-superpack/ and get the little script (only 4 KB!) called (right now) superpack_10.6_2010.09.15.sh. Running the script will download AND install a bunch of good stuff, no make sudo sudo make clean install sudo required! Just go to Terminal and type:
sh superpack_10.6_2010.09.15.sh

9) Install Spyderlib: this is the hot stuff interactive coding dreams are made of! No more wondering what else is in that struct, just glance at the Workspace tab! Go to http://code.google.com/p/spyderlib/downloads/list and get the .tar.gz which matches your Python version; I got spyder-1.1.6.tar.gz cuz I’m rocking Python2.6, and I didn’t want to tempt the evil python tribespeople still lurking on my old HD with the 2.0 beta (but let me know if it works for you, because code completion would be really nice!). Then detarguzz it, and type:
sudo python setup.py install

BAMN! Finished! Type spyder in Terminal, no matter what folder it is currently inhabiting, and a nice photo of a spider web will appear (well, not as nice as this one ;-). The first opening takes a minute or so, but the following ones are blazin’ fast (at least when your HD is a dyed-in-the-wool Hy-brah!). See the Interactive Console window on the lower right? Type import numpy and marvel at the lack of errors!

Spyder

Thank you to Nokia, Riverbank, Chinbilly (whose blog provided most of the Terminal commands seen here), and of course the Spyderlib people for coming together to build something great.

0 Comments

Meeting of the Macs

Meeting of the Macs_(IMGP3736)

At a group disscussion on software integrating microscope hardware, Zhang telecommutes in from Boston (via Maui), and Logan (on the Galactopod, unseen) from Spain. In the back of the frame, Marc commutes to Evernote on his iPad.
0 Comments

Light Field of Octopus Arms

The following video shows a light field focal stack through multiple sucker cup- & chromatophore-encrusted arms of a young octopus. Because this is a frame from a light field microscope, every focal plane was captured at exactly the same time; thus even though the octopus might have moved, we can rest assured that this volume represents the 3D position of the limbs at this single moment.

Some orientation: at the start of the video we are at the bottom of the tangle of octopus arms, and as the time slider moves right, the focal plane becomes more shallow. First some sucker cups facing the camera come into view, then some cups more perpendicular to the camera, and finally some chromatophores appear on an arm in the upper left corner.

Try scrolling back and forth to get a sense of the third dimension! Pro tip: if you’re on a semi-recent Mac laptop, do the two-finger scroll while the cursor is above the movie... tentacular video scratching (what sound would this make)!

To capture this image, I used a 10x 0.3 NA objective with an array of microlenses of focal length 2.5 mm. To make the focal stack, I used a Python script which knits together a few different libraries, including ImageJ and Stanford CS’s ImageStack.

Thank you to friend & lab mate Lene Harbott for the specimen!

0 Comments

Testing the Pentax K-x Video Mode

From the flowers... to the dog from Todd Anderson on Vimeo.

This crazy red-haired dog found something awesome in that hole, and I was spying on him from beneath tiny yellow flowers while also testing out the Pentax K-x with Sigma 17-70mm macro-capable lens. Pretty nice! I really like the focus rack from near to far (though I overshot the dog by a few feet). The sound is not so good, which is why I'm looking into a Zoom H2 portable recorder.

0 Comments

Fish Photos

I sometimes (often) acquire images using a device other than the light field microscope. My tools of choice in the macro (that is magnification ratios of 1:1 on towards 1:infinity) come from the Pentax digital SLR system. A month or so ago I made a bunch of images of the African cichlid fish which live in the lab of Russ Fernald (who was also on my thesis committee). Recently, one of the photos was published on ScienceNews.com. The same photo is on the cover of the July 2010 issue of Hormones and Behavior. The image shows a pair of male fish demonstrating their fierceness, so as to maintain mating rights in one of the clay pots on the floor of their tank.
From Cichlid Muay Thai
To make this image, I used the Pentax K20d camera body with a Sigma 17-70mm lens. I like this lens for such mid-scale work, as it can focus down to about 0.5”, which allows you to get really close to the aquarium glass and therefore reduce reflections from room lights and increase the blurriness of tank crud. I also used a pair of ancient flashes controlled by a cheap wireless trigger from Yongnuo Digital (via eBay). One flash raked the ground pebbles from hard left, while the other caught the fishes' scales and eyes from the right. You can see more such shots in my Cichlid Muay Thai album, so named because my friend, the newly-minted Dr. Brian Grone (and kick boxer extraordinaire), works in the Fernald lab, and tipped me off to the clean tanks / agro fish that day!

Finally, here is my page of published science photos.

0 Comments