Tuesday, May 25, 2010

Some Tools a Physicist Might Set Up on a Mac

This post is intended to remind myself of the tools I would want to set up on a new Mac, and also to serve as a resource for others who might be interested. A great resource that touches on many of these topics is "OS X Leopard for Physicists", which I will reference below.

Firefox


My browser of choice, primarily thanks to one particular plug-in. Zotero is a citation manager that sits inside Firefox. Most any source you navigate to on the web, be it a news article, a journal article, an abstract, an arXiv document, etc. will trigger an icon in the address bar, and you just need to click on it to import all the vital info into Zotero. It can save a snapshot of the page, or hold onto the full pdf document. It's made it much easier to keep track of the literature I've read.

emacs


Along with vi, this is one of the two heavy-hitter text editors that have been around for the long haul. There is a Carbon Emacs package available, but you can now easily install from source on OS X, getting the most up-to-date version, which I'd recommend. Instructions are available for Installing Emacs 23 on Mac OS X. It's a steep learning curve with simple things like opening files, saving, copying, etc. involving new key combinations you haven't used before, but I've found the end result is much more efficient editing. You can learn most everything you need to know about emacs by firing it up and spending some time running through the tutorial (press ctrl-h, then t).

As a random aside, Emacs installed this way doesn't inherit settings from your shell (or something like that), which means certain packages like AucTeX (for writing LaTeX documents) can't run terminal applications the way they'd like. To fix this, you have to create a ~/.MacOSX/environment.plist:

defaults write ${HOME}/.MacOSX/environment PATH "${HOME}/bin:/usr/bin:/bin:/usr/local/bin:/usr/texbin"


OpenAFS


In particle physics, AFS (Andrew File System) is the go-to standard for setting up computing systems for users. You can access all your files on AFS from your Mac by installing OpenAFS. This will mount /afs as a drive on your Mac. Further, you can create tokens that allow you direct write access to your home directories on AFS.

To access your Wisconsin HEP account, you'll need to make a few changes in /var/db/openafs/etc (you'll need administrative privileges, so preface any command with 'sudo'):

In ThisCell, add:
hep.wisc.edu
grand.central.org


In CellServDB, add any of these that don't exist:
>hep.wisc.edu           #University of Wisconsin -- High Energy Physics
128.104.28.219 #anise.hep.wisc.edu
144.92.180.7 #rosemary.hep.wisc.edu
144.92.180.30 #fennel.hep.wisc.edu


CMS Stuff


For those working on CMS, you can get the Fireworks event display software, which is a cinch to install and includes root along with the libraries needed to run FWLite analysis.

Enthought Python Distribution


The Enthough python distribution (academic) includes a modern version of python along with matplotlib (a fantastic plotting library) and a variety of other scientific tools for python. Comes packaged in an easy installer.

rootplot


If you've setup the Enthought distribution to give yourself matplotlib, you can get it to interface nicely with root through rootplot. The documentation page points to instructions for installing on OS X (requires building root).

LaTeX


You can start from an easy installation of MacTex, which will install LaTeX along with a bunch of fun tools like LaTeXiT, where you can write LaTeX snippets and drop the pdf or png image into a presentation (in Keynote, you can even drag it back out to LaTeXiT and it will remember the source!).

JaxoDraw


JaxoDraw is a Java application which provides a graphical interface for drawing Feynman diagrams based on the axodraw LaTeX module. "OS X Leopard for Physicists" provides some good advice for setting it up to work correctly in OS X, particularly the paths to dvips and LaTeX and choosing "open" for text editor and Postscript viewer.

VirtualBox


On occasion, I have found a few tasks where I wish I were working a native Linux environment. For this, I found it astonishingly easy to set up a virtual Ubuntu machine through VirtualBox. Once VirtualBox is installed, all you need is an Ubuntu disk image, and it will walk you through the steps to create your new virtual machine.

No comments:

Post a Comment