Wednesday, January 28, 2009

The Arctic, Healy, and Larry Mayer featured on NYT blog

Today's New York Times Dot Earth blog features a post about the current battle over the Arctic. The video not only shows the Healy, but also interview snippets with Larry Mayer, co-director of the Center for Coastal and Ocean Mapping at UNH and one of the chairs of my PhD committee.

Read the post and see the video here.

Sunday, January 18, 2009

Converting Arc/Info 5 and 6 to e00 for use with ArcMap

Tonight I was helping Kurt convert some of his old Arc/Info version 5 and 6 files into .e00 files so that he could actually read them. It took some hunting around, but I finally found a handy little open-source tool that did it for me. AVCE00 is written in C, and the website has a pre-compiled version that will run on a Windows command line. I think Kurt may have plans to add it to fink so it can easily be used on a Mac as well. Remember, if you want to be able to view the data in ArcMAP 9.x, you can use the import71 tool located in C:Program Files/ArcGIS/Bin to convert the .e00 files into compatible coverages.

Website, anyone?

UNH provides free website hosting for UNH students, faculty, and staff. There are no formatting constraints and you have 256 MB of space. I followed the directions provided by CIS for setting up my public_html directory (if they mention telnet or ftp however, use shh and sftp instead so your password stays encrypted). From my home directory, I then ran the command:

$ umask 022

which will automatically apply world readable permissions to all files that I add to my public_html directory. If you chose to use umask as well, be careful and double-check the results. You do not want to inadvertently open up secure documents to the world.

I decided to cheat on making my webpage (at least until I have more time), so I used the free iWeb program that came with my Mac. It is pretty simply to use, and while not truly WYSIWYG, it seems to work well enough. This webpage effort has also led me to finally start playing around with Photoshop, and as a result I was able to do some pretty nifty things with the images behind the text on my C.V. page. *Sigh* I think my dork factor just went up another notch.

Anyway, the webpage is still a work in progress, but you can check it out here.

Wednesday, January 14, 2009

Looking at data in open-source QGIS

I decided to play around a bit with the free, open-source GIS software Quantam GIS (QGIS). QGIS is able to display many different types of raster and vector data, including some ArcGIS formats. It also integrates with the open-source Geographic Resource Analysis Support System (GRASS) to provide a lot of the data analysis and modeling tools you would find in the Arc Toolbox. QGIS is pretty easy to use, though somethings are certainly harder to do than in Arc. In order to add any polygons, lines, text annotation, etc., they must be digitized on a separate vector layer. The graticule plug-in also creates a new vector layer, which I found somewhat difficult to work with. So far it seems that QGIS might be great for initial visualizing and working with data, but not for final map/chart production. I have not tested out any of the GRASS features yet.

Here is what QGIS looks like up and running on Mac, with NOAA chart 13283 and some multibeam data displayed:

Saturday, January 10, 2009

Excessive CPU usage with Thunderbird

Recently I noticed that even when Thunderbird is idle, it seems to be eating up a lot of my CPU. When I first start up the program it is fine, but within an hour or two it would be using up ~10.2% of my CPU, and would remain that way until I quit the program. I started hunting around on the internet, and found the issue on a Unix/Linux forum here. It turns out that if you set your new mail notification sound to be something other than the default system sound, Thunderbird cannot handle it. Whatever subroutine handles the notification plays the sound just fine, but then it hangs and does not close. I tested this out myself, by first setting the notification sound to the default sound and restarting Thunderbird (the CPU usage was already high). I then sent a test message to one of my email accounts. The CPU usage went up slightly as the message came through, the system sound went off, and then Thunderbird went back to idle, using 0.0% of my CPU. I then set the notification sound to a non-system default ("Use the following sound file:") and sent another test message. The CPU usage shot up when the sound played and stayed around 10.2%. I waited for a few minutes and it never dropped back down. I had definitely found the culprit. Apparently Thunderbird is aware of the issue, and the fix will be included in the next version of Thunderbird (version 3).

Friday, January 9, 2009

A Response from EndNote: EndNote Web!

Wow, Who knew my Zotero post would get so much attention! I just received an email from a product development manager at Thompson Reuters, the parent company of EndNote. They pointed out to me that EndNote now has EndNote Web, which not only makes syncing libraries across different computers easy, but also supports OpenURL. With the FireFox plug-in, you can capture references online as you can with Zotero. If you have the latest version of EndNote (X 2.0.1) or your university subscribes to ISI Web of Knowledge, you can create an account for free. EndNote web can be used as a stand alone program without having to have EndNote installed on your machine, and downloadable plug-ins let you cite-while-you-write in MS Word. I wanted to be fair to EndNote, so I decided to set up an account, play with it, and post what happened.

