Happy farming John

October 10, 2010

I heard from CfA colleagues that John Huchra died on Friday, a horrible shock. Sean has already written about him over at Cosmic Variance, and his Wikipedia page has already been updated. The world moves fast these days. Here is John’s home page, where you can read about his work in his own words.

I last saw John just over a year ago, playing volleyball with my kids in Aspen along with other wide field survey notables. Still had his glasses on I think. Many years before that (1982ish), I was grateful to John for teaching me much of my optical observing skills. I was in process of converting from X-ray astronomer to optical astronomer, and together with John and Martin Elvis we were getting CCD images of Seyfert galaxies using the 24 inch at Mt Hopkins – a rather hands on telescope shall we say. A few things I remember from that first “proper astronomy” experience :

  • The TV acquisition camera had a weird dead patch somewhere near the middle. I asked John what this was. “Jupiter” he said.
  • Adjusting something in the dome, I asked John to pass the torch but he was too consumed with mirth to do so. Seems I should have said “flashlight”, as to Americans “torch” conjures up images of villagers chasing Frankenstein’s monster.
  • Apparently SAO should have consulted the local Indians. Mount Hopkins was always known to them as “Old Cloudy Top”
  • In the afternoon, if there was ANY sign of cloud, John would say “looks like we bought the farm Andy”. The fourth time he said this I asked him to explain. It comes from The War. Soldier buddies would sit around together, missing their folks, and say things like “When I get home, I’m going to buy me a little farm”. When someone was shot, and dying in his buddy’s arms, he would look up and whisper “Hey, Joe, looks like I finally bought that farm”

So, John, look after that farm. Its pumpkin season.

Plotters Part III

October 10, 2010

Geek Week now resumes. Last week I started some burblings about plotting. Apologies for those who find this dull. Getting it off me chest.

Part I was a general intro. Part II was about mathematical environments, plot libraries, and equation graphers. Now I will launch into GUI based plotters.

There is a whole bunch of these, including things you pay for like Datagraph and ByeGraph, and some free things like Grace, Plot, SciDavis, and Hippodraw. Most but not all of these are multi-platform. They all have various strengths, but a common weakness – they are incredibly intimidating, with gazillions of windows, buttons, sliders, and options. It may well be that if you get used to one of these, they are just what you want; if that’s true for one my readers, let us know. But my own vote goes to two applications that I find much more intuitive and simple. What they have in common is that the complexity is hidden until you need it, which is made possible by the way they think of graphs as made up of a hierarchy of components, each of which can have its own settings – page, graph, x/y-axis, curve, dataset.

Mjograph. My first plug is for mjograph written by Makoto Tanahashi, a PhD student from Yokohama. Its a Java application, so it should work fine anywhere. It has a clean simple interface. It can plot multiple functions and multiple datafiles, listed as objects, so you can pick each one at a time and set its properties – point size, colour, line weight, etc. The adjustment of appearance, including annotation in TeX, is clean and simple but effective.  (I spotted one or two bugs though…) The approach to datafiles is also simple. It expects plain text files with x,y, and error columns in various allowed permutations. You just drag the file onto the window and it gets plotted. Weaknesses are that it doesn’t do parametric functions, and doesn’t do column manipulation (“plot column 3 as X, and the sum of columns 8 and 11 as y”) but really if you want that sort of thing you should probably use a scripting package like Gnuplot.

Veusz. The second plug is for Veusz written by Jeremy Sanders, a PDRA  at the Institute of Astronomy in Cambridge. This is written in Python, but is available wrapped up as a Windows, Mac or Linux app. Apparently VEUSZ is pronounced “Views” and stands for Velvet Ember Under Sky Zenith, for no particular reason. And why not. Veusz can do function plots, data files, and fits to data files. Like mjograph, it has a nice logical hierarchical approach to editing the properties of various objects, and its quite easy to adjust line weights, annotate in TeX, colour things in, etc. The various editing windows can float free or be tiled, but getting them back in place drove me bananas… Data can be edited in by hand, or imported from plain text, csv, and FITS. You can only import one dataset at a time though (I think).  Veusz can do contours, vector fields, and and grayscale images, but it doesn’t do surface plots. You can’t plot a parametric function, but in the dataset editor you can create a dataset with a parametric function.You can also do column arithmetic to make new datasets. So it can do rather more than mjograph, but of course at the cost of just a little more complexity.

The really nice thing is that it is scriptable as well. Every GUI action has a corresponding Python command. The app comes with a console which is a Python window, with numpy already loaded. You can use this in a normal Pythonish way, but you can also issue Veusz commands or run a whole Veusz script. That nice Dr Sanders also provides callable libraries for C and C++, and says a Fortran library is on the way.  When you save a plot you have been working on, its actually a text file containing the Python commands, so you can edit this, and teach yourself the scripting version. Below is a plot I just made with the GUI, and its script equivalent. (Note mistake : “bump” should be “dip”). As you can see, its perfectly logical, but kinda laborious. So this is really nice, but I don’t see it as a replacement for Gnuplot or similar.

Link to the Veusz script to produce the above plot.

Topcat. Finally, a plug for good ole Topcat. If you are interested in tabular data, rather than functions, and want to explore the data rather than making fancy plots, then this is what you want. Where bees are concerned, it is the knees.