Kilimanjaro

This is actually something that I posted as a comment on another blog, but I thought it was worthwhile to post again:

My personal opinion is that we’re not going to destroy the world with what we do, but we should probably try not to (by curtailing ourselves from being overly destructive, etc.).

There is supposedly a paper that explains Kilimanjaro’s loss of glaciers as a result of deforestation. The loss of humid air rising up from the wooded slopes causes less condensation and deposition of ice on the cap of the mountain.

A paper in Nature is often (from what I’ve seen in my searches today) cited as the one that explains all this, but the Nature paper is actually a news summary of the work of Bill Ruddiman. I can’t pull up the references right now because UND doesn’t electronically subscribe to the journals in question.

I think this is probably a good answer to the question of Kilimanjaro, not because I’m skeptical of climate change but because the deforestation theory describes a discrete mechanism by which the ice cap would get smaller. It’s a lot easier to figure out whether a specific theory is correct or incorrect than to argue for or against such ill-defined terms as “climate change” that do not in themselves describe a mechanism.

Install GD library in Leopard

If you’ve been here before, note the heavy edits in italics. Read it all before you start doing funky things!.

I needed the GD library for my installation of The Ultimate Family Tree (TUFaT). It’s also needed for OpenX to be able to display graphcs.. For once, I found an excellent step-by-step tutorial on how to do this in the Moodle Documentation. Seriously, this was one of the easiest things I’ve ever done, and I even upgraded my PHP installation in the process. All the files are in the right place!

Just a note, that php.ini-recommended needs to be copied out, edited, renamed as php.ini, and then moved back for the final step.

Important: This blog post is also excellent and easy. It worked out for me when things didn’t work out (see below). Make sure to read the comments for some problems people have had. Here is another site that I didn’t use (because the last one worked).

Happiness!

EDIT: Not so much. For some reason, after doing this none of the applications I have can access the MySQL databases (Error #1045 – Access denied for user ‘root’@’localhost’ (using password: NO) ). Luckily (after giving up on finding an answer today), you can switch back to the default Leopard PHP installation by switching the commenting on those two lines in /etc/apache2/httpd.conf:

To use new PHP installation (above link):
#LoadModule php5_module libexec/apache2/libphp5.so
LoadModule php5_module local/php5/libphp5.so

To use old PHP installation:
LoadModule php5_module libexec/apache2/libphp5.so
#LoadModule php5_module local/php5/libphp5.so

When I find an answer to my problem, I will try to post it. Right now I am attempting to see how much the GD libraries are necessary for TUFaT.

Update: The solution to my problem was with PHP not really knowing where MySQL was, even though MySQL was on and working beautifully from the command line. I’ll copy it here from the comments on ‘phil has a blog’ (thanks mauricio)! Looking at this comment, it was actually posted only 9 hours ago, so that explains why I didn’t find it earlier this week!.

mauricio

After following all the steps described in the blog I had an issue making PHP & MySQL communicate.

After many trial an errors, lots of headaches, and many days with this machine down I found this post on another site. It solved my problem.

I had the same problem with MySQL getting no valid connection.
Code:
Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user ‘root’@’localhost’ (using password: YES) in

With my default MySQL and PHP installation in Mac OS X 10.5.2 there are no problems with the connection.

In my opinon it’s caused in this parameters from the compilation:
Code:
‘–with-mysql=shared,/usr/local/php5’ ‘–with-mysqli=shared,/usr/local/php5/bin/mysql_config’ ‘–with-pdo-mysql=shared,/usr/local/php5’

With those configurations PHP searches for the MySQL lib inside of the PHP5 path.
My solution was:
Code:

cd /usr/local/php5/lib
sudo mv mysql mysql.old
sudo ln -s /usr/local/mysql/lib mysql

restart apache

Using ImageJ for what tpsDig does, but on a Mac

If I had discovered this months ago, my thesis would probably be in a much better position right now! I’ve been tied to the PC in my office, rather than being able to go home and watch movies or TV shows while I did my digitizing.

The free program ImageJ is useful for all sorts of things, like processing images for analysis and doing measurements on photographs, but it can also record coordinate (x,y) pairs as an output file, which is perfect for digitizing specimen outlines for later Elliptical Fourier Analysis.

I have been using tpsDig by F. James Rohlf for this, and I’ve never seen an alternative mentioned, probably because most of the other software written for geometric morphometrics is written for DOS and Windows.

Enough blabbering, here’s how to do it:
1. Start ImageJ. Open the image you want to outline.
2. Important! Make sure the coordinate system being used is the same as that in tpsDig (tpsDig places the origin in the lower left, ImageJ in the upper left by default). Select Analyze->Set Measurements…->Invert Y Coordinates.
3. Select the “Polygon Selections” tool on the floating toolbar. [If you’re really good, you could also use the “Freehand Selections” tool and get out scads of numbers.]
4. Outline the object by clicking along the edge of the object. When you close, double click to stop the digitization.
5. Choose File->Save As->XY Coordinates and save your file.
6. You’re done!

To get this to be readable by tpsDig and related software, you will obviously have to add the top three lines that describe the file, the number of landmarks, and the number of curves, as well as the name of the image file as the last line in the file. I don’t have a present need for that, but it’s not too hard to write up an R function (or a terminal script) to add lines (interestingly enough, I’ve been using sed to do this in DOS batch files recently rather than the OS X terminal).

UPDATE: Somewhat annoyingly, ImageJ seems to only open JPG files in RGB colors, not in CMYK. I have no idea why. Luckily, this comes at a time when I am only first starting to realize that CMYK is a more standard color choice than RGB, so most of my files are still in RGB.

If scaling is a factor (it is for me), you can install the Zoom_Exact plugin (near the bottom of the page). Installing this was interesting, but the documentation helped somewhat. What you want to do is:
1. Choose Plugins->New…,
2. Select type “Plugin” and name it “Zoom_Exact”
3. Paste the code into the boz that appears and save it as “Zoom_Exact.java”
4. Restart ImageJ. “Zoom Exact” should appear at the bottom of the Plugins menu.
5. To easily use Zoom Exact, you can map it to a shortcut key with Plugins->Shortcut->Create Shortcut. I have mine mapped to capital “Z” so I can call it up easily when I want to get the scaling right on the screen.