I do not have access to the latest EndNote version (2.0.1), but UNH does subscribe to ISI Web of Knowlegde. I went to ( and registered for a free account. After a couple a couple of minutes, I was able to export my EndNote library and import it into EndNote Web. Now when I view my library list using EndNote Web, I see links to "Find it @ UNH." Clicking on this will take me to a link to the holding on UNH's library website, the full text (if UNH has it online), or to the inter-library loan page if UNH does not have it. There is also a "Online Link -> Go to URL" button. I thought this would take me to... well, an online link. What it actually did was try to go to the PDF of the article I have saved locally on my machine (I had the references and PDFs linked in EndNote when I exported my library). Since the way EndNote handles the link address is not actually compatible with how FireFox handles URLs, all this did was produce an error. In theory though, if you have the correct web address in the reference, it would take you to the online source. I am also guessing that if I relink all the references and PDFs in EndNote Web, this would work as well. Here is what my library looks like on EndNote Web:

There are a couple other issues I am having with EndNote web. One is that I cannot figure out how to get it to use UNH's database when searching for new references. UNH was not on their drop-down list (though tons of universities are) and I could not figure out how to manually add it. I have emailed them to ask about this (see update below). The second is that I could not get their FireFox plug-in to capture the reference from a website. I tried books, journal articles, you-name-it. For example, I selected one of the journals I found in a Google Scholar search, went to the page for that specific article, and hit "capture"... Nothing. The EndNote Web window popped up fine, but all the info fields were blank, even after telling it the source was a journal article. While still on the same webpage, I clicked on the toolbar icon to try to auto-add it to Zotero, and that worked instantly. This tells me that the issue seems to lie with EndNote Web, and not with the website.

So in conclusion, EndNote Web is nice, but it still seems to have some bugs that need to be worked out (namely, their capture feature). Also, unless you have the latest version of EndNote or access to ISI Web of Knowledge, you would have to pay for it. Right now it appears that EndNote Web is not available for individual purchase (clicking on their purchase link takes you to a page were you can request info for a corporate purchase).

Update: I just heard back from EndNote and it turns out that libraries have to request to have their catalogs included in EndNote and EndNote Web, and that this requires they have a z39.50 server available. I was under the erroneous assumption that an OpenURL link resolver could be used to search a library's database as well as point to a specific reference. If you are confused as to what exactly an OpenURL link resolver is and what it can/cannot do (as, apparently, I was), check out:

Wednesday, January 7, 2009

Zotero: A more user-friendly (and free!) EndNote alternative

Earlier today I installed an older version (6.0.1) of Endnote on my Mac so I could import my Endnote library from my PC at school (which uses the latest version). To my chagrin, the older version of EndNote could not import the newer version's library. I figured I could just save my library in an older format, but that is not an option. The best I could do was export to a text file to import into the older Endnote on my Mac. This means that if I want to be able to keep my libraries consistent between my school and personal computer without shelling out another 99 bucks for the latest Mac version of Endnote (and without having to run Windows via VMware), I'll have to constantly export and import text files. The better solution: Zotero.

Zotero is a free, open-source bibliographic organization software that works as a plug-in in your Firefox web browser. Not only can you import libraries from some other competitors (by first exporting as a Bibtex file) but you can also directly add references from the web. Endnote can add entries from the web as well, but only if the site supports downloading into an Endnote format. With Zotero, you simply click on the icon next to the reference's url (or select which references you want from a folder that pops up if the url contains more than one reference) and it is automatically added to your library. You can also add entries manually and even link to PDFs, just as you would in Endnote. Now I can just share the folder that my library resides in (or check it into svn) and easily sync between computers without having to export/import all the time.

A feature that Zotero has the Endnote does not, is an easy locate feature for your references. I can click on a entry in my Zotero library, and it will automatically locate the reference online for me. By default, it uses OCLC's OpenURL Gateway as the link-resolver, but you can easily substitute your institution's own resolver under preferences. I found UNH's resolver using the WorldCat Registry.

Here are the results of me trying to locate my journal article. All I did was click the "Locate" button, and the resolver finds the link on my library's server. However, since I am currently off-campus, I cannot access the full-text online:

Update: I forgot to mention, that just like EndNote, Zotero can integrate into Microsoft Office for citing while you write. Unlike EndNote, it also integrates into OpenOffice and NeoOffice. Sweet, eh?

Saturday, January 3, 2009

Update: Setting your Mac clock to NTP

There are a couple more things I have realized about setting NTP up on Mac that I wanted to share:

Although a restart of the computer should restart ntpd (the Network Time Protocol Daemon), it appeared at first that my computer clock was still not syncing right. The refid = locl means that the computer is using it's own system clock as the reference:

After going back over the ntp.conf file and determining it was fine, I restarted the network time daemon via command line (you can also do this instead of rebooting the whole machine):
$ /sbin/SystemStarter restart "NetworkTime"

Then when I ran the NTP query (ntpq -n -p), I saw that NTP was working. The * indicates the primary peer the computer is synced to, while the + indicates peers that are also contributing to the final time solution.

Apparently on Linux machines, the connection to the ntp time servers is pretty fast (less than a minute usually). On a Mac some reason, this process seems to take longer. The reason it worked after the manual restart of the ntpd is simply because enough time had passed since my reboot that the computer had finally connected to the time servers.

Update 2:

Okay, so I thought I had all the issues figured out, until I got to my boyfriend's place, started up my computer, and it could not connect to the ntp time servers (oy veh!). He had me check my systemlog, where I saw the following message:

Looks like permissions are getting confused somewhere. Next the bf suggested I comment out the section of my ntp.conf that deals with creating the log files (which are not necessary for ntp to work anyway). I commented out the following section:

#driftfile /var/db/ntp.drift
#statsdir /var/log/ntpstats/

#statistics loopstats peerstats clockstats
#filegen loopstats file loopstats type day enable
#filegen peerstats file peerstats type day enable
#filegen clockstats file clockstats type day enable

I then rebooted again, and viola, it instantly recognized the ntp time servers. The weird thing is that sometimes this problem appeared to correct itself after several minutes (thus my first update above). I am not sure what it really going on, and at some point I will have to figure out exactly what I need to set the log file permissions to in order to get everything happy. In the meantime, I am sticking with the ntp.conf with the log file commands commented out.

Setting your Mac clock to NTP

Kurt showed me how to setup my macbook to use the Network Time Protocol for syncing the clock. By default, your clock syncs to Apple's time server, which can be off by minutes. There are also syncing issues due tons of computers trying to sync to one time server. To set your mac to use the NTP instead (where it will use a multitude of servers, not just one), do the following:

1. in terminal:

mkdir /var/log/ntpstats
( you won't put anything in here, but NTP will)

2. edit your /etc/ntp.conf:
#server  (the original ntp.conf, I would save this)
server minpoll 12 maxpoll 17
server minpoll 12 maxpoll 17
server minpoll 12 maxpoll 17
server minpoll 12 maxpoll 17
server minpoll 12 maxpoll 17
server minpoll 12 maxpoll 17
server minpoll 12 maxpoll 17
server minpoll 12 maxpoll 17

driftfile /var/db/ntp.drift
statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

# The UNH time server (this was simply added because I go to UNH,
# you can omit this or add any other time servers you want)

# ... and use the local system clock as a reference if all else fails
# NOTE: in a local network, set the local stratum of *one* stable server
# to 10; otherwise your clocks will drift apart if you lose connectivity.
fudge stratum 10

# By default, exchange time with everybody, but don't allow configuration.
# See /usr/share/doc/ntp-doc/html/accopt.html for details.
restrict default kod notrap nomodify nopeer noquery

# Local users may interrogate the ntp server more closely.
restrict nomodify

3. reboot or run:
$ /sbin/SystemStarter restart "NetworkTime"

Still not working? See next post for update!

Free SVN client for Mac!

Today I went hunting around for a good, and free, svn client for Mac that would allow me to actually view/edit my svn repositories. I am getting a hang of the terminal commands for svn, but I wanted something to make it easy to browse what is in my svn directories. I found that and more in a program called svnX.

svnX allows you to easily view multiple svn directories, use checkout/check in features, browse past revisions, etc. Best of all: totally free.

Here is a screen grab of svnX connect to my svn repository on my school's server:

(svn repository browser, organized by revision number)

When I first opened the program, I got a small error message because the default is to assume your svn binary files are located in usr/local/bin. However, if you installed and run svn via fink, your binary file locations is actually /sw/bin.

Update: To add a file, you can simply drag-and-drop between svnX and the Finder. In order for this to work though, you must drop the file directly onto the folder icon of the repository directory. I spent a few rather frustrating minutes trying to figure this out.